Docsity

Cryptanalysis or Code Breaking - Lecture Notes | 22C 169, Study notes of Computer Science

Partial preview of the text

Download Cryptanalysis or Code Breaking - Lecture Notes | 22C 169 and more Study notes Computer Science in PDF only on Docsity!

Jan 24, 2005 -- Lecture 3

22C:

Computer Security

Douglas W. Jones Department of Computer Science

Cryptography

Encryption (Encoding) cleartext plaintext encryption key encrypt cyphertext cyphertext = Fencrypt(plaintext, keyencrypt)

Cryptanalysis or Code Breaking cyphertext contextual knowledge crack decryption key kdecrypt = Fcrack(cyphertext)

In an Ideal world, we hope for for a message of length n Fencrypt = O(n) Fdecrypt = O(n) Fcrack not in computable In the real world, we might accept Fencrypt in Fdecrypt in Fcrack in NP

Public Key Cyphers plaintext key encrypt key decrypt plaintext t = Fdecrypt(Fencrypt(t,k 1 ), k 2 ) <k 1 ,k 2 > = Fkey generate(kmaster)

Example: Julius Caesar's Cypher plaintext = "Veni Vidi Vici" Fencrypt = for each character, add k Fencrypt( plaintext, 4 ) = "Zirm Zmhm Zmgm" Fdecrypt = for each character, subtract k for k = 13 on a 26 letter alphabet, Fencrypt = Fdecrypt Caesar Cypher = simple letter substitution

Example: Exclusive Or Cyphers Fencrypt( t, k ) = t ⊕ k Fdecrypt( t, k ) = t ⊕ k plaintext = 10001011111000 k = 10100101100001 cyphertext = 00101110011001 So long as keys are random and never reused this code cannot be broken!