docs.daveops.net

Snippets for yer computer needs

Cryptography

XOR

Frequency analysis

Certain letters show up more frequently in natural language. This leads to cryptographic weakness in classic ciphers

grep -o . file | sort | uniq -c

“ETAOIN SHRDLU” is a phrase to get the 12 most common characters in English.

Common pairs are consonants TH and vowels EA. Others are OF, TO, IN, IT, IS, BE, AS, AT, SO, WE, HE, BY, OR, ON, DO, IF, ME, MY, UP.

Common pairs of repeated letters are SS, EE, TT, FF, LL, MM and OO.

Common triplets of text are THE, EST, FOR, AND, HIS, ENT or THA.

Cryptographic hashes

Dual_EC_DRBG

The Many Flaws of Dual_EC_DRBG The Strange Story of Extended Random

Cryptographic Hashing

https://valerieaurora.org/hash.html

Cryptopals

https://cryptopals.com

Set 1

Base 64 - RFC 4648