Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cryptography (continued). Enabling Alice and Bob to Communicate Securely m m m Alice Eve Bob m.

Similar presentations


Presentation on theme: "Cryptography (continued). Enabling Alice and Bob to Communicate Securely m m m Alice Eve Bob m."— Presentation transcript:

1 Cryptography (continued)

2 Enabling Alice and Bob to Communicate Securely m m m Alice Eve Bob m

3 Kerckhoff’s Principle Bob needs two things to decrypt the ciphertext – the decryption algorithm and the key The security of the encryption method depends only on the secret of the key, not on the security of the algorithm(s) –Algorithms are hard to change whereas key are not –Protects the longevity of the algorithm –If the cryptographic systems is built for multiple (millions of) users everyone uses the same algorithm but different keys Public algorithms are amenable to more robust testing Moral – Don’t trust proprietary crypto systems

4 Four Issues Confidentiality Authentication Integrity Non-repudiation

5 Confidentiality Assures that encrypted files can only be decrypted by those who hold the secret key What’s missing? –Who is on the other end of the line? –Has the file you received been tampered with?

6 Authentication Who is on the other end? Challenge response 1)Pick a random number 2)Challenge the computer sending you a message to encrypt it using the secret key 3)If successful, authentication has occurred Note re. the randomness of random numbers

7 Integrity Also known as message authentication and digital fingerprinting Message Authentication Codes (MACs) –Use a hashing algorithm –Use one way compression so for example a 50MB document produces a 8B MAC –Avalanche effect

8 Non-repudiation Assurance that a sender cannot deny a file was sent Not possible with a shared secret key

9 Some Attacks Ciphertext only Known plaintext Chosen plaintext Chosen ciphertext Birthday and Meet in the Middle attacks

10 Block Ciphers An encryption function for fixed sized blocks (today 128 bits). Blocks are split into words, usually 32 bits Common key sizes – 128 and 256 bits Algorithms consist of multiple rounds of operations on words, e.g. Boolean operations AND, XOR, NOT

11 Block Cipher Examples DES – 64 bit block size, 56 bit key AES – NIST RFP from Crypto community. Winner was Rijndael Twofish – AES finalist Serpent – AES finalist All support 128, 192, and 156 bit keys. Larger than 128 bits is necessary to avoid collision attacks.

12 Hashing A hash uses a secret key and an algorithm to create a new value from a message of a fixed size. Also known as a message digest. Should be a one way function. Should have collision resistance.

13 Hashing Example Example – key = 194, plain text = 45678, Multiply 45678 by 194 = 8861532, Reverse the number = 2351688, Take the 5 most significant digits = 23516 Send the hash (23516) along with the message (45678)

14 Secret Key Exchange Distribution and escrow Vulnerability of a trusted 3 rd party

15 Public Exchange of Secret Keys Exchange a file of (key, serial #) pairs 1)Pick one 2)Send serial number 3)Use associated key to encrypt and decrypt Encrypt the file using a single key and a known algorithm 1)Decrypt the file 2)Pick a pair 3)Send serial # 4)Use associated key to encrypt and decrypt

16 Public Exchange of Secret Keys (cont.) Encrypt each pair in the file separately 1)Pick a pair and decrypt it 2)Send the serial # 3)Use the associated key to encrypt and decrypt

17 Asymmetric Ciphers (e.g. Diffie-Hellman) Keys for encryption and decryption are different, but related A key made publicly is shared How does it work?

18 Public Key Encryption Math Inverse operations Inverse numbers Circle analogy Modular arithmetic Primes and relative primes

19 PK Math 1)Pick p and q that are relatively prime 2)n = p*q 3)Find d and e where d*e = (p-1)(q- 1)+1 4)The receiver makes n and e public 5)Encryption m e mod n = c 6)Decryption c d mod n = m

20 PK Example 1)p = 17, q = 5, n = 85 2)d * e = (17 – 1)(5 – 1) + 1 = 65, d = 13, e = 5 3)Encrypt the letter x, x = 24

21 PGP Developed by Phil Zimmerman Used RSA patented algorithms to produce freeware strong encryption Copied widely around the world MIT published PGP code and made it available on their websites

22 Steganography Steganography means hidden writing Hiding a message in an image Ancient technique

23 Steganography Steganography - hiding a message in an image or a sound file Every image is made of pixels There often is one byte per pixel for each color: red, green, and blue One bit in each byte is the least significant— changing it will be indistinguishable to the human eye

24 Uses of Steganography Al-Qaida Digital Watermarking Using steganography to hide identifying information in a document To prove copyright ownership To identify different copies of a document

25 Replay Attacks –Retransmit an intercepted message –Message is encrypted so that replay attacker cannot read it Why Replay Attacks –Repetition might work—for instance, replaying an encrypted username and password might result in access to a poorly designed system

26 Replay Attacks Preventing Replay Attacks –Insert a time stamp in messages and accept messages only if they are very recent –Insert a sequence number in each message –Insert a nonce (random number selected for the occasion) in a request message; only accept a reply message with the same nonce. Other party does not accept a request message with a previous nonce


Download ppt "Cryptography (continued). Enabling Alice and Bob to Communicate Securely m m m Alice Eve Bob m."

Similar presentations


Ads by Google