- If you haven't done so already, take a look at the Java Crypto Extensions (JCE).
- SSL takes about 5 quick round of session setup to produce a shared key.
- Shared key relies upon symmetric ciphers for privacy and integrity.
- DES, AES, RC5... provide confidentiality
- HMAC provides integrity.
- Crypto is used with Windows' Encrypted File System.
- Crypto is used in authorization and password management.
- Wireless, 802.11b, uses the poorly designed WEP for Crypto.
- Avoid "Security by Obscurity".
- Read "The CodeBreakers" by David Kahn to get the history of Crypto.
- Ciphers - i.e. Encryption happens like this C = E(k, m)
Substitution cypher
- is the world's oldest cipher where K = 26!
26! ~= 2^88
Encrypting plaintext with the substitution m = "bcza"
Ciphertext C = E(k, m) ...
Of course, you can break substitution cyphers by noting letter frequecies i.e. "e" occurs 12.7% of the time ., "t" = 9.1%, "a" = 8.1%
By extrapolation, you can look at frequency of doubles, i.e "th", "he", "an",...
The only thing an attacker would need to know is the cyphertext.
Vigener Cipher
Replicate the secret key over the message until the entire message is covered.
Secret Key: CRYPTOCRYPTOCRYPTOCRY
Message: Chad Salinas Tech+Finance Blog
________________________________
CipherText:
Easy to break by looking at the 6th letter in the ciphertext and do the same sort of frequency analysis as with substitution cypher.
Think about the intial configuration of the rotors of an enigma machine.
Natural languages have a fair amount of natural redundancy.
DES
The commercial world needed to wait until DES came out in 1974 for the first "good" crypto.
Cipher is a pair of efficient algorithms takes a key and a message and outputs a CipherText.
Constraint is that encryption and decryption are inverse functions.
nb. Encryption algorithm is often randomized where as decryption algorithm is ALWAYS deterministic.
"Secure" Cipher - One Time Pad (OTP) 1917
C = E(k, m) = m XOR K
D(k, C) = K XOR CT
The problem is that the keys, being comprised of 0's and 1's, are too long.
What is a "good" cipher?
Claude Shannon (1949), the father of information theory, defined what constitutes a "good" cipher. CipherText (CT) does not reveal any information about the PlainText (PT).
Given a CT, no adversary can if the message came from m1 or m2. C is equally likely from m1, m2.
What about length of messages? OTP encrypts fixed-length messages... a bit of a disclaimer.
Lemma: OTP has perfect secrecy.
Proof: Pr[ E(K, M0) = C] = ((# of keys k encrypting to C) / (Total key space))
...
Only 1 key maps m to C!
Does a cipher exist that has smaller keys?
K >= 2^n
key length >= message length
Enter the Stream Cipher!
Leverage a pseudo-random pad as opposed to OTP
Run the key through a pseudo-random-generator (PRG)
PRG(k) => result
XOR the result with the message to get the CT
PRG is a deterministic public function.
You cannot use Two-Time Pad as adversaries can XOR two messages together and recover m1 and m2... completely broken.
Problems with the OTP and Stream Ciphers:
Maleability Attack
No comments:
Post a Comment