CRYPTO

Cypherpunk Underground Chapter 8 - Introduction to Cryptography

"An introduction to cryptography in the Cypherpunk Underground, exploring substitution ciphers, ROT ciphers, Vigenère cipher, and online encryption tools."

July 26, 2022· 5 min read
387 score

Cypherpunk Underground Chapter 8 - Introduction to Cryptography

"We the Cypherpunks are dedicated to building anonymous systems. We are defending our privacy with cryptography, with anonymous mail forwarding systems, with digital signatures, and with electronic money." -Eric Hughes in A Cypherpunk's Manifesto

Welcome back Punks to another chapter of Cypherpunk Underground: Your guide to surviving in the dystopian surveillance state. This chapter is about basic cryptography and resources available to encrypt and decrypt messages.

History of Cryptography

Cryptography is defined as : The process or skill of communicating in or deciphering secret writings or ciphers. The use of cryptography dates back to the earliest ancient civilizations. One of the first known examples of cryptography is from Mesopotamia in which stone tablets dating to 1900 BC were found with the encrypted recipe for a trade secret of the time, pottery glaze. Ancient civilizations of India, Greece, and Hebrews were have also been discovered to have used cryptography for the use of military communications, secret communication of oppressed groups, and even in the use of love letters.


Substitution Ciphers

A substitution cipher is a method of encrypting in which units of plaintext are replaced with the ciphertext, in a defined manner, with the help of a key.


Simple Substitution Ciphers

Substitution of single letters separately—simple substitution—can be demonstrated by writing out the alphabet in some order to represent the substitution. This is termed a substitution alphabet.


Simple Substitution Cipher: Atbash Cypher

The Atbash Cipher is one of easiest substitution ciphers to use. Sometimes called mirror code, it's believed to be the first cipher ever used, and its use pre-dates Egyptian examples of encryption. To use Atbash, you simply reverse the alphabet, so A encodes to Z, B encodes to Y, etc...

For example: XBKSVIKFMPH DIRGV XLWV = CYPHERPUNKS WRITE CODE

Tip: Frequency anaylysis is a skill often used in decoding cryptography. The most commonly used letters in English are E, T and A. When these have been encrypted using Atbash, they become V, G and Z. If you come across an unknown cipher text that has a lot of V's, likely you are looking at an Atbash cipher.


Simple Substitution Cipher: ROT13, ROT47 & ROT5

Shorthand for "rotation 13" ROT13 is a shift cipher a simple kind of encryption where the ciphertext is created by taking the plain text and shifting by a certain number of letters. The cool thing about ROT13 is that it doesn't matter which direction you shift (forward or backwards) because 13 is half of the 26 letter english alphabet. It is common to see ROT13 and its variations in hacking CTF puzzles.

For example: V NZ FNGBFUV ANXNZBGB = I AM SATOSHI NAKAMOTO

ROT47

ROT47 is a little more complicated. It uses the 94 ASCII characters from ! through to ~ that are found on the QWERTY keyboard.

For Example: !#x'pr* x$ p w&|p} #xvw% = PRIVACY IS A HUMAN RIGHT

ROT5

ROT5 is similar to ROT13, but instead of shifting letters 13, you shift numbers 5.

If you would like to encrypt using ROT you can come up with your own "shifts" just let the reciever know your shift and you can set up a simple encryption. This type of arbitrary selection of shifts is also known as Caesar Ciphers.


Simple Substitution Cipher: Keyed Caesar Cypher AKA Monoalphabetic Substitution Cipher

A more secure version than the ROT style shift cyphers is the Keyed Caesar Cipher.To set up a Keyed Caesar you write a passphrase that has no duplicate letters, you then write the remaining letters of the alphabet. Finally, all letters are shifted like in an ordinary Caesar cipher. This is more secure due to the more complex pattern of the letters.

For Example: With the key of ZCASH the alphabet changes from ABCDEFGHIJKLMNOPQRSTUVWXYZ to ZCASHBDEFGIJKLMNOPQRTUVWXY. CYPHERPUNK UNDERGROUND = AXNEHPNTLI TLSHPDPMTLS


Specialty Cipher: Vigenère Cipher

Invented by the frenchman Giovan Battista Bellaso in 1553 this Cipher remained uncracked until 1853 earning the name chiffrage indéchiffrable meaning "the indecipherable cipher". To encrypt, a table of alphabets can be used, termed a tabula recta, Vigenère square or Vigenère table. It has the alphabet written out 26 times in different rows, each alphabet shifted cyclically to the left compared to the previous alphabet, corresponding to the 26 possible Caesar ciphers. At different points in the encryption process, the cipher uses a different alphabet from one of the rows. The alphabet used at each point depends on a repeating keyword. This is the cipher that CPU used in a clue for our CTF.

A simple keyword is used to aid in decryption.

Decryption is performed by going to the row in the table corresponding to the key, finding the position of the ciphertext letter in that row and then using the column's label as the plaintext.

For Example: Using the key of "ZEROCOIN" can decode the message Ygrgj. To solve the message Using the tabula rosa:

Go to the row with the Z (for ZEROCOIN) and see where it interesects with the Y in the column = Z

Go to the row with the E (for ZEROCOIN) and see where it intersects with the G in the column = C

Go to the row with the R (for ZEROCOIN) and see where it intersects with the R in the column = A

Go to the row with the O (for ZEROCOIN) and see where it intersects with the G in the column = S

Go to the row with the C (for ZEROCOIN) and see where it intersects with the J in the column = H


Online tools for Encoding/Decoding and Analysis

Cyberchef.org is a must have bookmark for any Hacker or Cypherpunk. This webapp has dozens of different encryption methods (including all methods covered in this chapter)


Boxentriq

Boxentriq is an outstanding resource for the wannabe cryptographer. Orginally used as a tool kit for the mobile Game Boxentriq: The Initiation, a game based on the real life story of Cicada 3301 This website now serves as a library to dozens of encryption types. A must read for Cypherpunks!


That's enough for now. Stay tuned for upcoming chapters as we dive deeper into this complex topic. If you like this content and have a suggestion on something the Cypherpunk Underground needs to know please leave a message or send a private memo.


zs1pg2luvkqdy5hvlagy9apspw3qhsex0xq9dq3u0mufurk4tyu30can6qj82770kym337gct08qgx


Related Articles