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 @@ -
2019-04-30 14:32:00 -0400
+2019-04-30 14:32:00 -0400 + +
2019-05-27 05:22:00 -0400
+2019-05-27 05:22:00 -0400 + +
2019-06-12 09:09:00 -0400
+2019-06-12 09:09:00 -0400 + +
2019-06-16 11:51:00 -0400
+2019-06-16 11:51:00 -0400 + +
2019-06-17 06:20:00 -0400
+2019-06-17 06:20:00 -0400 + +
2019-06-21 11:14:00 -0400
+2019-06-21 11:14:00 -0400 + +
2019-06-23 18:04:00 -0400
+2019-06-23 18:04:00 -0400 + +
2019-06-24 17:36:00 -0400
+2019-06-24 17:36:00 -0400 + +
2019-06-26 11:48:00 -0400
+2019-06-26 11:48:00 -0400 + +
2019-06-27 13:16:00 -0400
+2019-06-27 13:16:00 -0400 + +
2019-06-27 03:00:00 -0400
+2019-06-27 03:00:00 -0400 + +
2019-07-01 18:13:00 -0400
+2019-07-01 18:13:00 -0400 + +
2019-07-06 11:08:00 -0400
+2019-07-06 11:08:00 -0400 + +
2019-07-13 10:43:00 -0400
+2019-07-13 10:43:00 -0400 + +
2019-07-15 14:38:00 -0400
+2019-07-15 14:38:00 -0400 + +
2019-08-10 16:57:00 -0400
+2019-08-10 16:57:00 -0400 + +
2019-08-12 15:40:00 -0400
+2019-08-12 15:40:00 -0400 + +
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.
+ +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).
+ +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.
+ +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
+
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.
+ +I3wm makes everything 10x harder than it should be
- View -XOR is pretty cool
+I3wm makes everything 10x harder than it should be
+ + + + + + + @@ -87,7 +119,7 @@ - + @@ -102,7 +134,7 @@ - + @@ -117,7 +149,7 @@ - + @@ -132,7 +164,7 @@ - + @@ -147,7 +179,7 @@ - + @@ -162,7 +194,7 @@ - + @@ -177,7 +209,7 @@ - + @@ -192,7 +224,7 @@ - + @@ -207,7 +239,7 @@ - + @@ -222,7 +254,7 @@ - + @@ -237,7 +269,7 @@ - + @@ -252,7 +284,7 @@ - + @@ -267,7 +299,7 @@ - + @@ -282,7 +314,7 @@ - + @@ -297,7 +329,7 @@ - + @@ -312,7 +344,7 @@ - + @@ -330,21 +362,18 @@\ 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 @@ +
\ 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 @@ +
\ 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 @@ +
\ 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 @@ +
\ 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 @@ +
\ 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 @@ +
\ 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 @@ +
\ 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 @@ +
\ 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 @@ +
\ 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 @@ +
\ 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 @@ +
\ 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 @@ +
\ 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 @@ +
\ 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 @@ +
\ 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 @@ +
\ 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 @@ +
\ 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 @@ +
\ 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 @@ +
+
+ + + + + + + + + + + +
\ 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 @@ +
\ 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 @@ +