Cryptology System Design Fundamentals

Slides:



Advertisements
Similar presentations
1 Cryptosystems Based on Discrete Logarithms. 2 Outline [1] Discrete Logarithm Problem [2] Algorithms for Discrete Logarithm –A trivial algorithm –Shanks’
Advertisements

Theory I Algorithm Design and Analysis (9 – Randomized algorithms) Prof. Dr. Th. Ottmann.
1 Lecture 9 Public Key Cryptography Public Key Algorithms CIS CIS 5357 Network Security.
Cryptography and Network Security Chapter 10 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
1 離散對數密碼系統 交通大學資訊工程系 陳榮傑. 2 Outline 離散對數問題 (Discrete Logarithm Problem) 離散對數演算法 (DL Algorithms) –A trivial algorithm –Shanks’ algorithm –Pollard’s algorithm.
1 Diffie-Hellman (Key Exchange) Protocol Rocky K. C. Chang 9 February 2007.
1 Diffie-Hellman (Key Exchange) Protocol Rocky K. C. Chang 9 February 2007.
Page : 1 bfolieq.drw Technical University of Braunschweig IDA: Institute of Computer and Network Engineering  W. Adi 2011 Lecture-9 Public-Key Cryptography.
Page : 1 bfolieq.drw Technical University of Braunschweig IDA: Institute of Computer and Network Engineering  W. Adi 2011 Lecture-5 Mathematical Background:
Page : 1 bfolieq.drw Technical University of Braunschweig IDA: Institute of Computer and Network Engineering  W. Adi 2011 Lecture-12 Public-Key Cryptography.
Page : 1 Date : Duration : 90 Minutes Maximum marks 70% Vorname ……………………………………….. Nachname ……………………………………….. Matrikel-Nr. ………………………………………..
Page : 1 bfolieq.drw Technical University of Braunschweig IDA: Institute of Computer and Network Engineering  W. Adi 2011 Tutorial-5 Theory of Secret-Key.
Public-Key Cryptography ElGamal Public-Key Crypto-System
Cryptographic Protocols Secret sharing, Threshold Security
Network Security Netzwerksicherheit Lecture ID: ET-IDA-082 and 111
Public Key Encryption.
Mathematical Background: Extension Fields
CSCE 715: Network Systems Security
Asymmetric-Key Cryptography
Network Security Design Fundamentals Lecture-13
Public-Key Cryptography RSA Rivest-Shamir-Adelmann Public-Key System
RSA Public-Key Secrecy and Signature
DH Public-Key Exchange
Design Problems (Open book)
RSA and El Gamal Cryptosystems
IEEE TRANSACTIONS ON INFORMATION THEORY, JULY 1985
Sample Solution Cryptology Design Fundamentals
Private-Key Cryptography
Network Security Sample Solution Short questions (Closed book)
Mathematical Background: Prime Numbers
ElGamal Public-Key Systems over GF(p) & GF(2m)
Practical Aspects of Modern Cryptography
Mathematical Background: Primes and (GF)
Chapter 10: Key Management (Again) and other Public Key Systems
Key Management Network Systems Security
El Gamal and Diffie Hellman
CSCE 715: Network Systems Security
El Gamal and Diffie Hellman
Introduction to Elliptic Curve Cryptography
Chapter 3 - Public-Key Cryptography & Authentication
CSCE 715: Network Systems Security
Cryptology Design Fundamentals
Cryptology Design Fundamentals
Cryptology Design Fundamentals
Cryptology Design Fundamentals
Cryptology Design Fundamentals
Cryptology Design Fundamentals
Cryptology Design Fundamentals
Cryptology Design Fundamentals
Cryptology Design Fundamentals
Cryptology Design Fundamentals
Sample Solution Cryptology Design Fundamentals
Cryptology Design Fundamentals
Sample Solution Final exam: Cryptology Design Fundamentals
Cryptology Design Fundamentals
Cryptology Design Fundamentals
Cryptology Design Fundamentals
Cryptographic Protocols Secret Sharing, Threshold Security
Network Security Tutorial-14 Design Fundamentals IPSEC, KERBEROS
Network Security Design Fundamentals Lecture-13
Cryptology Design Fundamentals
Network Security Tutorial-16 Design Fundamentals PGP ET-IDA-082
Network Security Tutorial-16 Design Fundamentals PGP ET-IDA-082
Network Security Tutorial-14 Design Fundamentals IPSEC, KERBEROS
Network Security Tutorial-17 Design Fundamentals E-Commerce ET-IDA-082
Diffie-Hellman Algorithm
Cryptology Design Fundamentals
Public-Key Cryptography Quadratic Residues and „Rabin Lock“
Mathematical Background: Extension Finite Fields
Presentation transcript:

Cryptology System Design Fundamentals Grundlagen des kryptographischen Systementwurfs Module ID: ET-IDA-057, ET-IDA-110 Final Examination Design-Problems Section: Open book examination part v1 Prof. W. Adi Date : 16.03.2018 Duration : 120 Minutes. 70% of the evaluation score Please write your answer on the same question sheet. Bitte schreiben Sie die Lösungen auf die Aufgabenblätter. Vorname ……………………………………….. Nachname ……………………………………….. Matrikel-Nr. ………………………………………. Fachrichtung: ……………………………………

Max 70% marks Marks: Total Problem 1 Problem 2 Problem 3 Problem 4

number pairs: for user A: 11 and 23 and for user B: 13 and 17 A RSA cryptosystem with two users A and B having the following secret prime number pairs: for user A: 11 and 23 and for user B: 13 and 17 Find out the adequate public key of user A from the following list of integers: [15, 87, 112] giving the reason for your choice. Compute the corresponding secret key of user A. Find out the adequate public key of user B from the following list of integers: [55,120,159] giving the reason for your choice. Compute the corresponding secret key of user B. How many distinct public keys are possible for each user? 4. User B encrypts the message M=19, and send the resulting cryptogram YBA to A. User B then signs h= ( M2) mod NA and generates the signature SBA . Compute YBA and SBA. 5. For which range of values of M can an attacker compute M by observing SBA . Why? 5. Decipher the cryptogram YBA on user A’s site and verify the Signature SBA. MH: Unterscheidet sich der Font auf dieser Folie absichtlich von den anderen?

Solution: Find out the adequate public key of user A from the following list of integers: [15, 87, 112] giving the reason for your choice. Compute the corresponding secret key of user A. NA = 11 x 23 = 253, φ (NA ) = (11-1)(23-1) = 220 gcd [ EA, φ (NA ) ] = 1 => select 87 as gcd (87,220) = 1 EA = 87 DA = 43 mod 220 = (see computation below) 3 DA = 87 -1 mod 220 =43 2.Find out the adequate public key of user B from the following list of integers: [55,120,159] giving the reason for your choice. Compute the corresponding secret key of user B. 3 NB = 13 x 17 =221 , φ (NB) = (13-1)(17-1) = 192 gcd (EB, φ (NB ) ] =1 => select 3 as gcd (55,192) = 1 EB = 55 DB = 7 mod 192 (see computation below) DB = 55 -1 mod 192 = 7 3. How many public keys are possible for each user? # of keys for user A = φ [φ (NA )] = φ (220 ) = φ (22 . 5. 11)= 220(1 -1/2 ).(1 – 1/5).(1 – 1/11) = 80 keys 4 # of keys for user B = φ [φ (NB )] = φ (192 ) == φ (26 . 3)= 192(1 -1/2 ) (1 -1/3 ) = 64 keys 4

4. User B encrypts the message M=19, and send the resulting cryptogram YBA to A. User B then signs h= ( M2)mod NA and generates the signature SBA . Compute YBA and SBA. Can an attacker gets M by observing SBA . if yes how? If No why? Encryption: YBA =(M)Ea mod Na = (19)87 mod 253=178 Sings: h= (M2 mod NA) = 192 mod 253 = 108 SBA =(h)Db mod Nb = (108)7 mod 221=82 6 Computing M is passable if M2 < NA in that case the square root is computable. As the modulus NA would deliver the real M2. and computing the square root is straight forward. If however the modulus is involved, then computing the square root mod NA is only possible if the factorization of NA is known. 6. Decipher the cryptogram YBA on user A’s site and verify the Signature SBA Decipher: (YBA )Da mod Na = (178)43 mod 253=19 Verification: (SBA )Eb mod Nb = (82)55 mod 221=108 4 5

Decrypt CA on B’s side showing all necessary computations. P 2: DH over GF(25) (28 P) A Diffie-Hellman (DH) public key exchange system uses GF(25) deploying the primitive Polynomial P(x) = x5 + x2 + 1 as field modulus. Compute the exponents of the element x = 000010 as xi mod P(x) for i= 1 to 10 in binary form in GF(25). Which multiplicative orders are possible for elements in GF(25)? Why? Compute the multiplicative order of the element β = x15 and its binary vector. Use the element β as a public element and compute the DH public keys Ya and Yb as binary vectors for users A and B having the secret keys Xa=13 und Xb=19. Compute the polynomial and binary pattern of the DH shared key ZAB between users A and B. Compute the ElGamal cryptogram CA as a binary vector for the message M=x30 sent from A to B by using the same above DH setup and using a random R=11. Decrypt CA on B’s side showing all necessary computations. MH: Unterscheidet sich der Font auf dieser Folie absichtlich von den anderen?

Ord(β )=Ord(x15)=Ord(x)/gcd(Ord(x),15)=31/1=31 Solution 1. Compute the exponents of the element x = 000010 as xi mod P(x) for i= 1 to 10 in binary form in GF(25). P(x) = x5 + x2 + 1 = 0 => x5 = x2 + 1 x1 = x=00010 x2 = x2 =00100 x3 = x3=01000 x4 = x4=10000 x5 = x2 +1=00101 x6 = x3 +x=01010 x7 = x4 +x2=10100 x8 = x5 +x3= x3+ x2 +1=01101 x9 = x4+ x3 +x=11010 x10 = x5+ x4 + x2 = x4 +1=10001 2. Which multiplicative orders are possible for elements in GF(25)? Why? Compute the multiplicative order of the element β = x15 and its binary vector. Possible orders are the divisors of 25-1 = 31 : that are: 1, 31 => Ord(x)=31 Ord(β )=Ord(x15)=Ord(x)/gcd(Ord(x),15)=31/1=31 Ord(β)=31 β= x15= x10. x5=(x4 +1)(x2 +1)= x8 + x4 + x2 + 1= x3+ x2 +1 + x4 + x2 + 1= x4 + x3=11000

Public directory GF(25) Zab = x4 +x3 +x+1=11011 3. Use the element β as a public element and compute the DH public keys Ya and Yb as binary vectors for users A and B having the secret keys Xa=13 und Xb=19. User A: Xa= 13 , Ya = β13 =( x15) 13 =x 15.13 mod 31= x9 = x4+ x3 +x Ya = 11010 User B: Xb= 19, Yb = β19 =(x15)19 = x 15.19 mod 31= x6 = x3 +x Yb= 01010 Public directory GF(25) β =x15, P(x) = x5 + x2 + 1 Ya = 11010 Yb= 01010 2 2 4. Compute the polynomial and binary pattern for the users A and B shared key ZAB . Common secret key for users A and B: Zab = ( (x15 )13) 19 = x 3705 mod 31 = x 16 =x10 . x6= ( x4 +1 ).( x3 +x)= x7 + x5 + x3 +x= x4 +x2+x2 +1 + x3 +x 4 Zab = x4 +x3 +x+1=11011 8

6. Decrypt CA on B’s side showing all necessary computations. 5. Compute the ElGamal cryptogram CA as a binary vector for the message M=x30 sent from A to B by using the same above DH setup and using a random R=11. 6. Decrypt CA on B’s side showing all necessary computations. User A sends M to B User B receives Xa =13 ya = β Xa= = x4+ x3 +x β =x15 primitive element in GF(25) Xb = 19 yb = β Xb= x3 +x ya = β Xa = 11010 yb = β Xb =01010 M=x30 C M M X C = M . β Xb . R=x30.x4=x34mod (31) C=x3 X / m C . β -Xb . R=x3.x27 =x30=M Z = β Xb. R=(x15)19.11=x4 yb Z-1 = β - Xb. R=x27 (yb)R r = β R=(x15)11=x10 r (r)-Xb = β - Xb. R =x-11*15*19 = x-11*15*19mod(31)=x27 β R / m-bits R R = 11 - Xb - Xb = (25 -1) - Xb m = log2 2m

R(x) Q(x) B2(x) B1(x) P2(x) P1(x) P3. Compute the multiplicative inverse of x2 + 1 modulo P(x) = x7 + x6 + 1. (6P) Verify your result Solution R(x) Q(x) B2(x) B1(x) P2(x) P1(x) x x5+x4+x3+x2+x 1 x2 + 1 x7 + x6 + 1 x5+x4+x3+x2+x+1 x6+x5+x4+x3+x2+x+1 1+x5+x4+x3+x2+x Check: (x2 + 1 ) (x6+x5+x4+x3+x2+x+1) = x8+x7+x6+x5+x4+x3+x2 + x6+x5+x4+x3+x2+x+1 = x6 + x + 1 + x6 + 1 + x + 1 = 1 x7 = x6 + 1 x8 = x7 + x = x6 + x + 1 10

As r = [ N – H(x) ] / N => H(X)=N –N.r => H(x)=N(1-r) P4: A block cipher having a key length of 194 bits is encrypting a clear text. Where, the clear text block size is 256 bits and the unicity distance of the cipher nu = 258 bits. 1. Compute the entropy of the clear text. 2. Compute the new unicity distance of the cipher if 64 random bits are appended to each clear text block. And the clear text is compressed to 25% of its original length. 3. Is the cipher theoretically breakable after this modification if the attacker can only observe 600 cipher text bits? Why? (9 P) Solution: K= 194 bits, nu =258 bits, N = 256 bits 1. Entropy of a clear text As r = [ N – H(x) ] / N => H(X)=N –N.r => H(x)=N(1-r) Unicity distance nu = K/r  r=K / nu = 194/ 258 = 0,75 H(x)=N(r-1)=256(1-0.75)=64 bits 2. New Unicity distance 25%clear text = 0,25 * 256 = 64 3. The observer can theoretically break the cipher as the number of the observed cryptogram bits (600 bits) and is greater than the Unicity distance (516 bits) of the cipher.

P4:. El-Gamal crypto system is set up P4: El-Gamal crypto system is set up . A prime number P = 6 x 13 + 1 = 79 is used to deploy GF(P), where q=13 is a prime. Prove that P is a prime according to Pocklington’s theorem. Find computationally the multiplicative orders of the elements 2 and 3 in GF(79). Compute the probability, that a randomly chosen element is primitive. ElGamal signature scheme according to Fig .1 is used to sign M=6 in GF(79). The element  = 3 is selected as a public generator. Compute the signature S for M according to Fig.1. Assume Xa = 13 and select your own adequate K. Encrypt the message M using a simple secret-key multiplication cipher C(M) = Ks . M mod 79. Select Ks = 32. Compute the number of possible keys for this cipher. Decrypt C(M) Under which conditions is the cipher C(M) impossible to break ? Why? (35 P) MH: Unterscheidet sich der Font auf dieser Folie absichtlich von den anderen?

Fig. 1 P, , ya User A signs M Verifier  is primitive in GF(P) public directory User A signs M Verifier  is primitive in GF(P) Xa = Secret Key of A  Xa = ya ya = public key of A P, , ya If M MD S r S = k -1 ( MD - r . Xa ) mod (P-1) = S  MD = yar . r S mod P Then M is authentic k k = r k Random unit in ZP-1 Signed Message Fig. 1 Solution:

the probability that a randomly selected element is primitive. Solution: 1. Prove that P is prime according to Pocklington’s Theorem. P = R . F + 1 =6. 13 +1 = 79 , F =13 and R = 6. Is 79 a prime? Proof: 1. gcd ( a (P-1)/ pj –1 , P ) = gcd ( 6 138/ 23 –1 , 139 ) = gcd ( 63 , 139 ) = 1 is true 2. a P-1 = 1 ( mod P )  6138 = 1 (mod 139) is true 3. F > 139 = 11.7 that is 23 > 11.7 is true As all conditions 1, 2 and 3 are all true  139 is a prime number. 2. Find computationally the multiplicative orders of the elements 2 and 3 in GF(79). Compute the probability, that a randomly chosen element is primitive. Possible multiplicative orders are the divisors of of φ (79) = 78 that is => 1, 2,3,6,13,26,39, 78 Checking if the element 2 is a primitive one: 2 1 ≠ 1 , 2 2 ≠ 1 ,2 3 ≠ 1, 2 6 ≠ 1, 213 =55≠ 1, 226 =26 ≠ 1, 239 =1, Ord (2) = 39  2 is not a primitive element. Checking if the element 2 is a primitive one: 31 ≠ 1 , 32 ≠ 1 ,33 ≠ 1, 36 =18≠ 1, 313 =24≠ 1, 326 =23 ≠ 1, 339 =78 ≠ 1, Ord (3) = 78  3 is a primitive element the probability that a randomly selected element is primitive. # of all non-zero elements : 79 – 1 = 78 # of primitive elements: φ ( 78) = φ ( 2.3.13) = (2-1)(3-1)(13-1) = 24 P( element=primitive ) = ( 24 / 78 ) . 100 = 31,88% 14

# possible keys for KS = φ(79) = 78, 3. ElGamal signature scheme according to Fig .1 is used to sign the message M=6 using GF(79). The element  = 3 is selected as a public generator. Compute the multiplicative order of  and the Signature PS for M according to Fig.1. Assume Xa = 13 and select your own adequate K. User A signs M=6  Xa = ya = 313 mod 79 = 24 K=5 =>  k = r = 3 5 = 6 k -1 mod 78 =-31=-31+78= 47 PS = k -1 ( M - r . Xa ) mod (P-1) = 47 (6 - 6.13) mod 78 =48 4. Encrypt the message M using a simple secret-key multiplication cipher C(M) = Ks . M mod 79. Select Ks = 32. Compute the number of possible keys for this cipher. C(M) = KS . M mod 79 = 6 x 32 mod 79 = 34 # possible keys for KS = φ(79) = 78, 5. Decrypt C(M) KS -1 mod 79 = 66 => M= KS -1 . C(M) mod 79= 66 x 34 mod 79= 32 6. Under which conditions is the cipher C(M) impossible to break ? Why? Breaking C(M) is always passable if an attacker chooses M=1, then he can directly recover the key KS 15

Write p(x) in binary form and find out the multiplicative order of x A Massey-Omura lock for Shamir‘s 3-Pass Protocol over GF(26) using the irreducible polynomial p(x) = x6 + x5 + 1 as a field modulus is set up. Write p(x) in binary form and find out the multiplicative order of x The secret key for users A and B are 16 and 23 respectively. A message M = x8 is sent from A to B. Compute all the exchanged 3-pass messages as powers of x with the smallest possible power of x. Compute the number of possible distinct secret keys for each user Compute the maximum number of simple exponentiation search cycles required to break the cipher by a known clear text–cipher text attack? (technical reasons are required!) MH: Unterscheidet sich der Font auf dieser Folie absichtlich von den anderen?

Solution: Write p(x) in binary form and find out the multiplicative order of x P(x) = x6 + x3 + 1 = 0 => x6 = x3 + 1 x1 = x x2 = x2 x3 = x3 x4 = x4 x5 = x5 x6 = x3 + 1 x7 = x4 + x x8 = x5 + x2 x9 = x6 + x3 = x3 + 1 + x3 = 1 => multiplicative order of x is 9 Or: Possible orders are the divisors of 26 -1 = 63 Divisors of 63 are: 1, 3, 7, 9, 21, 63 x1 ≠1, x3 ≠1, x7 = x4 +x ≠1, x9 ≠1 => multiplicative order of x is 9

( ) User B User A M=x8 Solution : ** Arithmetic in GF(26) Eb = 23 Db = Eb-1 =23 -1 mod 63 =11 Ea = 16 (1..63) Da = Ea-1 =16 -1 mod 63 =4 X 8.16 mod 63=x2 mod p(x) 8 = M = x 16 (x8 ) (x2)23 = x 2.23 mod 63=x46 X 119.73 mod 127=x51 (x46 ) 4 ( ) 11 (x46 ) 3 (x58 ) =x8 (x58 ) x 4.46 mod 63=x58 Note: (x58)11 mod 63= x8=M 18