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.
Links
- http://www.richkni.co.uk/php/crypta/freq.php
- https://en.wikipedia.org/wiki/Frequency_analysis
- https://crypto.interactive-maths.com/frequency-analysis-breaking-the-code.html
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
Set 1
Base 64 - RFC 4648