Appendix A: Introduction to cryptographic algorithms and protocols

Size: px
Start display at page:

Download "Appendix A: Introduction to cryptographic algorithms and protocols"

Transcription

1 Security and Cooperation in Wireless Networks Appendix A: Introduction to cryptographic algorithms and protocols 2007 Levente Buttyán and Jean-Pierre Hubaux symmetric and asymmetric key encryption; hash functions; MAC functions; digital signatures; key establishment protocols; advanced authentication techniques; Chapter outline A.1 Introduction A.3 Hash functions A.4 Message authentication codes A.5 Digital signatures A.6 Session key establishment protocols A.7 Pseudo-random number generators A.8 Advanced authentication techniques 2/77 1

2 Introduction security is about how to prevent attacks, or -- if prevention is not possible -- how to detect attacks and recover from them an attack is a a deliberate attempt to compromise a system; it usually exploits weaknesses in the system s design, implementation, operation, or management attacks can be passive attempts to learn or make use of information from the system but does not affect system resources examples: eavesdropping message contents, traffic analysis difficult to detect, should be prevented active attempts to alter system resources or affect their operation examples: masquerade (spoofing), replay, modification (substitution, insertion, destruction), denial of service difficult to prevent, should be detected A.1 Introduction 3/77 Main security services authentication aims to detect masquerade provides assurance that a communicating entity is the one that it claims to be access control aims to prevent unauthorized access to resources confidentiality aims to protect data from unauthorized disclosure usually based on encryption integrity aims to detect modification and replay provides assurance that data received are exactly as sent by the sender non-repudiation provides protection against denial by one entity involved in a communication of having participated in all or part of the communication two basic types: non-repudiation of origin and non-repudiation of delivery A.1 Introduction 4/77 2

3 Some security mechanisms encryption symmetric key, asymmetric (public) key digital signature access control schemes access control lists, capabilities, security labels,... data integrity mechanisms message authentication codes, sequence numbering, time stamping, cryptographic chaining authentication protocols passwords, cryptographic challenge-response protocols, biometrics traffic padding, route control, A.1 Introduction 5/77 Chapter outline A.1 Introduction A.3 Hash functions A.4 Message authentication codes A.5 Digital signatures A.6 Session key establishment protocols A.7 Pseudo-random number generators A.8 Advanced authentication techniques 6/77 3

4 Classical model of encryption m plaintext (m) ciphertext D D ( (m)) = m encryption key eavesdropping adversary decryption key goal of the adversary: to systematically recover plaintexts from ciphertexts to deduce the (decryption) key erckhoff s principle: we must assume that the adversary knows all details of and D security of the system should be based on the protection of the decryption key 7/77 Adversary models ciphertext-only attack the adversary can only observe ciphertexts produced by the same encryption key known-plaintext attack the adversary can obtain corresponding plaintext-ciphertext pairs produced with the same encryption key (adaptive) chosen-plaintext attack the adversary can choose plaintexts and obtain the corresponding ciphertexts (adaptive) chosen-ciphertext attack the adversary can choose ciphertexts and obtain the corresponding plaintexts related-key attack the adversary can obtain ciphertexts, or plaintext-ciphertext pairs that are produced with different encryption keys that are related in a known way to a specific encryption key 8/77 4

5 Security of encryption schemes an encryption scheme is secure in a given adversary model if it is computationally infeasible for the adversary to determine the target decryption key under the assumptions of the given model for many encryption schemes used in practice, no proof of security exists these schemes are used, nevertheless, because they are efficient and they resist all known attacks some encryption schemes are provably secure, however these schemes are often inefficient 9/77 Basic classification encryption schemes symmetric-key encryption it is easy to compute from (and vice versa) usually = two main types: stream ciphers operate on individual characters of the plaintext block ciphers process the plaintext in larger blocks of characters asymmetric-key encryption it is hard (computationally infeasible) to compute from can be made public ( public-key cryptography) 10/77 5

6 Block ciphers an n bit block cipher is a function : {0, 1} n x {0, 1} k {0, 1} n, such that for each {0, 1} k, (x, ) = (x) is an invertible mapping from {0, 1} n to {0, 1} n k bit key n bit input n bit output Block ciphers 11/77 Block cipher design criteria completeness each bit of the output block should depend on each bit of the input block and on each bit of the key avalanche effect changing one bit in the input block should change approximately half of the bits in the output block similarly, changing one key bit should result in the change of approximately half of the bits in the output block statistical independence input and output should appear to be statistically independent Block ciphers 12/77 6

7 How to satisfy the design criteria? complex encryption function can be built by composing several simple operations which offer complementary but individually insufficient protection simple operations: elementary arithmetic operations logical operations (e.g., XOR) modular multiplication transpositions substitutions... combine two or more transformations in a manner that the resulting cipher is more secure than the individual components Block ciphers 13/77 xample: DS (Data ncryption Standard) X (64) Initial Permutation (32) + F + F + F (32) (48) 1 (48) 2 (48) ey Scheduler (56) input size: 64 output size: 64 key size: rounds Feistel structure 3 + F (48) 16 Initial Permutation -1 Y (64) Block ciphers 14/77 7

8 xample: the DS round function F key injection S1 S2 S3 S4 S5 S6 S7 S8 P Si substitution box (S-box) P permutation box (P-box) Block ciphers 15/77 xample: the DS key scheduler (28) Permuted Choice 1 Left shift(s) (56) (28) Left shift(s) each key bit is used in around 14 out of 16 rounds (28) (28) 1 (48) Permuted Choice 2 Left shift(s) Left shift(s) 2 (48) Permuted Choice 2 Block ciphers 16/77 8

9 xhaustive key search attack given a small number of plaintext-ciphertext pairs encrypted under a key, can be recovered by exhaustive key search with 2 k-1 processing complexity (expected number of operations) input: (X, Y), (X, Y ), progress through the entire key space, and for each candidate key, do the following: decrypt Y with if the result is not X, then throw away if the result is X, then check the other pairs (X, Y ), if does not work for at least one pair, then throw away and take another key if worked for all pairs (X, Y), (X, Y ),, then output as the target key on average, the target key is found after searching half of the key space if the plaintexts are known to contain redundancy, then ciphertext-only exhaustive key search is possible with a relatively small number of ciphertexts in practice, key size should be at least 128 bits Block ciphers 17/77 Algebraic attacks having a large key size is only a necessary condition for the security of a block cipher a block cipher can be broken due to the weaknesses in its internal (algebraic) structure, even if it uses large keys example: naïve exhaustive key search against DS: 2 55 attack using the complementation property of DS: 2 54 Y = DS (X) implies Y* = DS * (X*), where X* denotes the bitwise complement of X differential cryptanalysis of DS: 2 47 linear cryptanalysis of DS: 2 43 Block ciphers 18/77 9

10 Block cipher modes of operation CB lectronic Codebook used to encipher a single plaintext block (e.g., a DS key) CBC Cipher Block Chaining repeated use of the encryption algorithm to encipher a message consisting of many blocks CFB Cipher Feedback used to encipher a stream of characters, dealing with each character as it comes OFB Output Feedback another method of stream encryption, used on noisy channels CTR Counter simplified OFB with certain advantages Block cipher modes of operation 19/77 CB mode encrypt P 1 P 2 P N C 1 C 2 C N decrypt C 1 C 2 C N D D D P 1 P 2 P N Block cipher modes of operation 20/77 10

11 Properties of the CB mode identical plaintext blocks result in identical ciphertext blocks (under the same key, of course) messages to be encrypted often have very regular formats repeating fragments, special headers, string of 0s, etc. are quite common blocks are encrypted independently of other blocks reordering ciphertext blocks result in correspondingly reordered plaintext blocks ciphertext blocks can be cut from one message and pasted in another, possibly without detection error propagation: one bit error in a ciphertext block affects only the corresponding plaintext block (results in garbage) overall: not recommended for messages longer than one block, or if keys are reused for more than one block Block cipher modes of operation 21/77 CBC mode encrypt P 1 P 2 P 3 P N IV C N-1 + C 1 C 2 C 3 C N decrypt C 1 C 2 C 3 C N D D D D IV C N-1 + P 1 P 2 P 3 P N Block cipher modes of operation 22/77 11

12 Properties of the CBC mode encrypting the same plaintexts under the same key, but different IVs result in different ciphertexts ciphertext block C j depends on P j and all preceding plaintext blocks rearranging ciphertext blocks affects decryption however, dependency on the preceding plaintext blocks is only via the previous ciphertext block C j-1 proper decryption of a correct ciphertext block needs a correct preceding ciphertext block only error propagation: one bit error in a ciphertext block C j has an effect on the j-th and (j+1)-st plaintext block P j is complete garbage and P j+1 has bit errors where C j had an attacker may cause predictable bit changes in the (j+1)-st plaintext block error recovery: recovers from bit errors (self-synchronizing) cannot, however, recover from frame errors ( lost bits) Block cipher modes of operation 23/77 Integrity of the IV in the CBC mode the IV need not be secret, but its integrity should be protected malicious modification of the IV allows an attacker to make predictable changes to the first plaintext block recovered one solution is to send the IV in an encrypted form at the beginning of the CBC encrypted message Block cipher modes of operation 24/77 12

13 Padding the length of the message may not be a multiple of the block size of the cipher one can add some extra bytes to the short end block until it reaches the correct size this is called padding usually the last byte indicates the number of padding bytes added this allows the receiver to remove the padding short end block padding 05 Block cipher modes of operation 25/77 CFB mode encrypt decrypt initialized with IV (s) initialized with IV shift register (s) shift register select s bits select s bits P i (s) + (s) (s) C i C i (s) + (s) (s) P i Block cipher modes of operation 26/77 13

14 Properties of the CFB mode encrypting the same plaintexts under the same key, but different IVs result in different ciphertexts the IV can be sent in clear ciphertext block C j depends on P j and all preceding plaintext blocks rearranging ciphertext blocks affects decryption proper decryption of a correct ciphertext block needs the preceding n/s ciphertext blocks to be correct error propagation: one bit error in a ciphertext block C j has an effect on the decryption of that and the next n/s ciphertext blocks (the error remains in the shift register for n/s steps) P j has bit errors where C j had, all the other erroneous plaintext blocks are garbage an attacker may cause predictable bit changes in the j-th plaintext block error recovery: self synchronizing, but requires n/s blocks to recover Block cipher modes of operation 27/77 OFB mode encrypt decrypt initialized with IV initialized with IV shift register (s) shift register (s) select s bits select s bits (s) (s) P i (s) + (s) C i C i (s) + (s) P i Block cipher modes of operation 28/77 14

15 Properties of the OFB mode a different IV should be used for every new message, otherwise messages will be encrypted with the same key stream the IV can be sent in clear however, if the IV is modified by the attacker, then the cipher will never recover (unlike CFB) ciphertext block C j depends on P j only (does not depend on the preceding plaintext blocks) however, rearranging ciphertext blocks affects decryption error propagation: one bit error in a ciphertext block C j has an effect on the decryption of only that ciphertext block P j has bit errors where C j had an attacker may cause predictable bit changes in the j-th plaintext block error recovery: recovers from bit errors never recovers if bits are lost or the IV is modified Block cipher modes of operation 29/77 CTR mode encrypt decrypt counter + i counter + i P i + C i C i + P i Block cipher modes of operation 30/77 15

16 Properties of the CTR mode similar to OFB cycle length depends on the size of the counter (typically 2 n ) the i-th block can be decrypted independently of the others parallelizable (unlike OFB) random access the values to be XORed with the plaintext can be pre-computed at least as secure as the other modes note1: in CFB, OFB, and CTR mode only the encryption algorithm is used (decryption is not needed), that is why some ciphers (e.g., AS) is optimized for encryption note2: the OFB and CTR modes essentially make a synchronous stream cipher out of a block cipher, whereas the CFB mode converts a block cipher into a self-synchronizing stream-cipher Block cipher modes of operation 31/77 Stream ciphers while block ciphers simultaneously encrypt groups of characters, stream ciphers encrypt individual characters may be better suited for real time applications stream ciphers are usually faster than block ciphers in hardware (but not necessarily in software) limited or no error propagation may be advantageous when transmission errors are probable note: the distinction between stream ciphers and block ciphers is not definitive stream ciphers can be built out of block ciphers using CFB, OFB, or CTR modes a block cipher in CB or CBC mode can be viewed as a stream cipher that operates on large characters Stream ciphers 32/77 16

17 Synchronous stream ciphers f k p i σ i+1 z i σ i g k h c i the key stream is generated independently of the plaintext and of the ciphertext needs synchronization between the sender and the receiver if a character is inserted into or deleted from the ciphertext stream then synchronization is lost and the plaintext cannot be recovered additional techniques must be used to recover from loss of synch. no error propagation a ciphertext character that is modified during transmission affects only the decryption of that character an attacker can make changes to selected ciphertext characters and know exactly what effect these changes have on the plaintext (if h = XOR) Stream ciphers 33/77 Self-synchronizing stream ciphers p i register g k z i h c i the key stream is generated as a function of a fixed number of previous ciphertext characters self-synchronizing since the size t of the register is fixed, a lost ciphertext character affects only the decryption of the next t ciphertext characters limited error propagation if a ciphertext character is modified, then decryption of the next t ciphertext characters may be incorrect ciphertext characters depend on all previous plaintext characters better diffusion of plaintext statistics Stream ciphers 34/77 17

18 The Vernam cipher and the one-time pad Vernam cipher c i = p i k i for i = 1, 2, where p i are the plaintext digits, k i are the key stream digits, c i are the ciphertext digits, and is the bitwise XOR operation one-time pad a Vernam cipher where the key stream digits are generated independently and uniformly at random the one-time pad is unconditionally secure [Shannon, 1949] I(P; C) = H(P) - H(P C) = 0 a necessary condition for a symmetric key cipher to be unconditionally secure is that H() H(P) [Shannon, 1949] practically, the key must have as many bits as the compressed plaintext impractical because of key management problems Stream ciphers 35/77 Asymmetric-key encryption m plaintext (m) ciphertext D D ( (m)) = m (public) encryption key attacker (private) decryption key asymmetric-key encryption it is hard (computationally infeasible) to compute from can be made public (public-key cryptography) no need for key setup before communication public-keys are not confidential but they must be authentic! the security of asymmetric-key encryption schemes is usually based on some well-known or widely believed hard problems A.2.2 Asymmetric-key encryption 36/77 18

19 xamples for hard problems factoring problem given a positive integer n, find its prime factors true complexity is unknown it is believed that it does not belong to P discrete logarithm problem given a prime p, a generator g of Z p*, and an element y in Z p*, find the integer x, 0 x p-2, such that g x mod p = y true complexity is unknown it is believed that it does not belong to P Diffie-Hellman problem given a prime p, a generator g of Z p*, and elements g x mod p and g y mod p, find g xy mod p true complexity is unknown it is believed that it does not belong to P A.2.2 Asymmetric-key encryption 37/77 The RSA encryption scheme key generation select p, q large primes (about 500 bits each) n = pq, φ = (p-1)(q-1) select e such that 1 < e < φ and gcd(e, φ) = 1 compute d such that ed mod φ = 1 (this is easy if φ is known) the public key is (e, n) the private key is d encryption represent the message as an integer m in [0, n-1] compute c = m e mod n decryption compute m = c d mod n A.2.2 Asymmetric-key encryption 38/77 19

20 Relation to factoring the problem of computing d from (e, n) is computationally equivalent to the problem of factoring n if one can factor n, then one can easily compute d if one can compute d, then one can efficiently factor n the problem of computing m from c and (e, n) (called the RSA problem) is believed to be computationally equivalent to factoring if one can factor n, then one can easily compute m from c and (e, n) there s no formal proof for the other direction A.2.2 Asymmetric-key encryption 39/77 The need for salting let us assume that the adversary observes a ciphertext c = (m) let the set of possible plaintexts be M if M is small, then the adversary can try to encrypt every message in M with the publicly known key until she finds the message m that maps into c the usual way to prevent this attack is to randomize the encryption some random bytes are added to the plaintext message before encryption through the application of the PCS #1 formatting rules when the message is decrypted, the recipient can recognize and discard these random bytes A.2.2 Asymmetric-key encryption 40/77 20

21 The lgamal encryption scheme key generation generate a large random prime p and choose generator g of the multiplicative group Z p * = {1, 2,, p-1} select a random integer a, 1 a p-2, and compute A = g a mod p the public key is (p, g, A) the private key is a encryption represent the message as an integer m in [0, p-1] select a random integer r, 1 r p-2, and compute R = g r mod p compute C = m A r mod p the ciphertext is the pair (R, C) decryption compute m = C R p-1-a mod p proof of decryption C R p-1-a m A r R p-1-a m g ar g r(p-1-a) m (g p-1 ) r m (mod p) A.2.2 Asymmetric-key encryption 41/77 Relation to hard problems security of the lgamal scheme is said to be based on the discrete logarithm problem in Z p*, although equivalence has not been proven yet recovering m given p, g, A, R, and C is equivalent to solving the Diffie-Hellman problem A.2.2 Asymmetric-key encryption 42/77 21

22 Digital enveloping most popular public-key encryption methods are several orders of magnitude slower than the best known symmetric key schemes public-key encryption is used together with symmetric-key encryption; the technique is called digital enveloping plaintext message symmetric-key cipher (e.g., in CBC mode) generate random symmetric key bulk encryption key asymmetric-key cipher public key of the receiver digital envelop A.2.2 Asymmetric-key encryption 43/77 Chapter outline A.1 Introduction A.3 Hash functions A.4 Message authentication codes A.5 Digital signatures A.6 Session key establishment protocols A.7 Pseudo-random number generators A.8 Advanced authentication techniques 44/77 22

23 Hash functions a hash function maps bit strings of arbitrary finite length to bit strings of fixed length (n bits) many-to-one mapping collisions are unavoidable however, finding collisions are difficult the hash value of a message can serve as a compact representative image of the message (similar to fingerprints) message of arbitrary length hash function fix length hash value / message digest / fingerprint A.3 Hash functions 45/77 Desirable properties of hash functions ease of computation given an input x, the hash value h(x) of x is easy to compute weak collision resistance (2 nd preimage resistance) given an input x, it is computationally infeasible to find a second input x such that h(x ) = h(x) strong collision resistance (collision resistance) it is computationally infeasible to find any two distinct inputs x and x such that h(x) = h(x ) one-way property (preimage resistance) given a hash value y (for which no preimage is known), it is computationally infeasible to find any input x s.t. h(x) = y A.3 Hash functions 46/77 23

24 The Birthday Paradox Given a set of N elements, from which we draw k elements randomly (with replacement). What is the probability of encountering at least one repeating element? first, compute the probability of no repetition: the first element x 1 can be anything when choosing the second element x 2, the probability of x 2 x 1 is 1-1/N when choosing x 3, the probability of x 3 x 2 and x 3 x 1 is 1-2/N when choosing the k-th element, the probability of no repetition is 1- (k-1)/n the probability of no repetition is (1-1/N)(1-2/N) (1 (k-1)/n) when x is small, (1-x) e -x (1-1/N)(1-2/N) (1 (k-1)/n) = e -1/N e -2/N e -(k-1)/n = e -k(k-1)/2n the probability of at least one repetition after k drawing is 1 e -k(k-1)/2n A.3 Hash functions 47/77 The Birthday Paradox (cont d) How many drawings do you need, if you want the probability of at least one repetition to be ε? solve the following for k: ε = 1 e -k(k-1)/2n examples: ε = ½ k sqrt(n) ε = ¾ k sqrt(n) ε = 0.9 k sqrt(n) k(k-1) = 2N ln(1/1-ε) k sqrt(2n ln(1/1-ε)) origin of the name Birthday Paradox : elements are dates in a year (N = 365) among sqrt(365) 23 randomly selected people, there will be at least two that have the same birthday with probability ½ A.3 Hash functions 48/77 24

25 Choosing the output size of a hash function the Birthday Paradox have a profound impact on the design of hash functions (and other cryptographic algorithms and protocols)! let n be the output size of a hash function among ~sqrt(2 n ) = 2 n/2 randomly chosen messages, with high probability, there will be a collision pair it is easier to find collisions than to find preimages or 2 nd preimages for a given hash value in order to resist birthday attacks, 2 n/2 should be sufficiently large (e.g., n = 160 bits) A.3 Hash functions 49/77 Iterated hash functions input is divided into fixed length blocks x 1, x 2,, x L last block is padded if necessary Merkle-Damgard strengthening: padding contains the length of the message each input block is processed according to the following scheme x 1 x 2 x 3 x L (b) (b) (b) (b) CV 0 f CV 1 f CV 2 f CV 3 CV L-1 f h(x) = CV L f is called the compression function can be based on a block cipher, or can be a dedicated compression function A.3 Hash functions 50/77 25

26 Chapter outline A.1 Introduction A.3 Hash functions A.4 Message authentication codes A.5 Digital signatures A.6 Session key establishment protocols A.7 Pseudo-random number generators A.8 Advanced authentication techniques 51/77 Message authentication codes (MACs) MAC functions can be viewed as hash functions with two functionally distinct inputs: a message and a secret key they produce a fixed size output (say n bits) called the MAC practically it should be infeasible to produce a correct MAC for a message without the knowledge of the secret key MAC functions can be used to implement data integrity and message origin authentication services message of arbitrary length MAC function secret key fix length MAC A.4 Message authentication codes 52/77 26

27 MAC generation and verification generation message secret key MAC MAC verification message secret key MAC MAC compare yes/no A.4 Message authentication codes 53/77 Desirable properties of MAC functions ease of computation given an input x and a secret key k, it is easy to compute MAC k (x) key non-recovery it is computationally infeasible to recover the secret key k, given one or more text-mac pairs (x i, MAC k (x i )) for that k computation resistance given zero or more text-mac pairs (x i, MAC k (x i )), it is computationally infeasible to find a text-mac pair (x, MAC k (x)) for any new input x x i computation resistance implies key non-recovery but the reverse is not true in general A.4 Message authentication codes 54/77 27

28 CBC MAC x 1 x 2 x 3 x N c N-1 + k k k k c 1 c 2 c 3 k -1 CBC MAC is secure for messages of a fixed number of blocks (adaptive chosen-text existential) forgery is possible if variable length messages are allowed it is recommended to involve the length of the message in the CBC MAC computation k MAC optional c N A.4 Message authentication codes 55/77 HMAC k + ipad x 1 x L padding 1 hash fn CV 0 f CV 1 inner f f M k + opad M padding 2 hash fn HMAC k (X) = H( k H( k X )) CV 0 f CV 1 outer f HMAC k (x) A.4 Message authentication codes 56/77 28

29 Chapter outline A.1 Introduction A.3 Hash functions A.4 Message authentication codes A.5 Digital signatures A.6 Session key establishment protocols A.7 Pseudo-random number generators A.8 Advanced authentication techniques 57/77 Digital signatures similar to MACs but unforgeable by the receiver verifiable by a third party used for message authentication and non-repudiation (of message origin) based on public-key cryptography private key defines a signing transformation S A S A (m) = σ public key defines a verification transformation V A V A (m, σ) = true if S A (m) = σ V A (m, σ) = false otherwise A.5 Digital signatures 58/77 29

30 Attacks on digital signature schemes key-only attack only the public key is available to the adversary known-message attack the adversary has signatures for a set of messages known to her but not chosen by her chosen-message attack the adversary obtains signatures for messages chosen by her before attempting to break the signature scheme adaptive chosen-message attack the adversary is allowed to use the signer as an oracle she may request signatures for messages which depend on previously obtained signatures A.5 Digital signatures 59/77 Hash-and-sign paradigm public/private key operations are slow hash the message first and apply public/private key operations to the hash value only generation h private key of sender message hash signature enc verification message h hash compare yes/no dec public key of sender signature A.5 Digital signatures 60/77 30

31 xamples of digital signature scheme RSA essentially identical to the RSA encryption scheme signature = decryption with private key typical signature length is 1024 bits DSA (Digital Signature Algorithm) based on the lgamal signature scheme typical signature length is 1024 bits CDSA (lliptic Curve DSA) same as DSA but works over elliptic curves reduced signature length (typically 320 bits) A.5 Digital signatures 61/77 Chapter outline A.1 Introduction A.3 Hash functions A.4 Message authentication codes A.5 Digital signatures A.6 Session key establishment protocols A.7 Pseudo-random number generators A.8 Advanced authentication techniques 62/77 31

32 Session key establishment protocols goal of session key establishment protocols to setup a shared secret between two (or more) parties it is desired that the secret established by a fixed pair of parties varies on subsequent executions of the protocol (dynamicity) established shared secret is used as a session key to protect communication between the parties motivation for use of session keys to limit available ciphertext for cryptanalysis to limit exposure caused by the compromise of a session key to avoid long-term storage of a large number of secret keys (keys are created on-demand when actually required) to create independence across communication sessions or applications A.6 Session key establishment protocols 63/77 Basic classification key transport protocols one party creates or otherwise obtains a secret value, and securely transfers it to the other party key agreement protocols a shared secret is derived by the parties as a function of information contributed by each, such that no party can predetermine the resulting value A.6 Session key establishment protocols 64/77 32

33 Further services entity authentication implicit key authentication one party is assured that no other party aside from a specifically identified second party (and possibly some trusted third parties) may gain access to the established session key key confirmation one party is assured that a second (possibly unidentified) party actually possesses the session key possession of a key can be demonstrated by producing a one-way hash value of the key or encryption of known data with the key explicit key authentication implicit key authentication + key confirmation key freshness one party is assured that the key is new (never used before) A.6 Session key establishment protocols 65/77 Further protocol characteristics reciprocity guarantees are provided unilaterally guarantees are provided mutually efficiency number of message exchanges (passes) required total number of bits transmitted (i.e., bandwidth used) complexity of computations by each party possibility of precomputations to reduce on-line computational complexity third party requirements on-line, off-line, or no third party at all degree and type of trust required in the third party system setup distribution of initial keying material A.6 Session key establishment protocols 66/77 33

34 The Wide-Mouth-Frog protocol Alice Server Bob generate k A, as ( B, k, T a ) bs ( A, k, T s ) summary: a simple key transport protocol that uses a trusted third party Alice generates the session key and sends it to Bob via the trusted third party characteristics: implicit key authentication for Alice explicit key authentication for Bob key freshness for Bob with timestamps (flawed) unilateral entity authentication of Alice on-line third party (Server) trusted for secure relaying of keys and verification of freshness, in addition A is trusted for generating good keys initial long-term keys between the parties and the server are required A.6 Session key establishment protocols 67/77 A flaw in the Wide-Mouth-Frog protocol Server B, bs ( A, k, T s ) as ( B, k, T s (1) ) Trudy Bob A, as ( B, k, T s (1) ) bs ( A, k, T s (2) )... bs ( A, k, T s ) summary: after observing one run of the protocol, Trudy can continuously use the Server as an oracle until she wants to bring about re-authentication between Alice and Bob A.6 Session key establishment protocols 68/77 34

35 Signed encrypted keys Alice Bob generate k A, b (k), T a, S a (B, b (k),t a ) summary: Alice generates a session key, encrypts it with Bob s public key, then sings it, and sends it to Bob characteristics: unilateral entity authentication (of Alice), mutual implicit key authentication, no key confirmation, key freshness with timestamp, clock synchronization, off-line third party for issuing public key certificates may be required, initial exchange of public keys between the parties may be required, Alice is trusted to generate keys, non-repudiation guarantee for Bob A.6 Session key establishment protocols 69/77 The Diffie-Hellman protocol Alice Bob select random x compute g x mod p g x mod p g y mod p select random y compute g y mod p compute k = (g y ) x mod p compute k = (g x ) y mod p summary: a key agreement protocol based on one-way functions; in particular, security of the protocol is based on the hardness of the discrete logarithm problem and that of the Diffie-Hellman problem assumptions: p is a large prime, g is a generator of Z p*, both are publicly known system parameters characteristics: NO AUTHNTICATION, key freshness with randomly selected exponents, no party can control the key, no need for a trusted third party A.6 Session key establishment protocols 70/77 35

36 Chapter outline A.1 Introduction A.3 Hash functions A.4 Message authentication codes A.5 Digital signatures A.6 Session key establishment protocols A.7 Pseudo-random number generators A.8 Advanced authentication techniques 71/77 Pseudo-random number generators (PRNGs) a random number is a number that cannot be predicted by an observer before it is generated if the number is generated within the range [0, N-1], then its value cannot be predicted with any better probability than 1/N the above is true even if the observer is given all previously generated numbers a cryptographic pseudo-random number generator (PRNG) is a mechanism that processes somewhat unpredictable inputs and generates pseudo-random outputs if designed, implemented, and used properly, then even an adversary with enormous computational power should not be able to distinguish the PRNG output from a real random sequence A.7 Pseudo-random number generators 72/77 36

37 General operation of PRNGs unpredictable input samples (from physical processes) entropy pool re-keying state update internal state one-way fn pseudo-random bits indistinguishable from real random bits A.7 Pseudo-random number generators 73/77 Desirable properties of PRNGs the adversary cannot compute the internal state of the PRNG, even if she has observed many outputs of the PRNG the adversary cannot compute the next output of the PRNG, even if she has observed many previous outputs of the PRNG if the adversary can observe or even manipulate the input samples that are fed in the PRNG, but she does not know the internal state of the PRNG, then the adversary cannot compute the next output and the next internal state of the PRNG if the adversary has somehow learned the internal state of the PRNG, but she cannot observe the input samples that are fed in the PRNG, then the adversary cannot figure out the internal state of the PRNG after the re-keying operation A.7 Pseudo-random number generators 74/77 37

38 Chapter outline A.1 Introduction A.3 Hash functions A.4 Message authentication codes A.5 Digital signatures A.6 Session key establishment protocols A.7 Pseudo-random number generators A.8 Advanced authentication techniques 75/77 Advanced authentication techniques hash chains Merkle-trees broadcast authentication with TSLA A.8 Advanced authentication techniques 76/77 38

39 Conclusions security services are implemented by using security mechanisms many security mechanisms are based on cryptography (e.g., encryption, digital signature, message authentication codes, ) but be cautious: If you think cryptography is going to solve your problem, you don't understand cryptography and you don't understand your problem. -- Bruce Schneier other important aspects are physical protection procedural rules education 77/77 39

Session key establishment protocols

Session key establishment protocols our task is to program a computer which gives answers which are subtly and maliciously wrong at the most inconvenient possible moment. -- Ross Anderson and Roger Needham, Programming Satan s computer Session

More information

Session key establishment protocols

Session key establishment protocols our task is to program a computer which gives answers which are subtly and maliciously wrong at the most inconvenient possible moment. -- Ross Anderson and Roger Needham, Programming Satan s computer Session

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

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

Symmetric key cryptography

Symmetric key cryptography The best system is to use a simple, well understood algorithm which relies on the security of a key rather than the algorithm itself. This means if anybody steals a key, you could just roll another and

More information

Message authentication

Message authentication Message authentication -- Reminder on hash unctions -- MAC unctions hash based block cipher based -- Digital signatures (c) Levente Buttyán (buttyan@crysys.hu) Hash unctions a hash unction is a unction

More information

CSE 3461/5461: Introduction to Computer Networking and Internet Technologies. Network Security. Presentation L

CSE 3461/5461: Introduction to Computer Networking and Internet Technologies. Network Security. Presentation L CS 3461/5461: Introduction to Computer Networking and Internet Technologies Network Security Study: 21.1 21.5 Kannan Srinivasan 11-27-2012 Security Attacks, Services and Mechanisms Security Attack: Any

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

CSC 774 Network Security

CSC 774 Network Security CSC 774 Network Security Topic 2. Review of Cryptographic Techniques CSC 774 Dr. Peng Ning 1 Outline Encryption/Decryption Digital signatures Hash functions Pseudo random functions Key exchange/agreement/distribution

More information

Computer Security. 08. Cryptography Part II. Paul Krzyzanowski. Rutgers University. Spring 2018

Computer Security. 08. Cryptography Part II. Paul Krzyzanowski. Rutgers University. Spring 2018 Computer Security 08. Cryptography Part II Paul Krzyzanowski Rutgers University Spring 2018 March 23, 2018 CS 419 2018 Paul Krzyzanowski 1 Block ciphers Block ciphers encrypt a block of plaintext at a

More information

Introduction to Network Security Missouri S&T University CPE 5420 Data Integrity Algorithms

Introduction to Network Security Missouri S&T University CPE 5420 Data Integrity Algorithms Introduction to Network Security Missouri S&T University CPE 5420 Data Integrity Algorithms Egemen K. Çetinkaya Egemen K. Çetinkaya Department of Electrical & Computer Engineering Missouri University of

More information

CSCE 715: Network Systems Security

CSCE 715: Network Systems Security CSCE 715: Network Systems Security Chin-Tser Huang huangct@cse.sc.edu University of South Carolina Next Topic in Cryptographic Tools Symmetric key encryption Asymmetric key encryption Hash functions and

More information

Cryptographic Concepts

Cryptographic Concepts Outline Identify the different types of cryptography Learn about current cryptographic methods Chapter #23: Cryptography Understand how cryptography is applied for security Given a scenario, utilize general

More information

Chapter 3 Block Ciphers and the Data Encryption Standard

Chapter 3 Block Ciphers and the Data Encryption Standard Chapter 3 Block Ciphers and the Data Encryption Standard Last Chapter have considered: terminology classical cipher techniques substitution ciphers cryptanalysis using letter frequencies transposition

More information

CSC/ECE 774 Advanced Network Security

CSC/ECE 774 Advanced Network Security Computer Science CSC/ECE 774 Advanced Network Security Topic 2. Network Security Primitives CSC/ECE 774 Dr. Peng Ning 1 Outline Absolute basics Encryption/Decryption; Digital signatures; D-H key exchange;

More information

Cristina Nita-Rotaru. CS355: Cryptography. Lecture 17: X509. PGP. Authentication protocols. Key establishment.

Cristina Nita-Rotaru. CS355: Cryptography. Lecture 17: X509. PGP. Authentication protocols. Key establishment. CS355: Cryptography Lecture 17: X509. PGP. Authentication protocols. Key establishment. Public Keys and Trust Public Key:P A Secret key: S A Public Key:P B Secret key: S B How are public keys stored How

More information

CSC 474/574 Information Systems Security

CSC 474/574 Information Systems Security CSC 474/574 Information Systems Security Topic 2.2 Secret Key Cryptography CSC 474/574 Dr. Peng Ning 1 Agenda Generic block cipher Feistel cipher DES Modes of block ciphers Multiple encryptions Message

More information

Data Integrity. Modified by: Dr. Ramzi Saifan

Data Integrity. Modified by: Dr. Ramzi Saifan Data Integrity Modified by: Dr. Ramzi Saifan Encryption/Decryption Provides message confidentiality. Does it provide message authentication? 2 Message Authentication Bob receives a message m from Alice,

More information

CS408 Cryptography & Internet Security

CS408 Cryptography & Internet Security CS408 Cryptography & Internet Security Lecture 18: Cryptographic hash functions, Message authentication codes Functions Definition Given two sets, X and Y, a function f : X Y (from set X to set Y), is

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

Computer Security 3/23/18

Computer Security 3/23/18 s s encrypt a block of plaintext at a time and produce ciphertext Computer Security 08. Cryptography Part II Paul Krzyzanowski DES & AES are two popular block ciphers DES: 64 bit blocks AES: 128 bit blocks

More information

CIS 4360 Secure Computer Systems Symmetric Cryptography

CIS 4360 Secure Computer Systems Symmetric Cryptography CIS 4360 Secure Computer Systems Symmetric Cryptography Professor Qiang Zeng Spring 2017 Previous Class Classical Cryptography Frequency analysis Never use home-made cryptography Goals of Cryptography

More information

Cryptographic Hash Functions

Cryptographic Hash Functions ECE458 Winter 2013 Cryptographic Hash Functions Dan Boneh (Mods by Vijay Ganesh) Previous Lectures: What we have covered so far in cryptography! One-time Pad! Definition of perfect security! Block and

More information

Key Exchange. References: Applied Cryptography, Bruce Schneier Cryptography and Network Securiy, Willian Stallings

Key Exchange. References: Applied Cryptography, Bruce Schneier Cryptography and Network Securiy, Willian Stallings Key Exchange References: Applied Cryptography, Bruce Schneier Cryptography and Network Securiy, Willian Stallings Outlines Primitives Root Discrete Logarithm Diffie-Hellman ElGamal Shamir s Three Pass

More information

Lecture 1: Course Introduction

Lecture 1: Course Introduction Lecture 1: Course Introduction Thomas Johansson T. Johansson (Lund University) 1 / 37 Chapter 9: Symmetric Key Distribution To understand the problems associated with managing and distributing secret keys.

More information

Message Authentication Codes and Cryptographic Hash Functions

Message Authentication Codes and Cryptographic Hash Functions Message Authentication Codes and Cryptographic Hash Functions Readings Sections 2.6, 4.3, 5.1, 5.2, 5.4, 5.6, 5.7 1 Secret Key Cryptography: Insecure Channels and Media Confidentiality Using a secret key

More information

CHAPTER 6. SYMMETRIC CIPHERS C = E(K2, E(K1, P))

CHAPTER 6. SYMMETRIC CIPHERS C = E(K2, E(K1, P)) CHAPTER 6. SYMMETRIC CIPHERS Multiple encryption is a technique in which an encryption algorithm is used multiple times. In the first instance, plaintext is converted to ciphertext using the encryption

More information

Distributed Systems. 26. Cryptographic Systems: An Introduction. Paul Krzyzanowski. Rutgers University. Fall 2015

Distributed Systems. 26. Cryptographic Systems: An Introduction. Paul Krzyzanowski. Rutgers University. Fall 2015 Distributed Systems 26. Cryptographic Systems: An Introduction Paul Krzyzanowski Rutgers University Fall 2015 1 Cryptography Security Cryptography may be a component of a secure system Adding cryptography

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

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

CSC 474/574 Information Systems Security

CSC 474/574 Information Systems Security CSC 474/574 Information Systems Security Topic 2.1 Introduction to Cryptography CSC 474/574 By Dr. Peng Ning 1 Cryptography Cryptography Original meaning: The art of secret writing Becoming a science that

More information

Spring 2010: CS419 Computer Security

Spring 2010: CS419 Computer Security Spring 2010: CS419 Computer Security MAC, HMAC, Hash functions and DSA Vinod Ganapathy Lecture 6 Message Authentication message authentication is concerned with: protecting the integrity of a message validating

More information

Cryptography CS 555. Topic 16: Key Management and The Need for Public Key Cryptography. CS555 Spring 2012/Topic 16 1

Cryptography CS 555. Topic 16: Key Management and The Need for Public Key Cryptography. CS555 Spring 2012/Topic 16 1 Cryptography CS 555 Topic 16: Key Management and The Need for Public Key Cryptography CS555 Spring 2012/Topic 16 1 Outline and Readings Outline Private key management between two parties Key management

More information

Public-key Cryptography: Theory and Practice

Public-key Cryptography: Theory and Practice Public-key Cryptography Theory and Practice Department of Computer Science and Engineering Indian Institute of Technology Kharagpur Chapter 1: Overview What is Cryptography? Cryptography is the study of

More information

S. Erfani, ECE Dept., University of Windsor Network Security

S. Erfani, ECE Dept., University of Windsor Network Security 4.11 Data Integrity and Authentication It was mentioned earlier in this chapter that integrity and protection security services are needed to protect against active attacks, such as falsification of data

More information

Public-Key Cryptography. Professor Yanmin Gong Week 3: Sep. 7

Public-Key Cryptography. Professor Yanmin Gong Week 3: Sep. 7 Public-Key Cryptography Professor Yanmin Gong Week 3: Sep. 7 Outline Key exchange and Diffie-Hellman protocol Mathematical backgrounds for modular arithmetic RSA Digital Signatures Key management Problem:

More information

Cryptographic Hash Functions. Rocky K. C. Chang, February 5, 2015

Cryptographic Hash Functions. Rocky K. C. Chang, February 5, 2015 Cryptographic Hash Functions Rocky K. C. Chang, February 5, 2015 1 This set of slides addresses 2 Outline Cryptographic hash functions Unkeyed and keyed hash functions Security of cryptographic hash functions

More information

Unit III. Chapter 1: Message Authentication and Hash Functions. Overview:

Unit III. Chapter 1: Message Authentication and Hash Functions. Overview: Unit III Chapter 1: Message Authentication and Hash Functions Overview: Message authentication is a mechanism or service used to verify the integrity of a message. Message authentication assures that data

More information

Security Requirements

Security Requirements Message Authentication and Hash Functions CSCI 454/554 Security Requirements disclosure traffic analysis masquerade content modification sequence modification timing modification source repudiation destination

More information

7. Symmetric encryption. symmetric cryptography 1

7. Symmetric encryption. symmetric cryptography 1 CIS 5371 Cryptography 7. Symmetric encryption symmetric cryptography 1 Cryptographic systems Cryptosystem: t (MCKK GED) (M,C,K,K,G,E,D) M, plaintext message space C, ciphertext message space K, K, encryption

More information

Winter 2011 Josh Benaloh Brian LaMacchia

Winter 2011 Josh Benaloh Brian LaMacchia Winter 2011 Josh Benaloh Brian LaMacchia Symmetric Cryptography January 20, 2011 Practical Aspects of Modern Cryptography 2 Agenda Symmetric key ciphers Stream ciphers Block ciphers Cryptographic hash

More information

(2½ hours) Total Marks: 75

(2½ hours) Total Marks: 75 (2½ hours) Total Marks: 75 N. B.: (1) All questions are compulsory. (2) Makesuitable assumptions wherever necessary and state the assumptions made. (3) Answers to the same question must be written together.

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

Data Security and Privacy. Topic 14: Authentication and Key Establishment

Data Security and Privacy. Topic 14: Authentication and Key Establishment Data Security and Privacy Topic 14: Authentication and Key Establishment 1 Announcements Mid-term Exam Tuesday March 6, during class 2 Need for Key Establishment Encrypt K (M) C = Encrypt K (M) M = Decrypt

More information

This chapter continues our overview of public-key cryptography systems (PKCSs), and begins with a description of one of the earliest and simplest

This chapter continues our overview of public-key cryptography systems (PKCSs), and begins with a description of one of the earliest and simplest 1 2 3 This chapter continues our overview of public-key cryptography systems (PKCSs), and begins with a description of one of the earliest and simplest PKCS, Diffie- Hellman key exchange. This first published

More information

Cryptography MIS

Cryptography MIS Cryptography MIS-5903 http://community.mis.temple.edu/mis5903sec011s17/ Cryptography History Substitution Monoalphabetic Polyalphabetic (uses multiple alphabets) uses Vigenere Table Scytale cipher (message

More information

CRYPTOGRAPHY & DIGITAL SIGNATURE

CRYPTOGRAPHY & DIGITAL SIGNATURE UNIT V CRYPTOGRAPHY & DIGITAL SIGNATURE What happens in real life? We have universal electronic connectivity via networks of our computers so allowing viruses and hackers to do eavesdropping. So both the

More information

Network Security Essentials Chapter 2

Network Security Essentials Chapter 2 Network Security Essentials Chapter 2 Fourth Edition by William Stallings Lecture slides by Lawrie Brown Encryption What is encryption? Why do we need it? No, seriously, let's discuss this. Why do we need

More information

CSCI 454/554 Computer and Network Security. Topic 5.2 Public Key Cryptography

CSCI 454/554 Computer and Network Security. Topic 5.2 Public Key Cryptography CSCI 454/554 Computer and Network Security Topic 5.2 Public Key Cryptography Outline 1. Introduction 2. RSA 3. Diffie-Hellman Key Exchange 4. Digital Signature Standard 2 Introduction Public Key Cryptography

More information

2.1 Basic Cryptography Concepts

2.1 Basic Cryptography Concepts ENEE739B Fall 2005 Part 2 Secure Media Communications 2.1 Basic Cryptography Concepts Min Wu Electrical and Computer Engineering University of Maryland, College Park Outline: Basic Security/Crypto Concepts

More information

Cryptography V: Digital Signatures

Cryptography V: Digital Signatures Cryptography V: Digital Signatures Computer Security Lecture 12 David Aspinall School of Informatics University of Edinburgh 19th February 2009 Outline Basics Constructing signature schemes Security of

More information

Cryptography V: Digital Signatures

Cryptography V: Digital Signatures Cryptography V: Digital Signatures Computer Security Lecture 10 David Aspinall School of Informatics University of Edinburgh 10th February 2011 Outline Basics Constructing signature schemes Security of

More information

Security: Cryptography

Security: Cryptography Security: Cryptography Computer Science and Engineering College of Engineering The Ohio State University Lecture 38 Some High-Level Goals Confidentiality Non-authorized users have limited access Integrity

More information

Outline. CSCI 454/554 Computer and Network Security. Introduction. Topic 5.2 Public Key Cryptography. 1. Introduction 2. RSA

Outline. CSCI 454/554 Computer and Network Security. Introduction. Topic 5.2 Public Key Cryptography. 1. Introduction 2. RSA CSCI 454/554 Computer and Network Security Topic 5.2 Public Key Cryptography 1. Introduction 2. RSA Outline 3. Diffie-Hellman Key Exchange 4. Digital Signature Standard 2 Introduction Public Key Cryptography

More information

Basic Concepts and Definitions. CSC/ECE 574 Computer and Network Security. Outline

Basic Concepts and Definitions. CSC/ECE 574 Computer and Network Security. Outline CSC/ECE 574 Computer and Network Security Topic 2. Introduction to Cryptography 1 Outline Basic Crypto Concepts and Definitions Some Early (Breakable) Cryptosystems Key Issues 2 Basic Concepts and Definitions

More information

Technological foundation

Technological foundation Technological foundation Carte à puce et Java Card 2010-2011 Jean-Louis Lanet Jean-louis.lanet@unilim.fr Cryptology Authentication Secure upload Agenda Cryptology Cryptography / Cryptanalysis, Smart Cards

More information

A hash function is strongly collision-free if it is computationally infeasible to find different messages M and M such that H(M) = H(M ).

A hash function is strongly collision-free if it is computationally infeasible to find different messages M and M such that H(M) = H(M ). CA4005: CRYPTOGRAPHY AND SECURITY PROTOCOLS 1 5 5.1 A hash function is an efficient function mapping binary strings of arbitrary length to binary strings of fixed length (e.g. 128 bits), called the hash-value

More information

CPSC 467: Cryptography and Computer Security

CPSC 467: Cryptography and Computer Security CPSC 467: Cryptography and Computer Security Michael J. Fischer Lecture 11 October 4, 2017 CPSC 467, Lecture 11 1/39 ElGamal Cryptosystem Message Integrity and Authenticity Message authentication codes

More information

Outline. Public Key Cryptography. Applications of Public Key Crypto. Applications (Cont d)

Outline. Public Key Cryptography. Applications of Public Key Crypto. Applications (Cont d) Outline AIT 682: Network and Systems Security 1. Introduction 2. RSA 3. Diffie-Hellman Key Exchange 4. Digital Signature Standard Topic 5.2 Public Key Cryptography Instructor: Dr. Kun Sun 2 Public Key

More information

Introduction. CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell

Introduction. CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell Introduction CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell 1 Cryptography Merriam-Webster Online Dictionary: 1. secret writing 2. the enciphering and deciphering

More information

KALASALINGAM UNIVERSITY

KALASALINGAM UNIVERSITY KALASALINGAM UNIVERSITY (Kalasalingam Academy of Research and Education) DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING CLASS NOTES CRYPTOGRAPHY AND NETWOTK SECURITY (CSE 405) Prepared by M.RAJA AP/CSE

More information

Lecture 5. Cryptographic Hash Functions. Read: Chapter 5 in KPS

Lecture 5. Cryptographic Hash Functions. Read: Chapter 5 in KPS Lecture 5 Cryptographic Hash Functions Read: Chapter 5 in KPS 1 Purpose CHF one of the most important tools in modern cryptography and security CHF-s are used for many authentication, integrity, digital

More information

Security. Communication security. System Security

Security. Communication security. System Security Security Communication security security of data channel typical assumption: adversary has access to the physical link over which data is transmitted cryptographic separation is necessary System Security

More information

T Cryptography and Data Security

T Cryptography and Data Security T-79.4501 Cryptography and Data Security Lecture 10: 10.1 Random number generation 10.2 Key management - Distribution of symmetric keys - Management of public keys Stallings: Ch 7.4; 7.3; 10.1 1 The Use

More information

CSCI 454/554 Computer and Network Security. Topic 2. Introduction to Cryptography

CSCI 454/554 Computer and Network Security. Topic 2. Introduction to Cryptography CSCI 454/554 Computer and Network Security Topic 2. Introduction to Cryptography Outline Basic Crypto Concepts and Definitions Some Early (Breakable) Cryptosystems Key Issues 2 Basic Concepts and Definitions

More information

Introduction to Cryptography. Lecture 6

Introduction to Cryptography. Lecture 6 Introduction to Cryptography Lecture 6 Benny Pinkas page 1 1 Data Integrity, Message Authentication Risk: an active adversary might change messages exchanged between Alice and Bob M Alice M M M Bob Eve

More information

Outline. Cryptography. Encryption/Decryption. Basic Concepts and Definitions. Cryptography vs. Steganography. Cryptography: the art of secret writing

Outline. Cryptography. Encryption/Decryption. Basic Concepts and Definitions. Cryptography vs. Steganography. Cryptography: the art of secret writing Outline CSCI 454/554 Computer and Network Security Basic Crypto Concepts and Definitions Some Early (Breakable) Cryptosystems Key Issues Topic 2. Introduction to Cryptography 2 Cryptography Basic Concepts

More information

Cryptography Basics. IT443 Network Security Administration Slides courtesy of Bo Sheng

Cryptography Basics. IT443 Network Security Administration Slides courtesy of Bo Sheng Cryptography Basics IT443 Network Security Administration Slides courtesy of Bo Sheng 1 Outline Basic concepts in cryptography systems Secret key cryptography Public key cryptography Hash functions 2 Encryption/Decryption

More information

Cryptography and Network Security. Prof. D. Mukhopadhyay. Department of Computer Science and Engineering. Indian Institute of Technology, Kharagpur

Cryptography and Network Security. Prof. D. Mukhopadhyay. Department of Computer Science and Engineering. Indian Institute of Technology, Kharagpur Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Module No. # 01 Lecture No. # 38 A Tutorial on Network Protocols

More information

Content of this part

Content of this part UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering Introduction to Cryptography ECE 597XX/697XX Part 5 More About Block Ciphers Israel Koren ECE597/697 Koren Part.5.1 Content of this

More information

CSCI 454/554 Computer and Network Security. Topic 3.2 Secret Key Cryptography Modes of Operation

CSCI 454/554 Computer and Network Security. Topic 3.2 Secret Key Cryptography Modes of Operation CSCI 454/554 Computer and Network Security Topic 3.2 Secret Key Cryptography Modes of Operation Processing with Block Ciphers Most ciphers work on blocks of fixed (small) size How to encrypt long messages?

More information

Lecture 5: Protocols - Authentication and Key Exchange* CS 392/6813: Computer Security Fall Nitesh Saxena

Lecture 5: Protocols - Authentication and Key Exchange* CS 392/6813: Computer Security Fall Nitesh Saxena Lecture 5: Protocols - Authentication and Key Exchange* CS 392/6813: Computer Security Fall 2009 Nitesh Saxena *Adopted from a previous lecture by Gene Tsudik Course Admin HW3 Problem 3 due Friday midnight

More information

Cryptographic Checksums

Cryptographic Checksums Cryptographic Checksums Mathematical function to generate a set of k bits from a set of n bits (where k n). k is smaller then n except in unusual circumstances Example: ASCII parity bit ASCII has 7 bits;

More information

n-bit Output Feedback

n-bit Output Feedback n-bit Output Feedback Cryptography IV Encrypt Encrypt Encrypt P 1 P 2 P 3 C 1 C 2 C 3 Steven M. Bellovin September 16, 2006 1 Properties of Output Feedback Mode No error propagation Active attacker can

More information

Contents Digital Signatures Digital Signature Properties Direct Digital Signatures

Contents Digital Signatures Digital Signature Properties Direct Digital Signatures Contents Digital Signatures... 197 Digital Signature Properties... 198 Direct Digital Signatures... 198 199...قابلداوری Arbitrated Digital Signatures Arbitrated Digital Signature Technaiques... 200 Authentication

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

Digital Signatures. Luke Anderson. 7 th April University Of Sydney.

Digital Signatures. Luke Anderson. 7 th April University Of Sydney. Digital Signatures Luke Anderson luke@lukeanderson.com.au 7 th April 2017 University Of Sydney Overview 1. Digital Signatures 1.1 Background 1.2 Basic Operation 1.3 Attack Models Replay Naïve RSA 2. PKCS#1

More information

CS 161 Computer Security

CS 161 Computer Security Raluca Popa Spring 2018 CS 161 Computer Security Homework 2 Due: Wednesday, February 14, at 11:59pm Instructions. This homework is due Wednesday, February 14, at 11:59pm. No late homeworks will be accepted.

More information

3 Symmetric Key Cryptography 3.1 Block Ciphers Symmetric key strength analysis Electronic Code Book Mode (ECB) Cipher Block Chaining Mode (CBC) Some

3 Symmetric Key Cryptography 3.1 Block Ciphers Symmetric key strength analysis Electronic Code Book Mode (ECB) Cipher Block Chaining Mode (CBC) Some 3 Symmetric Key Cryptography 3.1 Block Ciphers Symmetric key strength analysis Electronic Code Book Mode (ECB) Cipher Block Chaining Mode (CBC) Some popular block ciphers Triple DES Advanced Encryption

More information

Computer Security: Principles and Practice

Computer Security: Principles and Practice Computer Security: Principles and Practice Chapter 2 Cryptographic Tools First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown Cryptographic Tools cryptographic algorithms

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

David Wetherall, with some slides from Radia Perlman s security lectures.

David Wetherall, with some slides from Radia Perlman s security lectures. David Wetherall, with some slides from Radia Perlman s security lectures. djw@cs.washington.edu Networks are shared: Want to secure communication between legitimate participants from others with (passive

More information

9/30/2016. Cryptography Basics. Outline. Encryption/Decryption. Cryptanalysis. Caesar Cipher. Mono-Alphabetic Ciphers

9/30/2016. Cryptography Basics. Outline. Encryption/Decryption. Cryptanalysis. Caesar Cipher. Mono-Alphabetic Ciphers Cryptography Basics IT443 Network Security Administration Slides courtesy of Bo Sheng Basic concepts in cryptography systems Secret cryptography Public cryptography 1 2 Encryption/Decryption Cryptanalysis

More information

Digital Signatures. KG November 3, Introduction 1. 2 Digital Signatures 2

Digital Signatures. KG November 3, Introduction 1. 2 Digital Signatures 2 Digital Signatures KG November 3, 2017 Contents 1 Introduction 1 2 Digital Signatures 2 3 Hash Functions 3 3.1 Attacks.................................... 4 3.2 Compression Functions............................

More information

Double-DES, Triple-DES & Modes of Operation

Double-DES, Triple-DES & Modes of Operation Double-DES, Triple-DES & Modes of Operation Prepared by: Dr. Mohamed Abd-Eldayem Ref.: Cryptography and Network Security by William Stallings & Lecture slides by Lawrie Brown Multiple Encryption & DES

More information

Public Key Algorithms

Public Key Algorithms CSE597B: Special Topics in Network and Systems Security Public Key Cryptography Instructor: Sencun Zhu The Pennsylvania State University Public Key Algorithms Public key algorithms RSA: encryption and

More information

Grenzen der Kryptographie

Grenzen der Kryptographie Microsoft Research Grenzen der Kryptographie Dieter Gollmann Microsoft Research 1 Summary Crypto does not solve security problems Crypto transforms security problems Typically, the new problems relate

More information

Digests Requirements MAC Hash function Security of Hash and MAC Birthday Attack MD5 SHA RIPEMD Digital Signature Standard Proof of DSS

Digests Requirements MAC Hash function Security of Hash and MAC Birthday Attack MD5 SHA RIPEMD Digital Signature Standard Proof of DSS UNIT III AUTHENTICATION Digests Requirements MAC Hash function Security of Hash and MAC Birthday Attack MD5 SHA RIPEMD Digital Signature Standard Proof of DSS Authentication Requirements Disclosure Release

More information

Public-Key Encryption, Key Exchange, Digital Signatures CMSC 23200/33250, Autumn 2018, Lecture 7

Public-Key Encryption, Key Exchange, Digital Signatures CMSC 23200/33250, Autumn 2018, Lecture 7 Public-Key Encryption, Key Exchange, Digital Signatures CMSC 23200/33250, Autumn 2018, Lecture 7 David Cash University of Chicago Plan 1. Security of RSA 2. Key Exchange, Diffie-Hellman 3. Begin digital

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

Applied Cryptography and Computer Security CSE 664 Spring 2018

Applied Cryptography and Computer Security CSE 664 Spring 2018 Applied Cryptography and Computer Security Lecture 13: Public-Key Cryptography and RSA Department of Computer Science and Engineering University at Buffalo 1 Public-Key Cryptography What we already know

More information

ISA 662 Internet Security Protocols. Outline. Prime Numbers (I) Beauty of Mathematics. Division (II) Division (I)

ISA 662 Internet Security Protocols. Outline. Prime Numbers (I) Beauty of Mathematics. Division (II) Division (I) Outline ISA 662 Internet Security Protocols Some Math Essentials & History Asymmetric signatures and key exchange Asymmetric encryption Symmetric MACs Lecture 2 ISA 662 1 2 Beauty of Mathematics Demonstration

More information

Symmetric Encryption Algorithms

Symmetric Encryption Algorithms Symmetric Encryption Algorithms CS-480b Dick Steflik Text Network Security Essentials Wm. Stallings Lecture slides by Lawrie Brown Edited by Dick Steflik Symmetric Cipher Model Plaintext Encryption Algorithm

More information

Block Cipher Operation. CS 6313 Fall ASU

Block Cipher Operation. CS 6313 Fall ASU Chapter 7 Block Cipher Operation 1 Outline q Multiple Encryption and Triple DES q Electronic Codebook q Cipher Block Chaining Mode q Cipher Feedback Mode q Output Feedback Mode q Counter Mode q XTS-AES

More information

Outline. Data Encryption Standard. Symmetric-Key Algorithms. Lecture 4

Outline. Data Encryption Standard. Symmetric-Key Algorithms. Lecture 4 EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 4 Department of Electrical and Computer Engineering Cleveland State University wenbing@ieee.org Outline Review

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

Security+ Guide to Network Security Fundamentals, Third Edition. Chapter 11 Basic Cryptography

Security+ Guide to Network Security Fundamentals, Third Edition. Chapter 11 Basic Cryptography Security+ Guide to Network Security Fundamentals, Third Edition Chapter 11 Basic Cryptography Objectives Define cryptography Describe hashing List the basic symmetric cryptographic algorithms 2 Objectives

More information

More on Cryptography CS 136 Computer Security Peter Reiher January 19, 2017

More on Cryptography CS 136 Computer Security Peter Reiher January 19, 2017 More on Cryptography CS 136 Computer Security Peter Reiher January 19, 2017 Page 1 Outline Desirable characteristics of ciphers Stream and block ciphers Cryptographic modes Uses of cryptography Symmetric

More information

Chapter 9 Public Key Cryptography. WANG YANG

Chapter 9 Public Key Cryptography. WANG YANG Chapter 9 Public Key Cryptography WANG YANG wyang@njnet.edu.cn Content Introduction RSA Diffie-Hellman Key Exchange Introduction Public Key Cryptography plaintext encryption ciphertext decryption plaintext

More information

Kurose & Ross, Chapters (5 th ed.)

Kurose & Ross, Chapters (5 th ed.) Kurose & Ross, Chapters 8.2-8.3 (5 th ed.) Slides adapted from: J. Kurose & K. Ross \ Computer Networking: A Top Down Approach (5 th ed.) Addison-Wesley, April 2009. Copyright 1996-2010, J.F Kurose and

More information