Symmetric-Key Cryptography Part 1. Tom Shrimpton Portland State University

Size: px
Start display at page:

Download "Symmetric-Key Cryptography Part 1. Tom Shrimpton Portland State University"

Transcription

1 Symmetric-Key Cryptography Part 1 Tom Shrimpton Portland State University

2 Building a privacy-providing primitive I want my communication with Bob to be private -- Alice What kind of communication? SMS? Voice? Video? HTML? Javascript? Powerpoint slides? Financial data?

3 Building a privacy-providing primitive What kind of communication? SMS? Voice? Video? HTML? Javascript? Powerpoint slides? Financial data? All of that, and maybe other things, too.

4 Building a privacy-providing primitive What kind of communication? SMS? Voice? Video? HTML? Javascript? Powerpoint slides? Financial data? Private from whom? A nosey eavesdropper, sniffing wireless packets in a coffee shop? A business competitor, who pays an ISP to send your traffic for some analysis? A nation/state agency, with huge computing resources and lots of side information? From the most powerful attacker you can manage.

5 Building a privacy-providing primitive What kind of communication? SMS? Voice? Video? HTML? Javascript? Powerpoint slides? Financial data? Private from whom? A nosey eavesdropper, sniffing wireless packets in a coffee shop? A business competitor, who pays an ISP to send your traffic for some analysis? A nation/state agency, with huge computing resources and lots of side information? What do you mean by private? No one (other than Bob) can recover the full contents of the communication? No one can recover more than 1/2 of the contents? (Does it matter which ½?) No one can determine the type of the communication? (e.g. financial data vs. HTML) You are annoying! Just make it work, and make sure it is fast, too.

6 arbitrary data Alice s Box private data communication Bob s Box recovered data API of Alice s Box Inputs: 1. bitstrings of any length API of Bob s Box Inputs: 1. bitstrings of any length Outputs: bitstrings of any length (but as short as possible to save communication costs) Outputs: bitstrings of any length

7 secret secret arbitrary data Alice s Box private data communication Bob s Box recovered data API of Alice s Box Inputs: 1. bitstrings of any length 2. something that the adversary does not know (the secret ) Outputs: bitstrings of any length (but as short as possible to save communication costs) API of Bob s Box Inputs: 1. bitstrings of any length 2. something that the adversary does not know (the secret ) Outputs: bitstrings of any length

8 secret secret arbitrary data Alice s Box private data communication Bob s Box recovered data API of Alice s Box Inputs: 1. bitstrings of any length 2. something that the adversary does not know (the secret ) Outputs: bitstrings of any length (but as short as possible to save communication costs) API of Bob s Box Inputs: 1. bitstrings of any length 2. something that the adversary does not know (the secret ) Outputs: bitstrings of any length Should we assume that the adversary does not know the algorithms inside of Alice and Bob s boxes? NO.

9 key key arbitrary data Alice s Box private data communication Bob s Box recovered data API of Alice s Box Inputs: 1. bitstrings of any length 2. a (short) secret key Outputs: bitstrings of any length API of Bob s Box Inputs: 1. bitstrings of any length 2. a (short) secret key Outputs: bitstrings of any length

10 key key arbitrary data Encryption E private data communication Decryption D recovered data API of Encryption Inputs: 1. bitstrings of any length 2. a (short) secret key Outputs: bitstrings of any length API of Decryption Inputs: 1. bitstrings of any length 2. a (short) secret key Outputs: bitstrings of any length

11 An Encryption Scheme is a triple of algorithms Key-generation algorithm Encryption algorithm Decryption algorithm key plaintext ciphertext invalid

12 An Encryption Scheme is a triple of algorithms Key-generation algorithm Encryption algorithm May be randomized or stateful Decryption algorithm Always deterministic

13 An Encryption Scheme is a triple of algorithms Key-generation algorithm Encryption algorithm Decryption algorithm Correctness condition: For all K,M, if E K (M)?, then Pr[ D K (E K (M)) = M ] = 1 over coins of encryption alg.

14 Developing a notion of privacy 1. What might the adversary try to achieve? 2. What can the adversary do in its attack? GOAL POWER

15 Developing a notion of privacy 1. What might the adversary try to achieve? GOAL Adversary tries to: recover the key recover the plaintext determine if this plaintext was sent before determine the most significant bit of the plaintext determine if the first and last half of the plaintext are the same 2. What can the adversary do in its attack? POWER

16 Developing a notion of privacy 1. What might the adversary try to achieve? GOAL Adversary tries to: recover the key recover the plaintext determine if this plaintext was sent before determine the most significant bit of the plaintext determine if the first and last half of the plaintext are the same 2. What can the adversary do in its attack? Adversary can: observe ciphertexts observe plaintexts and ciphertexts POWER pick the plaintexts, and then see the corresponding ciphertexts adaptively pick the plaintexts, and see the corresponding ciphertexts + make up ciphertexts and see their decryptions

17 Developing a notion of privacy 1. What might the adversary try to achieve? GOAL Adversary tries to: recover the key recover the plaintext determine if this plaintext was sent before determine the most significant bit of the plaintext determine if the first and last half of the plaintext are the same 2. What can the adversary do in its attack? Adversary can: observe ciphertexts observe plaintexts and ciphertexts POWER pick the plaintexts, and then see the corresponding ciphertexts adaptively pick the plaintexts, and see the corresponding ciphertexts + make up ciphertexts and see their decryptions

18 adaptive chosen-plaintext adversary encryption oracle Communication is private if Adversary can t recover the key

19 adaptive chosen-plaintext adversary encryption oracle Communication is private if Adversary can t recover the key "

20 adaptive chosen-plaintext adversary encryption oracle Communication is private if Adversary can t recover the key " Adversary can t recover the plaintext

21 adaptive chosen-plaintext adversary encryption oracle Communication is private if Adversary can t recover the key " Adversary can t recover the plaintext "

22 adaptive chosen-plaintext adversary encryption oracle Communication is private if Adversary can t recover the key " Adversary can t recover the plaintext " Any information about the plaintexts that an efficient adversary can compute given the ciphertexts, could have been efficiently computed without the ciphertexts.

23 Indistinguishability of ciphertexts under an adaptive chosen-plaintext attack (IND-CPA) These must be the same length b random bit b

24 Indistinguishability of ciphertexts under an adaptive chosen-plaintext attack (IND-CPA) These must be the same length b random bit b Adversarial resources : the number of oracle queries, the total length in bits of the queries, the time-complexity of the adversary,

25 Exploring IND-CPA We say is IND-CPA secure if the IND-CPA advantage is small for all resource efficient adversaries example: adversaries A with achieve advantage at most But what small and reasonable mean is up to the user!

26 Can this scheme be IND-CPA secure? Exploring IND-CPA

27 Exploring IND-CPA Can this scheme be IND-CPA secure? Adversary A: fix distinct strings of the same length ask query if oracle response then return 0 else return 1

28 Exploring IND-CPA Can any deterministic scheme be IND-CPA secure? EXERCISE! If you think yes, then you must give a deterministic scheme and prove it is IND-CPA secure If you think no, then you must show that, for any deterministic scheme, there exists an efficient attack that gains large IND-CPA advantage

29 Exploring IND-CPA Can any deterministic scheme be IND-CPA secure? NO Adversary A: fix distinct strings of the same length ask query, receiving in return ask query, receiving in return if then return 0 else return 1

30 An alternative definition of privacy: Real or Random (RoR-CPA) Adversarial resources : the number of oracle queries, the total length in bits of the queries, the time-complexity of the adversary,

31 Which notion is better : RoR-CPA or IND-CPA?

32 Claim: Any encryption scheme is also RoR-CPA secure that is IND-CPA secure,

33 Claim: Any encryption scheme is also RoR-CPA secure that is IND-CPA secure, Proof idea: show the contrapositive, if a scheme RoR-CPA secure, then it is not IND-CPA secure. is not

34 Claim: Any encryption scheme is also RoR-CPA secure that is IND-CPA secure, Proof idea: show the contrapositive, if a scheme RoR-CPA secure, then it is not IND-CPA secure. is not Let A be an efficient RoR-CPA adversary, gaining advantage We build an efficient IND-CPA adversary B, that runs A as a black-box subroutine, that gains advantage

35 Claim: Any encryption scheme is also RoR-CPA secure that is IND-CPA secure, Proof idea: show the contrapositive, if a scheme RoR-CPA secure, then it is not IND-CPA secure. is not Let A be an efficient RoR-CPA adversary, gaining advantage We build an efficient IND-CPA adversary B, that runs A as a black-box subroutine, that gains advantage Conclusion: if is small for all efficient B, then must be small, too

36 So, we start with an RoR-adversary A that gains some RoR advantage

37

38 A! B! Want to build a good IND-CPA adversary B! by running A and simulating its expected experiment

39 M! A! B!

40 M! A! B!

41 M! A! B!

42 C! M! A! B!

43 d! A! B!

44 d! A! B! d! Thus, B perfectly simulates A s expected experiment and will win whenever A wins

45 And hence, as we claimed.

46 So we say IND-CPA security implies RoR-CPA security What about the other way around?

47 Claim: Any encryption scheme is also IND-CPA secure that is RoR-CPA secure, Proof idea: show the contrapositive, if a scheme IND-CPA secure, then it is not RoR-CPA secure. is not

48 Claim: Any encryption scheme is also IND-CPA secure that is RoR-CPA secure, Proof idea: show the contrapositive, if a scheme IND-CPA secure, then it is not RoR-CPA secure. is not Let A be an efficient IND-CPA adversary, gaining advantage We build an efficient RoR-CPA adversary B, that runs A as a black-box subroutine, that gains advantage Conclusion: if is small for all efficient B, then must be small, too

49 Claim: Any encryption scheme is also IND-CPA secure that is RoR-CPA secure, Proof idea: show the contrapositive, if a scheme IND-CPA secure, then it is not RoR-CPA secure. is not Let A be an efficient IND-CPA adversary, gaining advantage We build an efficient RoR-CPA adversary B, that runs A as a black-box subroutine, that gains advantage AT HOME EXERCISE: try to write the proof Conclusion: if is small for all efficient B, then must be small, too

50 So we say IND-CPA security implies RoR-CPA security And RoR-CPA security implies IND-CPA security, too (Although the two directions are not equally tight )

51 There are a variety of definitions of IND-CPA that are all qualitatively equivalent: Left-or-Right IND-CPA Real-or-Random IND-CPA Real-or-0s IND-CPA Find-then-Guess IND-CPA Semantic security Although not all of the reductions have the same quantitative tightness Check out [Bellare, Desai, Pointcheval, Rogaway]

52 So, now we have -- a precise syntax for the object we want to build -- a precise target security notion, left-or-right IND-CPA How should we build this thing?

53 Perfect encryption There does exist one perfect symmetric encryption scheme: One Time Pad random bits (key) plaintext message random ciphertext bits (independent of message) all ciphertexts are equally likely Sadly, requires a stream of secret random bits as long as the length of all messages you want to send.

54 Approximating One-Time Pad Perhaps we can turn a short secret key into computationally indistinguishable from random bits plaintext message computationally indistinguishable from random bits

55 Intuitively, making small blocks of random-looking bits should be easier (at least, not harder) than making a long string all at once computationally indistinguishable from random bits plaintext message computationally indistinguishable from random bits So we need a function that outputs small blocks of random looking bits

56 Consider the set, the family of all functions mapping n-bit strings to n-bit strings

57 Consider the set, the family of all functions mapping n-bit strings to n-bit strings Two equivalent viewpoints on picking a random function 1. Sampling an element of everything-to-zero map identity map f

58 Consider the set, the family of all functions mapping n-bit strings to n-bit strings Two equivalent viewpoints on picking a random function 1. Sampling an element of It s not hard to see that everything-to-zero map identity map f

59 Consider the set, the family of all functions mapping n-bit strings to n-bit strings Two equivalent viewpoints on picking a random function 1. Sampling an element of 2. fill in the function table lazily everything-to-zero map identity map f

60 Imagine we could sample and then encrypt via plaintext message ciphertext we get one-time pad! But there s still a catch. (What is the size of the key for this encryption scheme?)

61 Imagine we could sample and then encrypt via plaintext message ciphertext we get one-time pad! But there s still a catch. bits of key

62 Pseudorandom Functions (PRFs) Let be viewed as a keyed function family F K! or f! X Y My oracle is

63 Counter-mode encryption over a function family F (CTR[F]) Initialization: means: add 2 to ctr, encode as an n-bit string hctri n hctr+1i n hctr+2i n hctr+(b-1)i n F K! F K! F K! F K! M 1 M 2 M 3 M b C 0 C 1 C 2 C 3 C b For the next message, update the encryption scheme state: ctr ctr + b

64 Claim: If (counter-mode over F) is IND-CPA secure. is a secure PRF, then hctri n hctr+1i n hctr+2i n hctr+(b-1)i n F K! F K! F K! F K! M 1 M 2 M 3 M b C 0 C 1 C 2 C 3 C b

65 Claim: If (counter-mode over F) is IND-CPA secure. is a secure PRF, then Proof idea: break the proof into two steps 1. replace F K with a random function f, and argue that any adversary that can detect this can break PRF-security of F hctri n hctr+1i n hctr+2i n hctr+(b-1)i n F K! F K! F K! F K! M 1 M 2 M 3 M b C 0 C 1 C 2 C 3 C b

66 Claim: If (counter-mode over F) is IND-CPA secure. is a secure PRF, then Proof idea: break the proof into two steps 1. replace F K with a random function f, and argue that any adversary that can detect this can break PRF-security of F hctri n hctr+1i n hctr+2i n hctr+(b-1)i n f! f! f! f! M 1 M 2 M 3 M b C 0 C 1 C 2 C 3 C b

67 Claim: If (counter-mode over F) is IND-CPA secure. is a secure PRF, then Proof idea: break the proof into two steps 1. replace F K with a random function f, and argue that any adversary that can detect this can break PRF-security of F 2. analyze IND-CPA security of

68 (for reference)

69 So, we start with an IND-CPA adversary that gains some IND-CPA advantage in attacking CTR[F]

70 Now we add a useful version of 0 to the right side

71

72 I claim that:

73 I claim that:

74 I claim that: If PRF bit b=1: B simulates IND-CPA experiment for CTR[F],! And outputs 1 if A guesses the bit

75 I claim that: If PRF bit b=1: B simulates IND-CPA experiment for CTR[F],! And outputs 1 if A guesses the bit If PRF bit b=0: B simulates IND-CPA experiment for CTR[Func(n,n)],! And outputs 1 if A guesses the bit

76 I claim that: If PRF bit b=1: B simulates IND-CPA experiment for CTR[F],! And outputs 1 if A guesses the bit If PRF bit b=0: B simulates IND-CPA experiment for CTR[Func(n,n)],! And outputs 1 if A guesses the bit

77 I claim that: So by subtracting probabilities on the left side Adv prf F Pr(Exp ind-cpa CTR[F ](A) = 1) Pr(Expind-cpa =Pr(Exp prf F = (Pr(Expprf F CTR[Func(n,n)] (A) = 1) (B) =1 b = 1) + Pr(Expprf(B) =1 b = 0) 1 (B) =2Pr(Expprf(B) = 1) 1 F (B) =1 ^ b = 1) + Pr(Expprf F (B) =1 ^ b = 0)) 1/2 F 1

78

79

80 I claim: Proof sketch: all ciphertexts are independent of the IND-CPA experiment bit! So probability of guessing the bit is at most 1/2

81 And we re done.

82 I want to implement this. What should I use for F K? CTR[F] hctri n hctr+1i n hctr+2i n hctr+(b-1)i n F K! F K! F K! F K! M 1 M 2 M 3 M b C 0 C 1 C 2 C 3 C b Recall So any keyed, n-bit to n-bit function will do

83 Use a blockcipher, like AES. CTR[AES] hctri 128 hctr+1i 128 hctr+2i 128 hctr+(b-1)i 128 AES K! AES K! AES K! AES K! M 1 M 2 M 3 M b C 0 C 1 C 2 C 3 C b Recall: AES: {0, 1} 128 {0, 1} 128! {0, 1} 128

84 Wait blockciphers are not just function families, they are permutation families How does relate to?

85 Consider the set, the family of all permutations over n-bit strings Two equivalent viewpoints on picking a random permutation 1. Sampling an element of 2. fill in the permutation table lazily identity map π

86 Pseudorandom Permutations (PRPs) Let be viewed as a keyed function family E K! or π X Y My oracle is

87 The PRP-PRF Switching Lemma Let be viewed as a keyed function family Let A be an adversary, asking q queries to its single oracle. Then

88 The PRP-PRF Switching Lemma Let be viewed as a keyed function family Let A be an adversary, asking q queries to its single oracle. Then So, for example,

89 What about cipher-block-chaining (CBC) mode? CBC mode appears in IPSec, SSH, TLS, M 1 M 2 M 3 IV E K E K E K C 0 C 1 C 2 C 3 How to handle the IV? Fixed IV? Counter IV? Random IV?

90 CBC with a fixed IV b,(m 0,M 1 ),(M 0,M, 1 ) (Parse message M b into blocks) 0 n f f f b CBC f (M b ), CBC f (M b ), C 0 C 1 C 2 C 3 Can the adversary easily guess the bit?

91 CBC with a counter IV b,(m 0,M 1 ),(M 0,M, 1 ) (Parse message M b into blocks) hctri f f f b CBC f (M b ), CBC f (M b ), C 0 C 1 C 2 C 3 Can the adversary easily guess the bit?

92 Claim: If is a secure PRF, then (CBC-mode, with a random IV, over F) is IND-CPA secure. Proof idea: break the proof into two steps 1. replace F K with a random function f, and argue that any adversary that can detect this, can break PRF-security of F 2. analyze IND-CPA security of

93 (Proof Sketch) M 1 M 2 M 3 $ f f f C 0 C 1 C 2 C 3 Until f is called on the same value twice, the ciphertext blocks are random and independent of the message blocks. There are µ/n chances for an f-domain collision

94 Privacy? " What about authenticity? Authenticity: Alice wants to be sure she s received Bob s message K K M C C M C C Is C an authentic ctxt from Bob? Might alter the ciphertext Is M an authentic ptxt from Bob?

95 Privacy? " What about authenticity? Authenticity: Alice wants to be sure she s received Bob s message K K M C C M C C Is C an authentic ctxt from Bob? Might alter the ciphertext Is M an authentic ptxt from Bob?

96 First of all, we need a syntactic addition (New primitive, new syntax!) Key-generation algorithm Encryption algorithm Decryption algorithm Decryption now has the ability to complain

97 Folklore idea: add redundancy to encryption append a block of all zeros to every message M 1 M 2 M 3 0 n random IV E K E K E K E K C 0 C 1 C 2 C 3 C 4 Decryption: just like CBC, except return? if last block isn t all zeros

98 M 1 = 0 n M 2 = 0 n M 3 = 0 n 0 n random IV E K E K E K E K C 0 C 1 C 2 C 3 C 4 Can you forge an authentic ciphertext? C 0 C 1 C 2 C 3 decrypts properly, and so is authentic by the if-it-decrypts-the-authentic measure

99 So what s wrong? It s not that CBC-mode is bad, it s just that traditional encryption schemes have been designed to provide PRIVACY ONLY

100 ( This can be made to work (more later) M 1 M 2 M ??? C 1 C 2 C 3 C 4 )

101 A notion of authenticity : Integrity of Ciphertexts (INT-CTXT) random bit b M C

102 A notion of authenticity : Integrity of Ciphertexts (INT-CTXT) random bit b M C Adversarial resources : the number of oracle queries, the total length in bits of the queries, the time-complexity of the adversary,

103 A notion of authenticity : Integrity of Ciphertexts (INT-CTXT) random bit b M C To prevent trivial wins of the game, adversary is forbidden to ask C of the right oracle if C was returned by the left oracle

104 Folklore idea: add redundancy to encryption append a block of all zeros to every message M 1 M 2 M 3 0 n random IV E K E K E K E K C 0 C 1 C 2 C 3 C 4 Decryption: just like CBC, except return? if last block isn t all zeros

105 Folklore idea: add redundancy to encryption append a block of all zeros to every message M 1 M 2 M 3 0 n random IV E K E K E K E K C 0 C 1 C 2 C 3 C 4 Decryption: just like CBC, except return? if last block isn t all zeros EXERCISE: Can you forge an authentic ciphertext, and win the INT-CTXT game?

106 Building a simple INT-CTXT secure encryption scheme Let be a function family. Define an encryption scheme Π[ F ] as follows:

107 Claim: if is a secure PRF, then Π[F] is an INT-CTXT secure encryption scheme Proof idea: break the proof into two steps 1. replace F K with a random function f, and argue that any adversary that can detect this can break PRF-security of F! 2. analyze INT-CTXT security of

108

109 If the bit b in the PRF experiment is 1 (resp. 0), then B simulates the INT-CTXT experiment for Π[F] (resp. Π[Func(*,n)]

110

111 Consider f is a random function

112 Consider f is a random function Decryption cases 0. (X, T) old: not allowed (i.e. T not the tag previously returned with X) 1. X old, T new : returns because f is deterministic 2. X new, T old: f(x) uniformly random, 3. X new, T new: f(x) uniformly random,

113 Consider f is a random function Decryption cases 0. (X, T) old: not allowed (i.e. T not the tag previously returned with X) 1. X old, T new : returns because f is deterministic 2. X new, T old: f(x) uniformly random, 3. X new, T new: f(x) uniformly random,

114 Consider f is a random function Decryption cases 0. (X, T) old: not allowed (i.e. T not the tag previously returned with X) 1. X old, T new : returns because f is deterministic 2. X new, T old: f(x) uniformly random, 3. X new, T new: f(x) uniformly random,

115

116 Adding IND-CPA Let Let be a function family. be an encryption scheme Define an encryption scheme as follows: This is called Encrypt-then-PRF

117 Claim: if is a secure PRF, and is IND-CPA secure, then is both IND-CPA and INT-CTXT secure

118 Claim: if is a secure PRF, and is IND-CPA secure, then is both IND-CPA and INT-CTXT secure Let s do the easy part first: INT-CTXT

119 Claim: if is a secure PRF, and is IND-CPA secure, then is both IND-CPA and INT-CTXT secure Let s do the easy part first: INT-CTXT If the bit b in the PRF experiment is 1 (resp. 0), then B simulates the INT-CTXT experiment for Π[F] (resp. Π[Func(*,n)])

120 Claim: if is a secure PRF, and is IND-CPA secure, then is both IND-CPA and INT-CTXT secure Let s do the easy part first: INT-CTXT

121 Claim: if is a secure PRF, and is IND-CPA secure, then is both IND-CPA and INT-CTXT secure Now the new part: IND-CPA. But this is even easier! Where this reduction B simulates the F K2 part of encryption

122 The three Generic Composition authenticated encryption schemes Encrypt-then-PRF: " " IND-CPA INT-CTXT (IPSec)

123 The three Generic Composition authenticated encryption schemes Encrypt-then-PRF: " " IND-CPA INT-CTXT PRF-then-Encrypt: (IPSec) (SSL/TLS)

124 The three Generic Composition authenticated encryption schemes Encrypt-then-PRF: " " IND-CPA INT-CTXT PRF-then-Encrypt: (IPSec) (SSL/TLS) IND-CPA INT-CTXT " "

125 The three Generic Composition authenticated encryption schemes Encrypt-then-PRF: " " IND-CPA INT-CTXT PRF-then-Encrypt: (IPSec) (SSL/TLS) " " IND-CPA INT-CTXT PRF and Encrypt: (or Encrypt and PRF) (SSH)

126 The three Generic Composition authenticated encryption schemes Encrypt-then-PRF: " " IND-CPA INT-CTXT PRF-then-Encrypt: (IPSec) (SSL/TLS) " " IND-CPA INT-CTXT PRF and Encrypt: (or Encrypt and PRF) (SSH) " " IND-CPA INT-CTXT

127 The three Generic Composition authenticated encryption schemes Encrypt-then-PRF: " " IND-CPA INT-CTXT PRF-then-Encrypt: (IPSec) (SSL/TLS) " " IND-CPA INT-CTXT PRF and Encrypt: (or Encrypt and PRF) (SSH) " " IND-CPA INT-CTXT EXERCISE: Explain why PRF and Encrypt is not generically IND-CPA

128 (Violating INT-CTXT) Consider which is IND-CPA if is PRF-then-Encrypt: " " IND-CPA INT-CTXT PRF and Encrypt: (or Encrypt and PRF) " " IND-CPA INT-CTXT

129 Privacy? " What about authenticity? Authenticity: Alice wants to be sure she s received Bob s message K K M C C M C C Is C an authentic ctxt from Bob? Is M an authentic ptxt from Bob?

130 Privacy? " What about authenticity? Authenticity: Alice wants to be sure she s received Bob s message K K M C C M C C Is C an authentic ctxt from Bob? Is M an authentic ptxt from Bob?

131 Another notion of authenticity : Integrity of Plaintexts (INT-PTXT) Adversary wins if it asks C such that M C 0 or Achieved (generically) by PRF-then-Encrypt Strictly weaker security goal Requires calling applications to be aware of repeated plaintexts Efficient schemes achieve INT-CTXT already Stick with INT-CTXT if possible!

132 Let s return to this idea M 1 M 2 M 3 Redundancy(M)??? C 1 C 2 C 3 C 4

133 Strong PRPs Let be a permutation family It s easy to extend this to the VIL setting, by considering, with,to be length-preserving.

134 Intuition: if you encrypt new messages, with redundancy M 0 80 π Y then outputs look like random bitstrings (subject to permutivity)

135 Intuition: if you flip any bit of the output and decrypt " M 0 80 π -1 Y then plaintexts random, and unlikely to have correct redundancy

136 Of course, we re not guaranteed that messages are new, so we add a per-message nonce (number used once) N M 0 80 π Y This is the Encode-Encipher paradigm, due to Bellare and Rogaway

137 New object, new syntax! A nonce-based encryption scheme is a triple of algorithms Key-generation algorithm Encryption algorithm Decryption algorithm (See Rogaway s Nonce-Based Encryption Paper)

138 New object, new syntax! A nonce-based encryption scheme is a triple of algorithms Key-generation algorithm Encryption algorithm Decryption algorithm the nonce space

139 New object, new syntax! A nonce-based encryption scheme is a triple of algorithms Key-generation algorithm Encryption algorithm Deterministic! Decryption algorithm

140 IND-CPA in the nonce-based setting Restrictions: No nonce-message pair repeated Nonces are meant to be used once. An adversary that never repeats a nonce is called nonce-respecting

141 Let s define a nonce-based encryption scheme from an SPRP. Let and let contain all strings up to length L for some L > 0!

142 Let s define a nonce-based encryption scheme from an SPRP. Let and let contain all strings up to length L for some L > 0! Let be a length-preserving permutation family. N M 0 80 E K! C

143 Let s define a nonce-based encryption scheme from an SPRP. Let and let contain all strings up to length L for some L > 0! Let be a length-preserving permutation family. N M 0 80 E K! C Claim: if is a secure SPRP, then this scheme is both (nonce-based) IND-CPA and (nonce-based) INT-CTXT secure Proof: exercise (you might need a bi-directional version of the PRP-PRF switching lemma )

144 Proof intuition: N M Replace with E K! C

145 Proof intuition: N M Replace with 2. Replace with two independent random functions E K! C

146 Proof intuition: N M Replace with 2. Replace with two independent random functions 3. Now uniform random strings in both directions if nonces are respected E K! C

147 What makes this work is that SPRPs are (so of) all-or-nothing objects N M 0 80 Change any bit of input = randomize entire output E K! C Change any bit of output = randomize entire input But this comes with a cost: Loosely, every bit of output (input) must depend on every bit of input (output).

148 X 1 X 2 X 3 X 4 N Definitely NOT an SPRP, even if E K is. E K E K E K E K C 1 C 2 C 3 C 4 SPRPs generally seem to require two full cryptographic passes

149 X 1 X 2 X 3 X n N E K E K E K E K mask CMC mode (Halevi and Rogway) E K E K E K E K N C 1 C 2 C 3 C 4

150 Nonce-based encryption is interesting area X 1 X 2 X 3 X 4 N E K E K E K E K C 1 C 2 C 3 C 4 This is not IND-CPA secure in the nonce-based setting, even if nonces are respected.

151 Nonce-based encryption is interesting area N X 1 X 2 X 3 X 4 E K1 E K2 E K2 E K2 E K2 C 1 C 2 C 3 C 4 But this should work...

152 Nonce-based encryption is interesting area N X 1 X 2 X 3 X 4 f1 f2 f2 f2 f2 C 1 C 2 C 3 C 4 If f1 and f2 are independent random functions (so we need E to be a PRF under two random keys) then all f2 inputs are random what type of bound do you expect?

153 Yet more: Deterministic (Nonce-based) AE with Associated Data (AEAD) Key-generation algorithm Encryption algorithm Decryption algorithm The header or associated data space (See Rogaway s AEAD Paper) (See Rogaway and Shrimpton s Keywrap Paper)

154 Here s one way to build a deterministic AEAD scheme: SIV mode Header components (take one and use it for N) plaintext synthetic IV

155 Here s one way to build a DAE scheme: SIV mode Header components (take one and use it for N) plaintext synthetic IV If F is a secure PRF, and is IND-CPA against nonce-respecting adversaries, then this is a secure DAE scheme (IND-CPA and INT-CTXT) (also provides nonce-misuse resistance )

156 This is NOT the whole story of symmetric encryption! Many other interesting kinds of symmetric encryption to explore Message-locked encryption Format-preserving encryption Format-transforming encryption Length-hiding AEAD Online encryption Key-dependent message encryption Thanks!

157 Exercises, once more

158 Claim: Any encryption scheme is also IND-CPA secure that is RoR-CPA secure, Proof idea: show the contrapositive, if a scheme IND-CPA secure, then it is not RoR-CPA secure. is not Let A be an efficient IND-CPA adversary, gaining advantage We build an efficient RoR-CPA adversary B, that runs A as a black-box subroutine, that gains advantage AT HOME EXERCISE: try to write the proof Conclusion: if is small for all efficient B, then must be small, too

159 Folklore idea: add redundancy to encryption append a block of all zeros to every message M 1 M 2 M 3 0 n random IV E K E K E K E K C 0 C 1 C 2 C 3 C 4 Decryption: just like CBC, except return? if last block isn t all zeros EXERCISE: Can you forge an authentic ciphertext, and win the INT-CTXT game?

160 The three Generic Composition authenticated encryption schemes Encrypt-then-PRF: " " IND-CPA INT-CTXT PRF-then-Encrypt: (IPSec) (SSL/TLS) " " IND-CPA INT-CTXT PRF and Encrypt: (or Encrypt and PRF) (SSH) " " IND-CPA INT-CTXT EXERCISE: Explain why PRF and Encrypt is not generically IND-CPA

161 Proof of the PRP-PRF Switching Lemma

162 Requires care, but the reason for the birthday term is obvious!

163 all values already assigned as outputs of the oracle all values still free to be assigned as outputs

164

165 Fundamental lemma of game-playing (Bellare, Rogaway)

166 Fundamental lemma of game-playing (Bellare, Rogaway) union bound

Feedback Week 4 - Problem Set

Feedback Week 4 - Problem Set 4/26/13 Homework Feedback Introduction to Cryptography Feedback Week 4 - Problem Set You submitted this homework on Mon 17 Dec 2012 11:40 PM GMT +0000. You got a score of 10.00 out of 10.00. Question 1

More information

A Characterization of Authenticated-Encryption as a Form of Chosen-Ciphertext Security. T. Shrimpton October 18, 2004

A Characterization of Authenticated-Encryption as a Form of Chosen-Ciphertext Security. T. Shrimpton October 18, 2004 A Characterization of Authenticated-Encryption as a Form of Chosen-Ciphertext Security T. Shrimpton October 18, 2004 Abstract In this note we introduce a variation of the standard definition of chosen-ciphertext

More information

Course Map. COMP 7/8120 Cryptography and Data Security. Learning Objectives. How to use PRPs (Block Ciphers)? 2/14/18

Course Map. COMP 7/8120 Cryptography and Data Security. Learning Objectives. How to use PRPs (Block Ciphers)? 2/14/18 Course Map Key Establishment Authenticated Encryption Key Management COMP 7/8120 Cryptography and Data Security Lecture 8: How to use Block Cipher - many time key Stream Ciphers Block Ciphers Secret Key

More information

Block ciphers used to encode messages longer than block size Needs to be done correctly to preserve security Will look at five ways of doing this

Block ciphers used to encode messages longer than block size Needs to be done correctly to preserve security Will look at five ways of doing this Lecturers: Mark D. Ryan and David Galindo. Cryptography 2015. Slide: 74 Block ciphers used to encode messages longer than block size Needs to be done correctly to preserve security Will look at five ways

More information

On Symmetric Encryption with Distinguishable Decryption Failures

On Symmetric Encryption with Distinguishable Decryption Failures On Symmetric Encryption with Distinguishable Decryption Failures Alexandra Boldyreva, Jean Paul Degabriele, Kenny Paterson, and Martijn Stam FSE - 12th Mar 2013 Outline Distinguishable Decryption Failures

More information

Block cipher modes. Lecturers: Mark D. Ryan and David Galindo. Cryptography Slide: 75

Block cipher modes. Lecturers: Mark D. Ryan and David Galindo. Cryptography Slide: 75 Block cipher modes Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 75 Lecturers: Mark D. Ryan and David Galindo. Cryptography 2017. Slide: 76 Block cipher modes Block ciphers (like

More information

1 Achieving IND-CPA security

1 Achieving IND-CPA security ISA 562: Information Security, Theory and Practice Lecture 2 1 Achieving IND-CPA security 1.1 Pseudorandom numbers, and stateful encryption As we saw last time, the OTP is perfectly secure, but it forces

More information

Information Security CS526

Information Security CS526 Information CS 526 Topic 3 Ciphers and Cipher : Stream Ciphers, Block Ciphers, Perfect Secrecy, and IND-CPA 1 Announcements HW1 is out, due on Sept 10 Start early, late policy is 3 total late days for

More information

Cryptology complementary. Symmetric modes of operation

Cryptology complementary. Symmetric modes of operation Cryptology complementary Symmetric modes of operation Pierre Karpman pierre.karpman@univ-grenoble-alpes.fr https://www-ljk.imag.fr/membres/pierre.karpman/tea.html 2018 05 03 Symmetric modes 2018 05 03

More information

Computer Security CS 526

Computer Security CS 526 Computer Security CS 526 Topic 4 Cryptography: Semantic Security, Block Ciphers and Encryption Modes CS555 Topic 4 1 Readings for This Lecture Required reading from wikipedia Block Cipher Ciphertext Indistinguishability

More information

Block ciphers, stream ciphers

Block ciphers, stream ciphers Block ciphers, stream ciphers (start on:) Asymmetric cryptography CS 161: Computer Security Prof. Raluca Ada Popa Jan 31, 2018 Announcements Project 1 is out, due Feb 14 midnight Recall: Block cipher A

More information

Cryptography CS 555. Topic 11: Encryption Modes and CCA Security. CS555 Spring 2012/Topic 11 1

Cryptography CS 555. Topic 11: Encryption Modes and CCA Security. CS555 Spring 2012/Topic 11 1 Cryptography CS 555 Topic 11: Encryption Modes and CCA Security CS555 Spring 2012/Topic 11 1 Outline and Readings Outline Encryption modes CCA security Readings: Katz and Lindell: 3.6.4, 3.7 CS555 Spring

More information

Introduction to Cryptography. Lecture 3

Introduction to Cryptography. Lecture 3 Introduction to Cryptography Lecture 3 Benny Pinkas March 6, 2011 Introduction to Cryptography, Benny Pinkas page 1 Pseudo-random generator seed s (random, s =n) Pseudo-random generator G Deterministic

More information

Paper presentation sign up sheet is up. Please sign up for papers by next class. Lecture summaries and notes now up on course webpage

Paper presentation sign up sheet is up. Please sign up for papers by next class. Lecture summaries and notes now up on course webpage 1 Announcements Paper presentation sign up sheet is up. Please sign up for papers by next class. Lecture summaries and notes now up on course webpage 2 Recap and Overview Previous lecture: Symmetric key

More information

Lecture 8. 1 Some More Security Definitions for Encryption Schemes

Lecture 8. 1 Some More Security Definitions for Encryption Schemes U.C. Berkeley CS276: Cryptography Lecture 8 Professor David Wagner February 9, 2006 Lecture 8 1 Some More Security Definitions for Encryption Schemes 1.1 Real-or-random (rr) security Real-or-random security,

More information

Symmetric Crypto MAC. Pierre-Alain Fouque

Symmetric Crypto MAC. Pierre-Alain Fouque Symmetric Crypto MAC Pierre-Alain Fouque Message Authentication Code (MAC) Warning: Encryption does not provide integrity Eg: CTR mode ensures confidentiality if the blockcipher used is secure. However,

More information

symmetric cryptography s642 computer security adam everspaugh

symmetric cryptography s642 computer security adam everspaugh symmetric cryptography s642 adam everspaugh ace@cs.wisc.edu computer security Announcement Midterm next week: Monday, March 7 (in-class) Midterm Review session Friday: March 4 (here, normal class time)

More information

Lecture 6: Symmetric Cryptography. CS 5430 February 21, 2018

Lecture 6: Symmetric Cryptography. CS 5430 February 21, 2018 Lecture 6: Symmetric Cryptography CS 5430 February 21, 2018 The Big Picture Thus Far Attacks are perpetrated by threats that inflict harm by exploiting vulnerabilities which are controlled by countermeasures.

More information

Cryptography: Symmetric Encryption (finish), Hash Functions, Message Authentication Codes

Cryptography: Symmetric Encryption (finish), Hash Functions, Message Authentication Codes CSE 484 / CSE M 584: Computer Security and Privacy Cryptography: Symmetric Encryption (finish), Hash Functions, Message Authentication Codes Spring 2017 Franziska (Franzi) Roesner franzi@cs.washington.edu

More information

Cryptography CS 555. Topic 8: Modes of Encryption, The Penguin and CCA security

Cryptography CS 555. Topic 8: Modes of Encryption, The Penguin and CCA security Cryptography CS 555 Topic 8: Modes of Encryption, The Penguin and CCA security 1 Reminder: Homework 1 Due on Friday at the beginning of class Please typeset your solutions 2 Recap Pseudorandom Functions

More information

Pipelineable On-Line Encryption (POE)

Pipelineable On-Line Encryption (POE) Pipelineable On-Line Encryption (POE) FSE 2014 Farzaneh Abed 2 Scott Fluhrer 1 John Foley 1 Christian Forler 2 Eik List 2 Stefan Lucks 2 David McGrew 1 Jakob Wenzel 2 1 Cisco Systems, 2 Bauhaus-Universität

More information

ASYMMETRIC (PUBLIC-KEY) ENCRYPTION. Mihir Bellare UCSD 1

ASYMMETRIC (PUBLIC-KEY) ENCRYPTION. Mihir Bellare UCSD 1 ASYMMETRIC (PUBLIC-KEY) ENCRYPTION Mihir Bellare UCSD 1 Recommended Book Steven Levy. Crypto. Penguin books. 2001. A non-technical account of the history of public-key cryptography and the colorful characters

More information

CS 495 Cryptography Lecture 6

CS 495 Cryptography Lecture 6 CS 495 Cryptography Lecture 6 Dr. Mohammad Nabil Alaggan malaggan@fci.helwan.edu.eg Helwan University Faculty of Computers and Information CS 495 Fall 2014 http://piazza.com/fci_helwan_university/fall2014/cs495

More information

1 Defining Message authentication

1 Defining Message authentication ISA 562: Information Security, Theory and Practice Lecture 3 1 Defining Message authentication 1.1 Defining MAC schemes In the last lecture we saw that, even if our data is encrypted, a clever adversary

More information

ASYMMETRIC (PUBLIC-KEY) ENCRYPTION. Mihir Bellare UCSD 1

ASYMMETRIC (PUBLIC-KEY) ENCRYPTION. Mihir Bellare UCSD 1 ASYMMETRIC (PUBLIC-KEY) ENCRYPTION Mihir Bellare UCSD 1 Recommended Book Steven Levy. Crypto. Penguin books. 2001. A non-technical account of the history of public-key cryptography and the colorful characters

More information

Proofs for Key Establishment Protocols

Proofs for Key Establishment Protocols Information Security Institute Queensland University of Technology December 2007 Outline Key Establishment 1 Key Establishment 2 3 4 Purpose of key establishment Two or more networked parties wish to establish

More information

Lecture 1 Applied Cryptography (Part 1)

Lecture 1 Applied Cryptography (Part 1) Lecture 1 Applied Cryptography (Part 1) Patrick P. C. Lee Tsinghua Summer Course 2010 1-1 Roadmap Introduction to Security Introduction to Cryptography Symmetric key cryptography Hash and message authentication

More information

Cryptography: Symmetric Encryption (finish), Hash Functions, Message Authentication Codes

Cryptography: Symmetric Encryption (finish), Hash Functions, Message Authentication Codes CSE 484 / CSE M 584: Computer Security and Privacy Cryptography: Symmetric Encryption (finish), Hash Functions, Message Authentication Codes Spring 2016 Franziska (Franzi) Roesner franzi@cs.washington.edu

More information

Block ciphers. CS 161: Computer Security Prof. Raluca Ada Popa. February 26, 2016

Block ciphers. CS 161: Computer Security Prof. Raluca Ada Popa. February 26, 2016 Block ciphers CS 161: Computer Security Prof. Raluca Ada Popa February 26, 2016 Announcements Last time Syntax of encryption: Keygen, Enc, Dec Security definition for known plaintext attack: attacker provides

More information

Computational Security, Stream and Block Cipher Functions

Computational Security, Stream and Block Cipher Functions Computational Security, Stream and Block Cipher Functions 18 March 2019 Lecture 3 Most Slides Credits: Steve Zdancewic (UPenn) 18 March 2019 SE 425: Communication and Information Security 1 Topics for

More information

Symmetric Cryptography

Symmetric Cryptography CSE 484 (Winter 2010) Symmetric Cryptography Tadayoshi Kohno Thanks to Dan Boneh, Dieter Gollmann, John Manferdelli, John Mitchell, Vitaly Shmatikov, Bennet Yee, and many others for sample slides and materials...

More information

McOE: A Family of Almost Foolproof On-Line Authenticated Encryption Schemes

McOE: A Family of Almost Foolproof On-Line Authenticated Encryption Schemes McOE: A Family of Almost Foolproof On-Line Authenticated Encryption Schemes Ewan Fleischmann Christian Forler Stefan Lucks Bauhaus-Universität Weimar FSE 2012 Fleischmann, Forler, Lucks. FSE 2012. McOE:

More information

CS408 Cryptography & Internet Security

CS408 Cryptography & Internet Security CS408 Cryptography & Internet Security Lectures 16, 17: Security of RSA El Gamal Cryptosystem Announcement Final exam will be on May 11, 2015 between 11:30am 2:00pm in FMH 319 http://www.njit.edu/registrar/exams/finalexams.php

More information

Scanned by CamScanner

Scanned by CamScanner Scanned by CamScanner Scanned by CamScanner Scanned by CamScanner Scanned by CamScanner Scanned by CamScanner Scanned by CamScanner Scanned by CamScanner Symmetric-Key Cryptography CS 161: Computer Security

More information

ISA 562: Information Security, Theory and Practice. Lecture 1

ISA 562: Information Security, Theory and Practice. Lecture 1 ISA 562: Information Security, Theory and Practice Lecture 1 1 Encryption schemes 1.1 The semantics of an encryption scheme. A symmetric key encryption scheme allows two parties that share a secret key

More information

Chapter 4. Symmetric Encryption. 4.1 Symmetric encryption schemes

Chapter 4. Symmetric Encryption. 4.1 Symmetric encryption schemes Chapter 4 Symmetric Encryption The symmetric setting considers two parties who share a key and will use this key to imbue communicated data with various security attributes. The main security goals are

More information

Authenticated Encryption

Authenticated Encryption 18733: Applied Cryptography Anupam Datta (CMU) Authenticated Encryption Online Cryptography Course Authenticated Encryption Active attacks on CPA-secure encryption Recap: the story so far Confidentiality:

More information

Computer Security. 10r. Recitation assignment & concept review. Paul Krzyzanowski. Rutgers University. Spring 2018

Computer Security. 10r. Recitation assignment & concept review. Paul Krzyzanowski. Rutgers University. Spring 2018 Computer Security 10r. Recitation assignment & concept review Paul Krzyzanowski Rutgers University Spring 2018 April 3, 2018 CS 419 2018 Paul Krzyzanowski 1 1. What is a necessary condition for perfect

More information

Cryptography. Andreas Hülsing. 6 September 2016

Cryptography. Andreas Hülsing. 6 September 2016 Cryptography Andreas Hülsing 6 September 2016 1 / 21 Announcements Homepage: http: //www.hyperelliptic.org/tanja/teaching/crypto16/ Lecture is recorded First row might be on recordings. Anything organizational:

More information

Homework 2: Symmetric Crypto Due at 11:59PM on Monday Feb 23, 2015 as a PDF via websubmit.

Homework 2: Symmetric Crypto Due at 11:59PM on Monday Feb 23, 2015 as a PDF via websubmit. Homework 2: Symmetric Crypto February 17, 2015 Submission policy. information: This assignment MUST be submitted as a PDF via websubmit and MUST include the following 1. List of collaborators 2. List of

More information

Symmetric-Key Cryptography

Symmetric-Key Cryptography Symmetric-Key Cryptography CS 161: Computer Security Prof. Raluca Ada Popa Sept 13, 2016 Announcements Project due Sept 20 Special guests Alice Bob The attacker (Eve - eavesdropper, Malice) Sometimes Chris

More information

Authenticated Encryption: Relations among notions and analysis of the generic composition paradigm

Authenticated Encryption: Relations among notions and analysis of the generic composition paradigm Authenticated Encryption: Relations among notions and analysis of the generic composition paradigm Mihir Bellare Chanathip Namprempre July 14, 2007 Abstract An authenticated encryption scheme is a symmetric

More information

Symmetric Encryption 2: Integrity

Symmetric Encryption 2: Integrity http://wwmsite.wpengine.com/wp-content/uploads/2011/12/integrity-lion-300x222.jpg Symmetric Encryption 2: Integrity With material from Dave Levin, Jon Katz, David Brumley 1 Summing up (so far) Computational

More information

Homework 3: Solution

Homework 3: Solution Homework 3: Solution March 28, 2013 Thanks to Sachin Vasant and Xianrui Meng for contributing their solutions. Exercise 1 We construct an adversary A + that does the following to win the CPA game: 1. Select

More information

Lecture 1: Perfect Security

Lecture 1: Perfect Security CS 290G (Fall 2014) Introduction to Cryptography Oct 2nd, 2014 Instructor: Rachel Lin 1 Recap Lecture 1: Perfect Security Scribe: John Retterer-Moore Last class, we introduced modern cryptography and gave

More information

Lecture 15: Public Key Encryption: I

Lecture 15: Public Key Encryption: I CSE 594 : Modern Cryptography 03/28/2017 Lecture 15: Public Key Encryption: I Instructor: Omkant Pandey Scribe: Arun Ramachandran, Parkavi Sundaresan 1 Setting In Public-key Encryption (PKE), key used

More information

How to Securely Release Unverified Plaintext in Authenticated Encryption

How to Securely Release Unverified Plaintext in Authenticated Encryption How to Securely Release Unverified Plaintext in Authenticated Encryption Elena Andreeva 1,2, Andrey Bogdanov 3, Atul Luykx 1,2, Bart Mennink 1,2, Nicky Mouha 1,2, and an Yasuda 1,4 1 epartment of Electrical

More information

Message authentication codes

Message authentication codes Message authentication codes Martin Stanek Department of Computer Science Comenius University stanek@dcs.fmph.uniba.sk Cryptology 1 (2017/18) Content Introduction security of MAC Constructions block cipher

More information

Solutions to exam in Cryptography December 17, 2013

Solutions to exam in Cryptography December 17, 2013 CHALMERS TEKNISKA HÖGSKOLA Datavetenskap Daniel Hedin DIT250/TDA351 Solutions to exam in Cryptography December 17, 2013 Hash functions 1. A cryptographic hash function is a deterministic function that

More information

Lecture 18 Message Integrity. Stephen Checkoway University of Illinois at Chicago CS 487 Fall 2017 Slides from Miller & Bailey s ECE 422

Lecture 18 Message Integrity. Stephen Checkoway University of Illinois at Chicago CS 487 Fall 2017 Slides from Miller & Bailey s ECE 422 Lecture 18 Message Integrity Stephen Checkoway University of Illinois at Chicago CS 487 Fall 2017 Slides from Miller & Bailey s ECE 422 Cryptography is the study/practice of techniques for secure communication,

More information

Cryptography (cont.)

Cryptography (cont.) CSE 484 / CSE M 584 (Autumn 2011) Cryptography (cont.) Daniel Halperin Tadayoshi Kohno Thanks to Dan Boneh, Dieter Gollmann, John Manferdelli, John Mitchell, Vitaly Shmatikov, Bennet Yee, and many others

More information

Goals of Modern Cryptography

Goals of Modern Cryptography Goals of Modern Cryptography Providing information security: Data Privacy Data Integrity and Authenticity in various computational settings. Data Privacy M Alice Bob The goal is to ensure that the adversary

More information

Data Integrity & Authentication. Message Authentication Codes (MACs)

Data Integrity & Authentication. Message Authentication Codes (MACs) Data Integrity & Authentication Message Authentication Codes (MACs) Goal Ensure integrity of messages, even in presence of an active adversary who sends own messages. Alice (sender) Bob (reciever) Fran

More information

Cryptography [Symmetric Encryption]

Cryptography [Symmetric Encryption] CSE 484 / CSE M 584: Computer Security and Privacy Cryptography [Symmetric Encryption] Spring 2017 Franziska (Franzi) Roesner franzi@cs.washington.edu Thanks to Dan Boneh, Dieter Gollmann, Dan Halperin,

More information

CSC 5930/9010 Modern Cryptography: Cryptographic Hashing

CSC 5930/9010 Modern Cryptography: Cryptographic Hashing CSC 5930/9010 Modern Cryptography: Cryptographic Hashing Professor Henry Carter Fall 2018 Recap Message integrity guarantees that a message has not been modified by an adversary Definition requires that

More information

Message Authentication ( 消息认证 )

Message Authentication ( 消息认证 ) Message Authentication ( 消息认证 ) Sheng Zhong Yuan Zhang Computer Science and Technology Department Nanjing University 2017 Fall Sheng Zhong, Yuan Zhang (CS@NJU) Message Authentication ( 消息认证 ) 2017 Fall

More information

Lecture 5. Constructions of Block ciphers. Winter 2018 CS 485/585 Introduction to Cryptography

Lecture 5. Constructions of Block ciphers. Winter 2018 CS 485/585 Introduction to Cryptography 1 Winter 2018 CS 485/585 Introduction to Cryptography Lecture 5 Portland State University Jan. 23, 2018 Lecturer: Fang Song Draft note. Version: January 25, 2018. Email fang.song@pdx.edu for comments and

More information

Practical Aspects of Modern Cryptography

Practical Aspects of Modern Cryptography Practical Aspects of Modern Cryptography Lecture 3: Symmetric s and Hash Functions Josh Benaloh & Brian LaMacchia Meet Alice and Bob Alice Bob Message Modern Symmetric s Setup: Alice wants to send a private

More information

Some Aspects of Block Ciphers

Some Aspects of Block Ciphers Some Aspects of Block Ciphers Palash Sarkar Applied Statistics Unit Indian Statistical Institute, Kolkata India palash@isical.ac.in CU-ISI Tutorial Workshop on Cryptology, 17 th July 2011 Palash Sarkar

More information

APPLICATIONS AND PROTOCOLS. Mihir Bellare UCSD 1

APPLICATIONS AND PROTOCOLS. Mihir Bellare UCSD 1 APPLICATIONS AND PROTOCOLS Mihir Bellare UCSD 1 Some applications and protocols Internet Casino Commitment Shared coin flips Threshold cryptography Forward security Program obfuscation Zero-knowledge Certified

More information

COS433/Math 473: Cryptography. Mark Zhandry Princeton University Spring 2017

COS433/Math 473: Cryptography. Mark Zhandry Princeton University Spring 2017 COS433/Math 473: Cryptography Mark Zhandry Princeton University Spring 2017 Message Authentication Codes Syntax: Key space K λ Message space M Tag space T λ MAC(k,m) à σ Ver(k,m,σ) à 0/1 Correctness: m,k,

More information

Authenticated Encryption in SSH: Provably Fixing the SSH Binary Packet Protocol

Authenticated Encryption in SSH: Provably Fixing the SSH Binary Packet Protocol Authenticated Encryption in SSH: Provably Fixing the SSH Binary Packet Protocol Mihir Bellare UC San Diego mihir@cs.ucsd.edu Tadayoshi Kohno UC San Diego tkohno@cs.ucsd.edu Chanathip Namprempre Thammasat

More information

Data Integrity & Authentication. Message Authentication Codes (MACs)

Data Integrity & Authentication. Message Authentication Codes (MACs) Data Integrity & Authentication Message Authentication Codes (MACs) Goal Ensure integrity of messages, even in presence of an active adversary who sends own messages. Alice (sender) Bob (receiver) Fran

More information

Introduction to Cryptography. Lecture 3

Introduction to Cryptography. Lecture 3 Introduction to Cryptography Lecture 3 Benny Pinkas March 6, 2011 Introduction to Cryptography, Benny Pinkas page 1 Pseudo-random generator seed s (random, s =n) Pseudo-random generator G Deterministic

More information

L13. Reviews. Rocky K. C. Chang, April 10, 2015

L13. Reviews. Rocky K. C. Chang, April 10, 2015 L13. Reviews Rocky K. C. Chang, April 10, 2015 1 Foci of this course Understand the 3 fundamental cryptographic functions and how they are used in network security. Understand the main elements in securing

More information

Crypto-systems all around us ATM machines Remote logins using SSH Web browsers (https invokes Secure Socket Layer (SSL))

Crypto-systems all around us ATM machines Remote logins using SSH Web browsers (https invokes Secure Socket Layer (SSL)) Introduction (Mihir Bellare Text/Notes: http://cseweb.ucsd.edu/users/mihir/cse207/) Cryptography provides: Data Privacy Data Integrity and Authenticity Crypto-systems all around us ATM machines Remote

More information

Concrete Security of Symmetric-Key Encryption

Concrete Security of Symmetric-Key Encryption Concrete Security of Symmetric-Key Encryption Breno de Medeiros Department of Computer Science Florida State University Concrete Security of Symmetric-Key Encryption p.1 Security of Encryption The gold

More information

CSE 127: Computer Security Cryptography. Kirill Levchenko

CSE 127: Computer Security Cryptography. Kirill Levchenko CSE 127: Computer Security Cryptography Kirill Levchenko October 24, 2017 Motivation Two parties want to communicate securely Secrecy: No one else can read messages Integrity: messages cannot be modified

More information

The OCB Authenticated-Encryption Algorithm

The OCB Authenticated-Encryption Algorithm The OCB Authenticated-Encryption Algorithm Ted Krovetz California State University, Sacramento, USA Phillip Rogaway University of California, Davis, USA IETF 83 Paris, France CFRG 11:20-12:20 in 212/213

More information

Definitions and Notations

Definitions and Notations Chapter 2 Definitions and Notations In this chapter, we present definitions and notation. We start with the definition of public key encryption schemes and their security models. This forms the basis of

More information

Lecture 8 - Message Authentication Codes

Lecture 8 - Message Authentication Codes Lecture 8 - Message Authentication Codes Benny Applebaum, Boaz Barak October 12, 2007 Data integrity Until now we ve only been interested in protecting secrecy of data. However, in many cases what we care

More information

Homework 2. Out: 09/23/16 Due: 09/30/16 11:59pm UNIVERSITY OF MARYLAND DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING

Homework 2. Out: 09/23/16 Due: 09/30/16 11:59pm UNIVERSITY OF MARYLAND DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING UNIVERSITY OF MARYLAND DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING ENEE 457 Computer Systems Security Instructor: Charalampos Papamanthou Homework 2 Out: 09/23/16 Due: 09/30/16 11:59pm Instructions

More information

Defining Encryption. Lecture 2. Simulation & Indistinguishability

Defining Encryption. Lecture 2. Simulation & Indistinguishability Defining Encryption Lecture 2 Simulation & Indistinguishability Roadmap First, Symmetric Key Encryption Defining the problem We ll do it elaborately, so that it will be easy to see different levels of

More information

AWS Key Management Service (KMS) Handling cryptographic bounds for use of AES-GCM

AWS Key Management Service (KMS) Handling cryptographic bounds for use of AES-GCM AWS Key Management Service (KMS) Handling cryptographic bounds for use of AES-GCM Matthew Campagna Amazon Web Services Shay Gueron Amazon Web Services University of Haifa 1 Outline The AWS Key Management

More information

Distributed Key Management and Cryptographic Agility. Tolga Acar 24 Feb. 2011

Distributed Key Management and Cryptographic Agility. Tolga Acar 24 Feb. 2011 Distributed Key Management and Cryptographic Agility Tolga Acar 24 Feb. 2011 1 Overview Distributed Key Lifecycle Problem statement and status quo Distributed Key Manager Typical application scenario and

More information

ENEE 457: Computer Systems Security 09/12/16. Lecture 4 Symmetric Key Encryption II: Security Definitions and Practical Constructions

ENEE 457: Computer Systems Security 09/12/16. Lecture 4 Symmetric Key Encryption II: Security Definitions and Practical Constructions ENEE 457: Computer Systems Security 09/12/16 Lecture 4 Symmetric Key Encryption II: Security Definitions and Practical Constructions Charalampos (Babis) Papamanthou Department of Electrical and Computer

More information

Computer Security. 08r. Pre-exam 2 Last-minute Review Cryptography. Paul Krzyzanowski. Rutgers University. Spring 2018

Computer Security. 08r. Pre-exam 2 Last-minute Review Cryptography. Paul Krzyzanowski. Rutgers University. Spring 2018 Computer Security 08r. Pre-exam 2 Last-minute Review Cryptography Paul Krzyzanowski Rutgers University Spring 2018 March 26, 2018 CS 419 2018 Paul Krzyzanowski 1 Cryptographic Systems March 26, 2018 CS

More information

CS 6903 Modern Cryptography February 14th, Lecture 4: Instructor: Nitesh Saxena Scribe: Neil Stewart, Chaya Pradip Vavilala

CS 6903 Modern Cryptography February 14th, Lecture 4: Instructor: Nitesh Saxena Scribe: Neil Stewart, Chaya Pradip Vavilala CS 6903 Modern Cryptography February 14th, 2008 Lecture 4: Instructor: Nitesh Saxena Scribe: Neil Stewart, Chaya Pradip Vavilala Definition 1 (Indistinguishability (IND-G)) IND-G is a notion that was defined

More information

Lecture 4: Authentication and Hashing

Lecture 4: Authentication and Hashing Lecture 4: Authentication and Hashing Introduction to Modern Cryptography 1 Benny Applebaum Tel-Aviv University Fall Semester, 2011 12 1 These slides are based on Benny Chor s slides. Some Changes in Grading

More information

CS 4770: Cryptography. CS 6750: Cryptography and Communication Security. Alina Oprea Associate Professor, CCIS Northeastern University

CS 4770: Cryptography. CS 6750: Cryptography and Communication Security. Alina Oprea Associate Professor, CCIS Northeastern University CS 4770: Cryptography CS 6750: Cryptography and Communication Security Alina Oprea Associate Professor, CCIS Northeastern University February 8 2018 Review CPA-secure construction Security proof by reduction

More information

Encrypted databases. Tom Ristenpart CS 6431

Encrypted databases. Tom Ristenpart CS 6431 Encrypted databases Tom Ristenpart CS 6431 Outsourced storage settings Client wants to store data up on Dropbox High availability, synch across devices Server includes much value-add functionality Keyword

More information

More crypto and security

More crypto and security More crypto and security CSE 199, Projects/Research Individual enrollment Projects / research, individual or small group Implementation or theoretical Weekly one-on-one meetings, no lectures Course grade

More information

What Can Be Proved About Security?

What Can Be Proved About Security? What Can Be Proved About Security? Palash Sarkar Applied Statistics Unit Indian Statistical Institute, Kolkata India palash@isical.ac.in Centre for Artificial Intelligence and Robotics Bengaluru 23 rd

More information

Advanced Cryptography 1st Semester Symmetric Encryption

Advanced Cryptography 1st Semester Symmetric Encryption Advanced Cryptography 1st Semester 2007-2008 Pascal Lafourcade Université Joseph Fourrier, Verimag Master: October 22th 2007 1 / 58 Last Time (I) Security Notions Cyclic Groups Hard Problems One-way IND-CPA,

More information

Chapter 4. Symmetric Encryption. 4.1 Symmetric encryption schemes

Chapter 4. Symmetric Encryption. 4.1 Symmetric encryption schemes Chapter 4 Symmetric Encryption The symmetric setting considers two parties who share a key and will use this key to imbue communicated data with various security attributes. The main security goals are

More information

Authenticated Encryption

Authenticated Encryption 18733: Applied Cryptography Anupam Datta (CMU) Authenticated Encryption Online Cryptography Course Authenticated Encryption Active attacks on CPA-secure encryption Recap: the story so far Confidentiality:

More information

Summary on Crypto Primitives and Protocols

Summary on Crypto Primitives and Protocols Summary on Crypto Primitives and Protocols Levente Buttyán CrySyS Lab, BME www.crysys.hu 2015 Levente Buttyán Basic model of cryptography sender key data ENCODING attacker e.g.: message spatial distance

More information

Security of Cryptosystems

Security of Cryptosystems Security of Cryptosystems Sven Laur swen@math.ut.ee University of Tartu Formal Syntax Symmetric key cryptosystem m M 0 c Enc sk (m) sk Gen c sk m Dec sk (c) A randomised key generation algorithm outputs

More information

Cryptography Lecture 4. Attacks against Block Ciphers Introduction to Public Key Cryptography. November 14, / 39

Cryptography Lecture 4. Attacks against Block Ciphers Introduction to Public Key Cryptography. November 14, / 39 Cryptography 2017 Lecture 4 Attacks against Block Ciphers Introduction to Public Key Cryptography November 14, 2017 1 / 39 What have seen? What are we discussing today? What is coming later? Lecture 3

More information

1 One-Time Pad. 1.1 One-Time Pad Definition

1 One-Time Pad. 1.1 One-Time Pad Definition 1 One-Time Pad Secure communication is the act of conveying information from a sender to a receiver, while simultaneously hiding it from everyone else Secure communication is the oldest application of

More information

CS 161 Computer Security

CS 161 Computer Security Raluca Popa Spring 2018 CS 161 Computer Security Discussion 3 Week of February 5, 2018: Cryptography I Question 1 Activity: Cryptographic security levels (20 min) Say Alice has a randomly-chosen symmetric

More information

page 1 Introduction to Cryptography Benny Pinkas Lecture 3 November 18, 2008 Introduction to Cryptography, Benny Pinkas

page 1 Introduction to Cryptography Benny Pinkas Lecture 3 November 18, 2008 Introduction to Cryptography, Benny Pinkas Introduction to Cryptography Lecture 3 Benny Pinkas page 1 1 Pseudo-random generator Pseudo-random generator seed output s G G(s) (random, s =n) Deterministic function of s, publicly known G(s) = 2n Distinguisher

More information

10 Chosen Ciphertext Attacks

10 Chosen Ciphertext Attacks 10 Chosen Ciphertext Attacks In this chapter we discuss the limitations of the CPA security definition. In short, the CPA security definition considers only the information leaked to the adversary by honestlygenerated

More information

CPSC 467b: Cryptography and Computer Security

CPSC 467b: Cryptography and Computer Security CPSC 467b: Cryptography and Computer Security Lecture 6 Michael J. Fischer Department of Computer Science Yale University January 27, 2010 Michael J. Fischer CPSC 467b, Lecture 6 1/36 1 Using block ciphers

More information

: Practical Cryptographic Systems March 25, Midterm

: Practical Cryptographic Systems March 25, Midterm 650.445: Practical Cryptographic Systems March 25, 2010 Instructor: Matthew Green Midterm Name: As with any exam, please do not collaborate or otherwise share information with any other person. You are

More information

Security & Indistinguishability in the Presence of Traffic Analysis

Security & Indistinguishability in the Presence of Traffic Analysis Security & Indistinguishability in the Presence of Traffic Analysis Cristina Onete 1 Daniele Venturi 2 1 Darmstadt University of Technology & CASED, Germany www.minicrypt.de 2 SAPIENZA University of Rome,

More information

CSCI 5440: Cryptography Lecture 5 The Chinese University of Hong Kong, Spring and 6 February 2018

CSCI 5440: Cryptography Lecture 5 The Chinese University of Hong Kong, Spring and 6 February 2018 CSCI 5440: Cryptography Lecture 5 The Chinese University of Hong Kong, Spring 2018 5 and 6 February 2018 Identification schemes are mechanisms for Alice to prove her identity to Bob They comprise a setup

More information

Lecture 07: Private-key Encryption. Private-key Encryption

Lecture 07: Private-key Encryption. Private-key Encryption Lecture 07: Three algorithms Key Generation: Generate the secret key sk Encryption: Given the secret key sk and a message m, it outputs the cipher-text c (Note that the encryption algorithm can be a randomized

More information

OCB Mode. Mihir Bellare UCSD John Black UNR Ted Krovetz Digital Fountain

OCB Mode. Mihir Bellare UCSD John Black UNR Ted Krovetz Digital Fountain OCB Mode Phillip Rogaway Department of Computer Science UC Davis + Chiang Mai Univ rogaway@cs.ucdavis.edu http://www.cs.ucdavis.edu/~rogaway +66 1 530 7620 +1 530 753 0987 Mihir Bellare UCSD mihir@cs.ucsd.edu

More information

Cryptography 2017 Lecture 3

Cryptography 2017 Lecture 3 Cryptography 2017 Lecture 3 Block Ciphers - AES, DES Modes of Operation - ECB, CBC, CTR November 7, 2017 1 / 1 What have seen? What are we discussing today? What is coming later? Lecture 2 One Time Pad

More information