One Time Pad/ Vernam Cipher: Attacks Impossible For Sufficiently Long PT Msgs
One Time Pad/ Vernam Cipher: Attacks Impossible For Sufficiently Long PT Msgs
Is perfect secrecy possible? If each PT symbol encrypted with a randomly chosen key (Shannon) This idea used by Vernam to create One time pad Key has same length as the PT and key chosen randomly Known as Perfect Cipher
Can be used to store some secret data in a public computer Scenario: President of a country needs to send a secret msg to president of another country
Send a trusted envoy with the random key b4 sending the msg
ROTOR CIPHER
Basic idea: mono aphabetic substitution, but each time the (PT char to CT char) mapping is changed
ROTOR CIPHER
Initial position = Secret Key The first PT char is encrypted with the initial setting, the second with the setting after first rotation, and so on.. If the rotor is stationary then ?? Encrypt bee with the given key
TRANSPOSITION CIPHERS
CT msg = MEMATEAKETETHPR Cryptanalysis very easy => 2 rows only & no key
Another method
Cryptanalysis
Idea : divide PT chars into groups of predetermined size called 'blocks' and use a permutation key Eg:- Consider enemy attacks tonight Group chars into blocks of size 5 (an agreed-upon value by both Alice and Bob) Use a bogus char (say z) to fill the last block Result: z enemy attac kston ight
Permutation key
Encryption
3 1
1 2
4 3
5 4
2 5
Decryption
Cipher text
PT msg written into a table row by row Permutation done by reordering cols (based on key) The new table read col by col ( ==> CT msg )
Keys
Table is not necessary Eg: enc key : 3 1 4 5 2 & dec key: 2 5 1 3 4 Write index below Swap values with indices Sort values in ascending order of index Try for: 2 6 3 1 4 7 5
Key as a matrix
Cryptanalysis
Trans. Ciphers don't change the frequency of chars But frequency of digrams & trigrams hidden Brute force attack extremely difficult
Literature divides symmetric ciphers into two broad categories stream ciphers and block ciphers Stream cipher encryption and decryption done one symbol at a time Block ciphers enc and dec done on a bolck of symbos at a time
Stream Cipher
Stream Cipher
Stream cipher
Examples
Additive cipher
K = (k, k, k, . . . ) K = mapping of the current PT char to CT char, . . . K = (k1, k2, . . . , km, k1, k2, . . .)
Vigenere cipher
Block cipher
Block cipher
Examples
Idea:
Blocks of PT encrypted individually Use a stream of keys to encrypt blocks (separate key for each block)
Cipher is a block cipher when looking at the individual blocks Cipher is a stream cipher when looking at the whole msg considering each block as a single unit