230 likes | 235 Views
Learn about transpositions, a method of encryption where letters are rearranged, and how it achieves the goals of confusion and diffusion in securing messages.
E N D
2.4 Transpositions (Permutations) • Transposition: an encryption in which the letters of the message are rearranged • Also known as permutations • Compare the goals: • Substitution confusion • Transposition diffusion V. Sawma, Computer Security
Confusion vs Diffusion • Confusion: making it difficult to determine how a message and key were transformed into ciphertext. • Changing one character from plain text does NOT reveal encryption algorithm and/or key. • Diffusion: spreading the information from the message or the key out widely across the ciphertext. • Changing one character from plain text affects MANY parts of cipher text. • See p.62 for more discussions. V. Sawma, Computer Security
Columnar Transpositions • A rearrangement of the plaintext characters into columns. • The ciphertext is generated from the columns. • Example: p.53 V. Sawma, Computer Security
Complexity of Columnar Transpositions • Time: proportional to the length of the message, that is, O(n) or at the order of function n. • Space: depends on the length of the message. • Output cannot be produced until all characters of the message have been read. • Initial delay varies, depending on the length of the message. C.f., constant initial delay in the previous (substitution) algorithms. V. Sawma, Computer Security
Digrams, Trigrams, & Other Patterns • Digrams: groups of two letters • Trigrams: groups of three letters • Table 2-2 (p.54): Most common English Digrams and Trigrams. V. Sawma, Computer Security
Digrams, Trigrams, and Other Patterns Pair of adjacent letters-digrams Group of three letters-trigrams V. Sawma, Computer Security
Cryptanalysis by Digram Analysis • To compute the letter frequencies • Clue: The fact that all letters appear with their normal frequencies implies that a transposition has been performed. • To find where in the ciphertext a pair of adjacent columns lies (that is, to determine the width of a row in the original table used for encryption) • The ‘moving window’ method (next) V. Sawma, Computer Security
Cryptanalysis by Digram Analysis • Positions of adjacent letters in Ciphertext V. Sawma, Computer Security
The ‘moving window’ method • Pick a window size, say n. • Compare every Ci, 1 i n,in the window to Ci+n and determine if the two form a common digram • Do most of the digrams look reasonable? • Example: Figure 2-5, p.56 V. Sawma, Computer Security
Moving Window Example N I W H A A S O L R S T O T S S O H O A V. Sawma, Computer Security
Good Encryption Algorithms • The level of secrecy needed depends on the effort • The keys and encryption algorithm should be free from complexity • The algorithm and the key implementation should be easy • Errors occurred during encryption should not effect the rest of the message • Size of the cipher text message should not be larger than the original message V. Sawma, Computer Security
Trustworthy Encryption Systems • It should be based on sound mathematics • It should have been analyzed by competent experts and found to be sound • It has stood the “test of time” V. Sawma, Computer Security
Stream versus Block Ciphers • Stream ciphers: The plaintext characters are encoded by the sender letter-by-letter as sent to the receiver. • Example: substitution ciphers • Block ciphers: Blocks of plaintext are encoded into ciphertext before being sent. • Example: columnar transposition V. Sawma, Computer Security
Keystream ISSOPMI wdhuw…. Y Plaintext Ciphertext Encryption Stream Ciphers • One symbol of plaintext is converted immediately into a symbol of ciphertext • Substitutions are examples of stream ciphers V. Sawma, Computer Security
Stream Ciphers • Fast • Little storage space • Low error propagation, meaning that encoding errors affect just one character in the ciphertext • low diffusion, meaning that individual characters in the ciphertext can be analyzed using frequency distribution, digram analysis, IC and the Kasiski method • Susceptibility to malicious insertions and modifications V. Sawma, Computer Security
KN OI TP YR CN ES Keystream IH Plaintext Ciphertext ba qc kd em mc Encryption Block Ciphers • Encrypts a group of plaintext symbols at a time • Transpositions are examples of block ciphers po V. Sawma, Computer Security
Block Ciphers • Slow • Require more storage space • Error propagation • High diffusion • High immunity to insertions V. Sawma, Computer Security
4 cryptanalysis cases & 5 approaches • Ciphertext only • Ciphertext-only attack • Full or partial plaintext • Known plaintext attack • Probable plaintext analysis • Ciphertext of any plaintext • Chosen plaintext attack • Algorithm + Ciphertext • Chosen ciphertext attack V. Sawma, Computer Security
Summary: Transpositions • It is a method where letters of the message are rearranged • Goal here is diffusion rather than confusion • Information is spread widely across the ciphertext • Columnar transposition is an easy one • Characters are rearranged into columns V. Sawma, Computer Security
Summary: Transpositions (Cont’d) • Encipherment/Decipherment Complexity • Algorithm is constant in the amount of work per character • Time is proportional to length of message • Space required is directly proportional to message length • Output characters cannot be produced until all characters are read in • Delay depends on the length of the message • Not appropriate for long messages V. Sawma, Computer Security
Summary • Two basic methods of encryption: substitutions and transposition • Common cryptanalytic tools: • Frequency distribution, Digram/trigram study, IC, Repeated patterns, Probable letters • Four cryptanalysis cases & 5 approaches V. Sawma, Computer Security
Summary: A crypto-analytic’s job • Compute Index of coincidence • If >0.068 then (monoalphabetic) • Compute frequency of distribution • If highest freq is for letter ‘e’ then Transposition • Else substitution (either Caesar or Scrambled Permutation) • Else Polyalphabetic • Use Kasiski’s method to determine key length • Group Cipher text in columns (based on chosen Key Length) • Solve for each column as Monoalphabetic V. Sawma, Computer Security