elementary cryptography concepts of encryption symmetric (secret key) encryption (des &...

16
Elementary Cryptography Elementary Cryptography Concepts of encryption Concepts of encryption Symmetric (secret key) Encryption Symmetric (secret key) Encryption (DES & AES) (DES & AES) Asymmetric (public key) Asymmetric (public key) Encryption Encryption (RSA) (RSA) Key exchange protocols and Key exchange protocols and certificates certificates Digital Signatures Digital Signatures Cryptographic hash functions Cryptographic hash functions

Upload: imogen-craig

Post on 03-Jan-2016

257 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Elementary Cryptography  Concepts of encryption  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public key) Encryption (RSA)(RSA)

Elementary CryptographyElementary CryptographyConcepts of encryptionConcepts of encryptionSymmetric (secret key) Encryption Symmetric (secret key) Encryption

•(DES & AES)(DES & AES)Asymmetric (public key) Encryption Asymmetric (public key) Encryption

•(RSA)(RSA)Key exchange protocols and Key exchange protocols and certificatescertificatesDigital SignaturesDigital SignaturesCryptographic hash functionsCryptographic hash functions

Page 2: Elementary Cryptography  Concepts of encryption  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public key) Encryption (RSA)(RSA)

Elementary CryptographyElementary CryptographyTerminology & BackgroundTerminology & Background

Sender (A), Recipient (B), Transmission Sender (A), Recipient (B), Transmission media (T)media (T)

Interceptor / intruder (C) (availability)Interceptor / intruder (C) (availability) C might block message from reaching RC might block message from reaching R C might intercept message C might intercept message

(confidentiality)(confidentiality) C might modify message (integrity)C might modify message (integrity) C might fabricate an authentic-looking C might fabricate an authentic-looking

message (integrity)message (integrity)

Page 3: Elementary Cryptography  Concepts of encryption  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public key) Encryption (RSA)(RSA)

Terminology & BackgroundTerminology & Background

Encryption – process of encoding a Encryption – process of encoding a messagemessage

Decryption – transforming encoded Decryption – transforming encoded message back to normalmessage back to normal

Encrypt – encode , encipherEncrypt – encode , encipher Decrypt – decode, decipherDecrypt – decode, decipher Cryptosystem – system for encryption and Cryptosystem – system for encryption and

decryptiondecryption Plaintext – original form of messagePlaintext – original form of message Ciphertext – encoded form of messageCiphertext – encoded form of message

Page 4: Elementary Cryptography  Concepts of encryption  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public key) Encryption (RSA)(RSA)

Terminology & BackgroundTerminology & Background Algorithms – rules for encryption and decryptionAlgorithms – rules for encryption and decryption Key – value used to encrypt messageKey – value used to encrypt message C = E(K, P) C = E(K, P) where P=plaintext, K = key, E = encryption algorithms, where P=plaintext, K = key, E = encryption algorithms,

and C = ciphertextand C = ciphertext Symmetric encryption P = D(K, E(K,P))Symmetric encryption P = D(K, E(K,P)) Asymmetric encryption P = D(KAsymmetric encryption P = D(KDD, E(K, E(KEE,P)),P)) Keyless cipherKeyless cipher Cryptography (hidden writing) – uses encryption to hide Cryptography (hidden writing) – uses encryption to hide

messagemessage Cryptanalysis – attempts to find meanings in encrypted Cryptanalysis – attempts to find meanings in encrypted

messagesmessages Cryptology – study of encryption and decryptionCryptology – study of encryption and decryption

Page 5: Elementary Cryptography  Concepts of encryption  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public key) Encryption (RSA)(RSA)

Types of EncryptionTypes of Encryption

Substitution – one or more characters Substitution – one or more characters are replaced with anotherare replaced with another

Transpositions (permutations) – order Transpositions (permutations) – order of characters is rearrangedof characters is rearranged

Hybrid – combinations of the two Hybrid – combinations of the two typestypes

Page 6: Elementary Cryptography  Concepts of encryption  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public key) Encryption (RSA)(RSA)

Substitution CiphersSubstitution Ciphers

Caesar CipherCaesar Cipher• Each letter is translated a fixed number Each letter is translated a fixed number

of positions in the alphabetof positions in the alphabet

• CCii = E(p = E(pii) = p) = pii + 3 + 3

• Plaintext Plaintext A B C D E F G H I J K L …A B C D E F G H I J K L …• Ciphertext Ciphertext d e f g h i j k l m n o …d e f g h i j k l m n o …• Easy to perform; easy to breakEasy to perform; easy to break• Look for double letters and then use Look for double letters and then use

common words with double letterscommon words with double letters

Page 7: Elementary Cryptography  Concepts of encryption  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public key) Encryption (RSA)(RSA)

Other Substitution CiphersOther Substitution Ciphers

Use a Use a keykey to scramble the letters to scramble the letters A B C D E F G H I J K L M N O …A B C D E F G H I J K L M N O … c i p h e r s a b d f g j k l …c i p h e r s a b d f g j k l …

Rearrange using a fixed distance Rearrange using a fixed distance between letters (e.g. every 3between letters (e.g. every 3rdrd))

A B C D E F G H I J K L M N O …A B C D E F G H I J K L M N O … a d g j m p s v y b e h k n r …a d g j m p s v y b e h k n r …

Page 8: Elementary Cryptography  Concepts of encryption  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public key) Encryption (RSA)(RSA)

Complexity of Substitution Complexity of Substitution Encryption and DecryptionEncryption and Decryption

Substitution encryption algorithms Substitution encryption algorithms can be performed by direct lookup in can be performed by direct lookup in tables and are O(n) algorithmstables and are O(n) algorithms

Page 9: Elementary Cryptography  Concepts of encryption  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public key) Encryption (RSA)(RSA)

One-Time PadsOne-Time Pads The pad consists of a large number of The pad consists of a large number of

pages where each page contains a non-pages where each page contains a non-repeating keyrepeating key

The sender would write the keys above the The sender would write the keys above the message (e.g. a 300 character message message (e.g. a 300 character message would require 30 pages of 10 character would require 30 pages of 10 character keys)keys)

The message is scrambled using a The message is scrambled using a Vigenere tableauVigenere tableau built from the message built from the message and keyand key

Problem is synchronizing the receiver’s Problem is synchronizing the receiver’s pad with the senders padpad with the senders pad

Page 10: Elementary Cryptography  Concepts of encryption  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public key) Encryption (RSA)(RSA)

Vernum CipherVernum Cipher

One-time pad consists of an arbitrary long One-time pad consists of an arbitrary long non-repeating sequence of numbers that non-repeating sequence of numbers that are combined with the plaintextare combined with the plaintext

Each plaintext character is represented by Each plaintext character is represented by its numeric equivalent and is added to one its numeric equivalent and is added to one of the random numbers. The ciphertext of the random numbers. The ciphertext character is computed from the sum mod character is computed from the sum mod 2626

Repeated characters are typically Repeated characters are typically represented by different ciphertext represented by different ciphertext characterscharacters

Page 11: Elementary Cryptography  Concepts of encryption  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public key) Encryption (RSA)(RSA)

Book CiphersBook Ciphers

Uses a passage from a book to form the Uses a passage from a book to form the letters at the top of a Vigenere Tableauletters at the top of a Vigenere Tableau

Computes ciphertext character by taking Computes ciphertext character by taking the intersection of the plaintext character the intersection of the plaintext character and corresponding character at that and corresponding character at that position from the book passageposition from the book passage

Relatively easy to break using frequency Relatively easy to break using frequency distributionsdistributions

Page 12: Elementary Cryptography  Concepts of encryption  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public key) Encryption (RSA)(RSA)

Transpositions (Permutations)Transpositions (Permutations) Columnar Transposition rearranging plaintext message into Columnar Transposition rearranging plaintext message into

columns and then reading it row by rowcolumns and then reading it row by row ““YES COMPUTER SECURITY IS FUN” would be writtenYES COMPUTER SECURITY IS FUN” would be written Y M R R SY M R R S E P S I FE P S I F S U E T US U E T U C T C Y NC T C Y N O E U I XO E U I X

is encrypted as “ymrrs epsif suetu ctcyn oeuix” where the X is just filler.is encrypted as “ymrrs epsif suetu ctcyn oeuix” where the X is just filler.

Transposition algorithms require a constant amount of time Transposition algorithms require a constant amount of time per character and are O(n) algorithms, but space required per character and are O(n) algorithms, but space required to store results and delay in waiting for all characters to be to store results and delay in waiting for all characters to be read are dependent on the size of the plaintextread are dependent on the size of the plaintext

Page 13: Elementary Cryptography  Concepts of encryption  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public key) Encryption (RSA)(RSA)

CryptanalysisCryptanalysis Attempt to break a single messageAttempt to break a single message Attempt to recognize patterns in encrypted Attempt to recognize patterns in encrypted

messagesmessages Attempt to infer some meaning without Attempt to infer some meaning without

breaking the encryptionbreaking the encryption Attempt to deduce the keyAttempt to deduce the key Attempt to find weaknesses in the Attempt to find weaknesses in the

implementation or environment of use of implementation or environment of use of encryptionencryption

Attempt to find general weaknesses in an Attempt to find general weaknesses in an encryption algorithmencryption algorithm

Page 14: Elementary Cryptography  Concepts of encryption  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public key) Encryption (RSA)(RSA)

Breakable EncryptionBreakable Encryption

An encryption algorithm is called An encryption algorithm is called breakable when, given enough time and breakable when, given enough time and data, an analyst can determine the data, an analyst can determine the algorithmalgorithm

May be impracticalMay be impractical A 25-character message of just uppercase A 25-character message of just uppercase

letters has 26letters has 262525 (10 (103535) possible ) possible decipherments. A computer performing decipherments. A computer performing 10101010 operations/sec would take 10 operations/sec would take 101111 years years

Page 15: Elementary Cryptography  Concepts of encryption  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public key) Encryption (RSA)(RSA)

Cryptoanalysis of Substitution CiphersCryptoanalysis of Substitution Ciphers

Brute force would require trying Brute force would require trying checking 26! permutations which at checking 26! permutations which at one permutation per microsecond one permutation per microsecond would take over a thousand yearswould take over a thousand years

Look for short words, words with Look for short words, words with repeated patterns, common first and repeated patterns, common first and last letterslast letters

Look at frequency distributionsLook at frequency distributions Could reduce time to hoursCould reduce time to hours

Page 16: Elementary Cryptography  Concepts of encryption  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public key) Encryption (RSA)(RSA)

Cryptoanalysis of Transposition Cryptoanalysis of Transposition AlgorithmsAlgorithms

Compute letter frequencies of Compute letter frequencies of ciphertext; if appear with normal ciphertext; if appear with normal frequency, then assume a frequency, then assume a transposition algorithm was usedtransposition algorithm was used

By shifting text, look for common By shifting text, look for common digrams (e.g EN)and trigrams (e.g. digrams (e.g EN)and trigrams (e.g. ENT)ENT)