diff --git a/_includes/footer.html b/_includes/footer.html index 04d9180..26bee32 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -1,18 +1,14 @@ -
-
+ + +
+
+ + Site design by: Evan Pratten | + + This site was last updated at: {{site.time}} +
- + \ No newline at end of file diff --git a/_site/blog/2019/04/30/frc-languages.html b/_site/blog/2019/04/30/frc-languages.html index 5e9d90a..484565c 100644 --- a/_site/blog/2019/04/30/frc-languages.html +++ b/_site/blog/2019/04/30/frc-languages.html @@ -9,6 +9,7 @@ + @@ -46,10 +47,16 @@
-

The language hunt

-

+

The language hunt + +

+

+ +


-

2019-04-30 14:32:00 -0400

+

2019-04-30 14:32:00 -0400 + +


@@ -73,21 +80,17 @@
-
-
+ + +
+
+ + Site design by: Evan Pratten | + + This site was last updated at: 2019-08-24 15:35:35 -0400 +
- + \ No newline at end of file diff --git a/_site/blog/2019/05/27/building-safe-vision-comms.html b/_site/blog/2019/05/27/building-safe-vision-comms.html index 14f9614..61898fd 100644 --- a/_site/blog/2019/05/27/building-safe-vision-comms.html +++ b/_site/blog/2019/05/27/building-safe-vision-comms.html @@ -9,6 +9,7 @@ + @@ -46,10 +47,16 @@
-

Building a safe and easy system for sending computer vision data from a raspberry pi to a roborio

-

+

Building a safe and easy system for sending computer vision data from a raspberry pi to a roborio + +

+

+ +


-

2019-05-27 05:22:00 -0400

+

2019-05-27 05:22:00 -0400 + +


@@ -86,21 +93,17 @@
-
-
+ + +
+
+ + Site design by: Evan Pratten | + + This site was last updated at: 2019-08-24 15:35:35 -0400 +
- + \ No newline at end of file diff --git a/_site/blog/2019/06/12/styiling-github.html b/_site/blog/2019/06/12/styiling-github.html index bcc934a..a1c30dd 100644 --- a/_site/blog/2019/06/12/styiling-github.html +++ b/_site/blog/2019/06/12/styiling-github.html @@ -9,6 +9,7 @@ + @@ -46,10 +47,16 @@
-

GitHub's CSS is boring. So I refreshed the design

-

+

GitHub's CSS is boring. So I refreshed the design + +

+

+ +


-

2019-06-12 09:09:00 -0400

+

2019-06-12 09:09:00 -0400 + +


@@ -97,21 +104,17 @@
-
-
+ + +
+
+ + Site design by: Evan Pratten | + + This site was last updated at: 2019-08-24 15:35:35 -0400 +
- + \ No newline at end of file diff --git a/_site/blog/2019/06/16/graphing-w2a.html b/_site/blog/2019/06/16/graphing-w2a.html index e033878..15eb650 100644 --- a/_site/blog/2019/06/16/graphing-w2a.html +++ b/_site/blog/2019/06/16/graphing-w2a.html @@ -9,6 +9,7 @@ + @@ -46,10 +47,16 @@
-

Graphing the relation between wheels and awards for FRC

-

AKA. Why programmer + reddit + matplotlib is a bad idea.

+

Graphing the relation between wheels and awards for FRC + +

+

AKA. Why programmer + reddit + matplotlib is a bad idea. + +


-

2019-06-16 11:51:00 -0400

+

2019-06-16 11:51:00 -0400 + +


@@ -111,21 +118,17 @@
-
-
+ + +
+
+ + Site design by: Evan Pratten | + + This site was last updated at: 2019-08-24 15:35:35 -0400 +
- + \ No newline at end of file diff --git a/_site/blog/2019/06/17/amm2m1-release.html b/_site/blog/2019/06/17/amm2m1-release.html index 0acacd6..945db29 100644 --- a/_site/blog/2019/06/17/amm2m1-release.html +++ b/_site/blog/2019/06/17/amm2m1-release.html @@ -9,6 +9,7 @@ + @@ -46,10 +47,16 @@
-

I made a new song!

-

Releasing a new song with friends at school

+

I made a new song! + +

+

Releasing a new song with friends at school + +


-

2019-06-17 06:20:00 -0400

+

2019-06-17 06:20:00 -0400 + +


@@ -70,21 +77,17 @@ Your browser does not support audio players
-
-
+ + +
+
+ + Site design by: Evan Pratten | + + This site was last updated at: 2019-08-24 15:35:35 -0400 +
- + \ No newline at end of file diff --git a/_site/blog/2019/06/21/robot-experiences.html b/_site/blog/2019/06/21/robot-experiences.html index a7f16c5..cfbda23 100644 --- a/_site/blog/2019/06/21/robot-experiences.html +++ b/_site/blog/2019/06/21/robot-experiences.html @@ -9,6 +9,7 @@ + @@ -45,10 +46,16 @@
-

What I have learned from 2 years of FRC programming

-

Robots are pretty cool

+

What I have learned from 2 years of FRC programming + +

+

Robots are pretty cool + +


-

2019-06-21 11:14:00 -0400

+

2019-06-21 11:14:00 -0400 + +


@@ -110,21 +117,17 @@
-
-
+ + +
+
+ + Site design by: Evan Pratten | + + This site was last updated at: 2019-08-24 15:35:35 -0400 +
- @@ -165,11 +168,21 @@ + + \ No newline at end of file diff --git a/_site/blog/2019/06/23/googlectf.html b/_site/blog/2019/06/23/googlectf.html index e1902c6..876fbff 100644 --- a/_site/blog/2019/06/23/googlectf.html +++ b/_site/blog/2019/06/23/googlectf.html @@ -9,6 +9,7 @@ + @@ -46,10 +47,16 @@
-

I gave Google's CTF a short try and learned a thing or two

-

But exams got in the way and took all the fun

+

I gave Google's CTF a short try and learned a thing or two + +

+

But exams got in the way and took all the fun + +


-

2019-06-23 18:04:00 -0400

+

2019-06-23 18:04:00 -0400 + +


@@ -68,21 +75,17 @@
-
-
+ + +
+
+ + Site design by: Evan Pratten | + + This site was last updated at: 2019-08-24 15:35:35 -0400 +
- + \ No newline at end of file diff --git a/_site/blog/2019/06/24/languagehunt2.html b/_site/blog/2019/06/24/languagehunt2.html index 542bb4a..02117d1 100644 --- a/_site/blog/2019/06/24/languagehunt2.html +++ b/_site/blog/2019/06/24/languagehunt2.html @@ -9,6 +9,7 @@ + @@ -46,10 +47,16 @@
-

The language hunt: Part 2

-

A quick followup

+

The language hunt: Part 2 + +

+

A quick followup + +


-

2019-06-24 17:36:00 -0400

+

2019-06-24 17:36:00 -0400 + +


@@ -68,21 +75,17 @@
-
-
+ + +
+
+ + Site design by: Evan Pratten | + + This site was last updated at: 2019-08-24 15:35:35 -0400 +
- + \ No newline at end of file diff --git a/_site/blog/2019/06/26/bashsmash.html b/_site/blog/2019/06/26/bashsmash.html index ce99f9c..971fc04 100644 --- a/_site/blog/2019/06/26/bashsmash.html +++ b/_site/blog/2019/06/26/bashsmash.html @@ -9,6 +9,7 @@ + @@ -46,10 +47,16 @@
-

BashSmash

-

A tool for driving people crazy

+

BashSmash + +

+

A tool for driving people crazy + +


-

2019-06-26 11:48:00 -0400

+

2019-06-26 11:48:00 -0400 + +


@@ -177,21 +184,17 @@ __() {/???/???/???n?f
-
-
+ + +
+
+ + Site design by: Evan Pratten | + + This site was last updated at: 2019-08-24 15:35:35 -0400 +
- + \ No newline at end of file diff --git a/_site/blog/2019/06/27/pwnlink.html b/_site/blog/2019/06/27/pwnlink.html index acdcf7e..182b011 100644 --- a/_site/blog/2019/06/27/pwnlink.html +++ b/_site/blog/2019/06/27/pwnlink.html @@ -9,6 +9,7 @@ + @@ -46,10 +47,16 @@
-

I had some fun with a router

-

cleartext passwords + external management = death wish

+

I had some fun with a router + +

+

cleartext passwords + external management = death wish + +


-

2019-06-27 13:16:00 -0400

+

2019-06-27 13:16:00 -0400 + +


@@ -98,21 +105,17 @@
-
-
+ + +
+
+ + Site design by: Evan Pratten | + + This site was last updated at: 2019-08-24 15:35:35 -0400 +
- + \ No newline at end of file diff --git a/_site/blog/2019/06/27/python.html b/_site/blog/2019/06/27/python.html index cd3cc5c..84ccd3c 100644 --- a/_site/blog/2019/06/27/python.html +++ b/_site/blog/2019/06/27/python.html @@ -9,6 +9,7 @@ + @@ -46,10 +47,16 @@
-

Hunting snakes with a shotgun

-

Python is a little too forgiving

+

Hunting snakes with a shotgun + +

+

Python is a little too forgiving + +


-

2019-06-27 03:00:00 -0400

+

2019-06-27 03:00:00 -0400 + +


@@ -163,21 +170,17 @@
-
-
+ + +
+
+ + Site design by: Evan Pratten | + + This site was last updated at: 2019-08-24 15:35:35 -0400 +
- + \ No newline at end of file diff --git a/_site/blog/2019/07/01/devdns.html b/_site/blog/2019/07/01/devdns.html index 4f2f8dc..5924f69 100644 --- a/_site/blog/2019/07/01/devdns.html +++ b/_site/blog/2019/07/01/devdns.html @@ -9,6 +9,7 @@ + @@ -45,10 +46,16 @@
-

devDNS

-

The DNS over devRant service

+

devDNS + +

+

The DNS over devRant service + +


-

2019-07-01 18:13:00 -0400

+

2019-07-01 18:13:00 -0400 + +


@@ -87,21 +94,17 @@
-
-
+ + +
+
+ + Site design by: Evan Pratten | + + This site was last updated at: 2019-08-24 15:35:35 -0400 +
- @@ -142,11 +145,21 @@ + + \ No newline at end of file diff --git a/_site/blog/2019/07/06/scrapingfrcgithub.html b/_site/blog/2019/07/06/scrapingfrcgithub.html index 22047d3..5e8cef8 100644 --- a/_site/blog/2019/07/06/scrapingfrcgithub.html +++ b/_site/blog/2019/07/06/scrapingfrcgithub.html @@ -9,6 +9,7 @@ + @@ -46,10 +47,16 @@
-

Scraping FRC team's GitHub accounts to gather large amounts of data

-

There are a lot of teams...

+

Scraping FRC team's GitHub accounts to gather large amounts of data + +

+

There are a lot of teams... + +


-

2019-07-06 11:08:00 -0400

+

2019-07-06 11:08:00 -0400 + +


@@ -160,21 +167,17 @@
-
-
+ + +
+
+ + Site design by: Evan Pratten | + + This site was last updated at: 2019-08-24 15:35:35 -0400 +
- + \ No newline at end of file diff --git a/_site/blog/2019/07/13/lookback-gmad.html b/_site/blog/2019/07/13/lookback-gmad.html index a297ede..884f0a5 100644 --- a/_site/blog/2019/07/13/lookback-gmad.html +++ b/_site/blog/2019/07/13/lookback-gmad.html @@ -9,6 +9,7 @@ + @@ -46,10 +47,16 @@
-

Taking a look back at GMAD

-

Fun, Simple, and Quick

+

Taking a look back at GMAD + +

+

Fun, Simple, and Quick + +


-

2019-07-13 10:43:00 -0400

+

2019-07-13 10:43:00 -0400 + +


@@ -81,21 +88,17 @@
-
-
+ + +
+
+ + Site design by: Evan Pratten | + + This site was last updated at: 2019-08-24 15:35:35 -0400 +
- + \ No newline at end of file diff --git a/_site/blog/2019/07/15/mindmap.html b/_site/blog/2019/07/15/mindmap.html index 272a299..332334d 100644 --- a/_site/blog/2019/07/15/mindmap.html +++ b/_site/blog/2019/07/15/mindmap.html @@ -9,6 +9,7 @@ + @@ -46,10 +47,16 @@
-

Mind map generation with Python

-

Step 1

+

Mind map generation with Python + +

+

Step 1 + +


-

2019-07-15 14:38:00 -0400

+

2019-07-15 14:38:00 -0400 + +


@@ -173,21 +180,17 @@
-
-
+ + +
+
+ + Site design by: Evan Pratten | + + This site was last updated at: 2019-08-24 15:35:35 -0400 +
- + \ No newline at end of file diff --git a/_site/blog/2019/08/10/why-i-carry-nfc.html b/_site/blog/2019/08/10/why-i-carry-nfc.html index 2749e59..0d2982c 100644 --- a/_site/blog/2019/08/10/why-i-carry-nfc.html +++ b/_site/blog/2019/08/10/why-i-carry-nfc.html @@ -9,6 +9,7 @@ + @@ -45,10 +46,16 @@
-

My weird piece of EDC

-

Reasons why I always carry NFC cards with me

+

My weird piece of EDC + +

+

Reasons why I always carry NFC cards with me + +


-

2019-08-10 16:57:00 -0400

+

2019-08-10 16:57:00 -0400 + +


@@ -93,21 +100,17 @@
-
-
+ + +
+
+ + Site design by: Evan Pratten | + + This site was last updated at: 2019-08-24 15:35:35 -0400 +
- @@ -148,11 +151,21 @@ + + \ No newline at end of file diff --git a/_site/blog/2019/08/12/setting-up-ja.html b/_site/blog/2019/08/12/setting-up-ja.html index 6c9ff0d..f3d30c1 100644 --- a/_site/blog/2019/08/12/setting-up-ja.html +++ b/_site/blog/2019/08/12/setting-up-ja.html @@ -9,6 +9,7 @@ + @@ -45,10 +46,16 @@
-

How I set up ひらがな input on my laptop

-

I3wm makes everything 10x harder than it should be

+

How I set up ひらがな input on my laptop + +

+

I3wm makes everything 10x harder than it should be + +


-

2019-08-12 15:40:00 -0400

+

2019-08-12 15:40:00 -0400 + +


@@ -138,21 +145,17 @@ ibus-daemon -drx
-
-
+ + +
+
+ + Site design by: Evan Pratten | + + This site was last updated at: 2019-08-24 15:35:35 -0400 +
- @@ -193,11 +196,21 @@ ibus-daemon -drx + + \ No newline at end of file diff --git a/_site/blog/2019/08/24/shift2.html b/_site/blog/2019/08/24/shift2.html new file mode 100644 index 0000000..74cea42 --- /dev/null +++ b/_site/blog/2019/08/24/shift2.html @@ -0,0 +1,181 @@ + + Evan Pratten + + + + + + + + + + + + + +
+ + + + + + + +
+
+

Keyed data encoding with Python + +

+

XOR is pretty cool + +

+
+

2019-08-24 09:13:00 -0400 + +

+ +
+ +

I have always been interested in text and data encoding, so last year, I made my first encoding tool. Shift64 was designed to take plaintext data with a key, and convert it into a block of base64 that could, in theory, only be decoded with the original key. I had a lot of fun with this tool, and a very stripped down version of it actually ended up as a bonus question on the 5024 Programming Test for 2018/2019. Yes, the key was in fact 5024.

+ +

This tool had some issues. Firstly, the code was a mess and only accepted hard-coded values. This made it very impractical as an every-day tool, and a nightmare to continue developing. Secondly, the encoder made use of entropy bits, and self modifying keys that would end up producing encoded files >1GB from just the word hello.

+ +

Shift2

+

One of the oldest items on my TODO list has been to rewrite shift64, so I made a brand new tool out of it. Shift2 is both a command-line tool, and a Python3 library that can efficiently encode and decode text data with a single key (unlike shift64, which used two keys concatenated into a single string, and separated by a colon).

+ +

How it works

+

Shift2 has two inputs. A file, and a key. These two strings are used to produce a single output, the message.

+ +

When encoding a file, shift2 starts by encoding the raw data with base85, to ensure that all data being passed to the next stage can be represented as a UTF-8 string (even binary data). This base85 data is then XOR encrypted with a rotating key. This operation can be expressed with the following (this example ignores the base85 encoding steps):

+
file = "Hello reader! I am some input that needs to be encoded"
+key = "ewpratten"
+
+message = ""
+
+for i, char in enumerate(file):
+    message += chr(
+        ord(char) ^ ord(key[i % len(key) - 1])
+    )
+
+
+ +

The output of this contains non-displayable characters. A second base85 encoding is used to fix this. Running the example snippet above, then base85 encoding the message once results in:

+
CIA~89YF>W1PTBJQBo*W6$nli7#$Zu9U2uI5my8n002}A3jh-XQWYCi2Ma|K9uW=@5di
+
+ +

If using the shift2 commandline tool, you would see a different output:

+
B2-is8Y&4!ED2H~Ix<~LOCfn@P;xLjM_E8(awt`1YC<SaOLbpaL^T!^W_ucF8Er~?NnC$>e0@WAWn2bqc6M1yP+DqF4M_kSCp0uA5h->H
+
+ +

This is for a few reasons. Firstly, as mentioned above, shift2 uses base85 twice. Once before, and once after XOR encryption. Secondly, a file header is prepended to the output to help the decoder read the file. This header contains version info, the file length, and the encoding type.

+ +

Try it yourself

+

I have published shift2 on pypi.org for use with PIP. To install shift2, ensure both python3 and python3-pip are installed on your computer, then run:

+
# Install shift2
+pip3 install shift-tool
+
+# View the help for shift2
+shift2 -h
+
+ +

Future plans

+

Due to the fact that shift2 can also be used as a library (as outlined in the README), I would like to write a program that allows users to talk to eachother IRC style over a TCP port. This program would use either a pre-shared, or generated key to encode / decode messages on the fly.

+ +

If you are interested in helping out, or taking on this idea for yourself, send me an email.

+ +
+
+ +
+ + +
+
+ + Site design by: Evan Pratten | + + This site was last updated at: 2019-08-24 15:35:35 -0400 + +
+ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/_site/blog/index.html b/_site/blog/index.html index f6d4df2..592aee8 100644 --- a/_site/blog/index.html +++ b/_site/blog/index.html @@ -9,6 +9,7 @@ + @@ -43,36 +44,67 @@
--> - +
-
+

Blog Posts


- - - - -
-
-
- Featured Post -
-
-
How I set up ひらがな input on my laptop
-

I3wm makes everything 10x harder than it should be

- View -
-
-
-
-
-
+ + + +
+
+ + Site design by:
Evan Pratten | + + This site was last updated at: 2019-08-24 15:35:35 -0400 +
- + \ No newline at end of file diff --git a/_site/index.html b/_site/index.html index b9212b6..141a98c 100644 --- a/_site/index.html +++ b/_site/index.html @@ -9,6 +9,7 @@ + @@ -40,8 +41,8 @@
-
-
+
+
@@ -91,22 +92,19 @@
+
-
-
+ + +
+
+ + Site design by: Evan Pratten | + + This site was last updated at: 2019-08-24 15:35:35 -0400 +
- @@ -193,6 +190,15 @@ +