Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cryptography Lecture 12.

Similar presentations


Presentation on theme: "Cryptography Lecture 12."— Presentation transcript:

1 Cryptography Lecture 12

2 Exam review

3 Historical schemes Shift, Vigenere, etc.
They are all easy to attack They are not used anymore The point of this material was to motivate the need for a more formal treatment

4 Perfect secrecy A more formal approach Definition of perfect secrecy
Definitions Proofs Definition of perfect secrecy The one-time pad achieves this definition Several inherent drawbacks of perfect secrecy The one-time pad is not used

5 Private-key encryption
If we want to overcome drawbacks of perfect secrecy, we must relax the definition Computational secrecy EAV-security (Computational) secrecy for encryption of one message We now need to rely on assumptions in order to prove security

6 Private-key encryption
Pseudorandom generators/stream ciphers Formal definition For now, we simply assume these exist Pseudo-one-time pad (Provable) EAV-security based on any PRG Message length longer than key length Not secure when multiple messages encrypted, or against chosen-plaintext attacks

7 Private-key encryption
CPA-security Security against chosen-plaintext attacks Requires randomized encryption! Pseudorandom functions/block ciphers Formal definition For now, we simply assume these exist (e.g., AES) Basic encryption scheme (Provable) CPA-security based on any PRF 2x ciphertext expansion

8 Private-key encryption
Modes of encryption CBC-mode, CTR-mode are both CPA-secure, and have ciphertext expansion of one block Stream-cipher modes These are used extensively in the real world CCA-security Security against chosen-ciphertext attacks This is a real-world problem (cf. padding-oracle attacks) None of the schemes we have seen so far satisfy this notion of security

9 Message authentication codes
Integrity as an orthogonal security concern Secrecy and integrity are different Encryption and message authentication are different Message authentication codes, and definition of security Basic MAC from any PRF Short, fixed-length messages only

10 Message authentication codes
Constructing a MAC on longer messages? Different attacks to watch out for (Basic) CBC-MAC Secure for fixed-length messages CBC-MAC Secure for arbitrary-length messages Used in the real world

11 Authenticated encryption
Communication with secrecy and integrity An AE scheme is an encryption scheme that achieves both CCA-security Unforgeability Encrypt and authenticate is not a sound generic construction

12 Authenticated encryption

13 Secrecy + integrity? We have shown primitives for achieving secrecy and integrity in the private-key setting What if we want to achieve both?

14 Authenticated encryption
An encryption scheme that achieves both secrecy and integrity Secrecy notion: CCA-security Integrity notion: unforgeability Adversary cannot generate ciphertext that decrypts to a previously unencrypted message

15 Generic constructions
Generically combine an encryption scheme and a MAC Useful when these are already available in some library Goal: the combination should be an authenticated encryption scheme when instantiated with any CPA-secure encryption scheme and any secure MAC

16 Generic constructions?
Encrypt and authenticate Authenticate then encrypt Encrypt then authenticate

17 Encrypt and authenticate
c, t k1, k2 k1, k2 m c  Enck1(m) t = Mack2(m) m = Deck1(c) Vrfyk2(m, t) = 1?

18 Problems The tag t might leak information about m!
Nothing in the definition of security for a MAC implies that it hides information about m So the combination may not even be EAV-secure If the MAC is deterministic (as is CBC-MAC), then the tag leaks whether the same message is encrypted twice I.e., the combination will not be CPA-secure

19 Authenticate then encrypt
k1, k2 k1, k2 m t = Mack2(m) c  Enck1(m | t) m | t = Deck1(c) Vrfyk2(m, t) = 1?

20 Problems Padding-oracle attack still works (if possible to distinguish padding failure from MAC failure) Other counterexamples are also possible The combination may not be CCA-secure

21 Encrypt then authenticate
c, t k1, k2 k1, k2 m c  Enck1(m) t = Mack2(c) Vrfyk2(c, t) = 1? m = Deck1(c)

22 Security? If the encryption scheme is CPA-secure and the MAC is secure (with unique tags) then this is an authenticated encryption scheme It achieves something even stronger: Given ciphertexts corresponding to (chosen) plaintexts m1,…, mk, it is infeasible for an attacker to generate any new, valid ciphertext!

23 Authenticated encryption
Encrypt-then-authenticate (with independent keys) is the recommended generic approach for constructing authenticated encryption

24 Direct constructions Other, more-efficient constructions have been proposed and are an active area of research and standardization E.g., OCB, CCM, GCM Others… Active competition:

25 Secure sessions

26 Secure sessions? Consider parties who wish to communicate securely over the course of a session “Securely” = secrecy and integrity “Session” = period of time over which the parties are willing to maintain state Can use authenticated encryption…

27 Enck(m1) Enck(m2) k k Enck(m3)

28 Replay attack Enck(m1) Enck(m2) Enck(m1) k k

29 Re-ordering attack Enck(m1) Enck(m2) Enck(m2) Enck(m1) k k

30 Reflection attack Enck(m1) Enck(m2) k k Enck(m2)

31 Secure sessions These attacks (and others) can be prevented using counters/sequence numbers and identifiers

32 Enck(“Bob”| m1 | 1) Enck(“Bob” | m2 | 2) k k Enck(“Alice” | m3 | 1)

33 Secure sessions These attacks (and others) can be prevented using counters and identifiers Can also use a directionality bit in place of identifiers


Download ppt "Cryptography Lecture 12."

Similar presentations


Ads by Google