Presentation is loading. Please wait.

Presentation is loading. Please wait.

May 2008 Prepared by Dr. Abdulrahman Awadhi

Similar presentations


Presentation on theme: "May 2008 Prepared by Dr. Abdulrahman Awadhi"— Presentation transcript:

1 May 2008 Prepared by Dr. Abdulrahman Awadhi
Review Session May 2008 Prepared by Dr. Abdulrahman Awadhi Arab Open University - Bahrain 2007, T209b

2 Arab Open University - Bahrain 2007, T209b
How many possible keys would there be if we encrypted the plaintext using: digraphs? 262 = 676 keys. How many possible keys would there be if we encrypted the plaintext using: trigraphs? 263 = keys. How many possible keys would there be if we encrypted the plaintext using: Four-letter groupings? 264 = keys. Arab Open University - Bahrain 2007, T209b

3 Arab Open University - Bahrain 2007, T209b
Schemes where the sender and the receiver both work from their knowledge of the encryption key are called __________ Symmetric. The method of cracking a code by trying all possible combinations until the correct one is found is known as a _________ Brute force attack. Which of the following number pairs are coprime? (a) 9, 33 (b) 7, 19 (c) 13, 52 (a) 9 and 33 are not coprime since they both share the factor 3. (b) 7 and 19 are coprime. In fact, they are both prime numbers and prime numbers have no factors (other than 1 and themselves) so pairs or collections of prime numbers are always coprime. (c) 13 and 52 are not coprime since 13 is a factor of 52. Arab Open University - Bahrain 2007, T209b

4 Arab Open University - Bahrain 2007, T209b
What is the difference between the notation and K-1? The notation describes a known decryption key for the encryption key K. The notation K-1 describes a decryption key which can be deduced from knowledge of the encryption key K Write down a notation that will indicate a message sent in a digital envelope by Alice to George? A G:{M}K,{ }KG Briefly discuss the hashing technique? An operation, which takes data strings of any length and reduces them all to a data string of the same length, and which depends on all of the original data, is called a hash function The outcome of applying the hash function to a message is called a message digest Arab Open University - Bahrain 2007, T209b

5 Arab Open University - Bahrain 2007, T209b
Using a computer that can perform one million calculations per second, calculate how long it would take to try all possible combinations of: (a) 10 different letters (b) 15 different letters (c) 20 different letters Solution: (a) 10! X 1/106 = ÷ 106 seconds = 3.6 seconds (b) 15! X 1/106 = ÷ 106 seconds = seconds = days (c) 20! X 1/106 = = × 1018 ÷ 106 seconds = × 1012 seconds = seconds Which is approximately years Arab Open University - Bahrain 2007, T209b

6 Arab Open University - Bahrain 2007, T209b
Using the general formula for Euler’s Totient Function, calculate ø (m) when m is equal to: (a) 45, (b) 78, (c) 29 Solution: (a) m = 45 45 = 3 × 3 × 5 = 32 × 5 So 3 and 5 are the prime factors of 45. (45) = 45 (1-1/3)(1-1/5) = 45 x 2/3 x 4/5 = 24 (b) m = 78 78 = 2 × 3 × 13 So 2, 3 and 13 are the prime factors of 78. (78) = 78 (1-1/2)(1-1/3)(1-1/13) = 78 x 1/2 x 2/3 x 12/13 = 24 (c) When m is prime ø(m)=(m-1) 29 is a prime number, so ø = (29 – 1) = 28 Arab Open University - Bahrain 2007, T209b

7 Arab Open University - Bahrain 2007, T209b
With the two prime numbers a and b set at 5 and 11 respectively, derive a decryption key for the RSA algorithm when an encryption key K of 17 is selected. Steps in selecting a modulus and key for the RSA algorithm: 1. Select two prime numbers, a and b. 2. Set the modulus n to be the product of a and b, i.e. n = ab 3. Calculate ø(n) which, since a and b are prime, will be (a - 1) × (b - 1) 4. Find the highest common factor of (a - 1) and (b - 1) 5. Divide ø(n) by this factor and set m equal to the result 6. Select an encryption key K such that K is less than and coprime with m 7. Factorize m, then calculate ø(m) 8. Compute the decryption key from = Kø(m)-1 mod m 9. Check that K× mod m Arab Open University - Bahrain 2007, T209b

8 Arab Open University - Bahrain 2007, T209b
Solution: 1. Let a = 5 and b = Set n = ab = 5 × 11 = ø (55)=(5-1)× (11-1) = (a – 1) = 4 = 2 × 2 (b – 1) = 10 = 2 × 5 Highest common factor = 2 5. M = ø(n)/2 = 40/2 = Since 17 is less than n and coprime with m it is a valid encryption key. 7. Factorizing, m = 20 = 2 × 2 × 5 ø(m)= ø(20) = 20 x 1/2 x 4/5 = 8 8. When K is 17 then 177 mod mod Checking this result using K× 1 mod 20 gives 17×13 = 221 mod 20 = 1 mod 20 So the decryption key is 13. Arab Open University - Bahrain 2007, T209b

9 Arab Open University - Bahrain 2007, T209b
What would be the plaintext for the ciphertext “XW” using the decryption key ( ), and the modulus (n) = a x b = 5 x 11 = 55? X = 25 , W = 24 2513 mod 55 = mod 55 252 = 20 mod 55 254 = 15 mod 55 258 = 5 mod 55 2513 = 5 x 15 x 25 = 20 x 25 = 500 = 5 = D 2413 mod 55 = mod 55 242 = 26 mod 55 244 = 16 mod 55 248 = 36 mod 55 2413 = 36 x 16 x 24 = 26 x 24 = 624 = 19 = R DR Arab Open University - Bahrain 2007, T209b

10 Arab Open University - Bahrain 2007, T209b
Using the RSA algorithm and suppose that a = 5 and b = 11 : (you can refer to the table 2) Derive a decryption key for the RSA algorithm when an encryption key K of 9 is selected? Let a = 5 and b = 11 Set n = ab = 5 × 11 = 55 ø (55)=(5-1)× (11-1) = 40 (a – 1) = 4 = 2 × 2 (b – 1) = 10 = 2 × 5 Highest common factor = 2 M = ø(n)/2 = 40/2 = 20 Since 9 is less than n and coprime with m it is a valid encryption key Factorizing, m = 20 = 2 × 2 × 5= 8, ø(m)=20x1/2x4/5=8 When K is 9 then mod mod 20 Checking this result using: K× mod 20 gives 9× mod mod 20 So the decryption key is 9 What would be the plaintext for the ciphertext “MN” using the decryption key ( ), and the modulus (n) = a x b = 5 x 11 = 55? CX Arab Open University - Bahrain 2007, T209b

11 Arab Open University - Bahrain 2007, T209b
There are _______ smaller numbers that are coprime with 77 50 55 60 76 None of the above Which of the following cryptography methods use asymmetric keys? Encryption and decryption by using modular addition Encryption and decryption by using modular multiplication Encryption and decryption by using modular exponentiation PGP All of the above Arab Open University - Bahrain 2007, T209b

12 Arab Open University - Bahrain 2007, T209b
Why we cannot use 0 and 1 as a key in modular multiplication? (a) Because if we multiply 0 by any number the result will be 0 (b) Because if we multiply 1 by any number the result will be the same Show the 5 steps in the encryption by PGP? A- The plaintext message is operated on by a process known as compression. This has the dual benefits of reducing the size of the original message and obscuring any naturally occurring patterns that would assist the code breaker B- A temporary key is created using a random number based on mouse movements and key strokes generated by the user C- The compressed plaintext message is encrypted using the temporary key D- The temporary key is encrypted with the recipient’s PGP public key E- Erypted message and the encrypted temporary key are transmitted to the recipient Arab Open University - Bahrain 2007, T209b

13 Arab Open University - Bahrain 2007, T209b
The Security issues can be classified into the five broad categories. So mention three of these five categories? A- Confidentiality B- Integrity C- Binding D- Authentication E- Non-repudiation The pair letter of the cipher text 271 is: JJ KK JK KL (271/26=10= K, 271-(10x26)=11= L Arab Open University - Bahrain 2007, T209b

14 Arab Open University - Bahrain 2007, T209b
C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Using a modular addition and a digraph coding similar to the one described by Monk: (you can refer to the table 1) What would be the ciphertext for the word “QUIZ” using an encryption key of 560? QU = 16 X = then C = P + K mod 676 = ( ) mod 676 = 996 mod 676 = 320 / 26 = 12 (M) then 320 – (12 x 26) = 8 (I) IZ = 8 X = 233 then C = P + K mod 676 = ( ) mod 676 then C = 793 mod 676 = 117 then 117 / 26 = 4 (E) then 117 – (4 x 26) = 13 (N) Then the Ciphertext = MIEN What would be the plaintext for the ciphertext “ALWA” using decryption key of 116? AL = (0X26) + 11 = 11 then P = C + decryption key = = 127 mod676 = 127 / 26 = 4 (E) then 127 – (4 x 26) = 23 (X) WA = (22 X 26) + 0 = 572 = = 688 mod 676 = 12 / 26 = 0 (A) then 12 – 0 X 26 = 12 (M) So the Plaintext = EXAM Arab Open University - Bahrain 2007, T209b

15 Arab Open University - Bahrain 2007, T209b
Using a modular addition and a digraph coding similar to the one described by Monk: (you can refer to the table 1) What would be the ciphertext for the word “BANK” using an encryption key of 530? BA = 1 X = then C = P + K mod 676 = ( ) mod 676 = 556 mod 676 = 556 / 26 = 21 (V) then 556 – (21 X 26) = 10 (K) NK = 13 X = 348 then C = P + K mod 676 = ( ) mod 676 then C = 878 mod 676 = 202 then 202 / 26 = 7 (H) then 202 – (182) = 20 (U) Then the Ciphertext = VKHU What would be the plaintext for the ciphertext “WSJO” using decryption key of 126? WS = (22X26) = 590 then P = C + decryption key = = 716 mod 676 = 40 / 26 = 1 (B) then 40 – 26 = 14 (O) JO = (9 X 26) + 14 = 248 = = 374 mod 676 = 374 / 26 = 14 (O) then 374 – 14 X 26 = 10 (K) So the Plaintext = BOOK Arab Open University - Bahrain 2007, T209b

16 Arab Open University - Bahrain 2007, T209b
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 Using a modular multiplication and suppose that modulus (n = 29): (you can refer to the table 2) What would be the decryption key given that the encryption key K = 15? K x = 1 mod n = kø(n)-1 mod n = 1527 mod 29 152 = 22 mod 29 154 = 20 mod 29 158 = 23 mod 29 1516= 7 mod 29 then 1527 = = 7x23x22x15 = 2 mod 29 So = 2 What would be the plaintext for the ciphertext “ PGC” using decryption key ( )? P G C = 17 x 2 = 34 = 5 = D, 8 x 2 = 16 = O, 4 x 2 = 8 = G DOG Arab Open University - Bahrain 2007, T209b

17 Arab Open University - Bahrain 2007, T209b
Using a modular multiplication and suppose that modulus (n = 29): (you can refer to the table 2) What would be the decryption key given that the encryption key K = 11 ? K x = 1 mod n = kø(n)-1 mod n = 1127 mod 29 112 = 5 mod 29 114 = 25 mod 29 118 = 16 mod 29 1116= 24 mod 29 then 1127 = = 24x16x5x11 = 8 mod 29 So = 8 What would be the plaintext for the ciphertext “HUL” using decryption key ( )? H U L = 9 x 8 = 72 = 14 = M, 22 x 8 = 176 = 2= A, 13 x 8 = 104 = 17 = P MAP Arab Open University - Bahrain 2007, T209b

18 Arab Open University - Bahrain 2007, T209b
Show that the modular multiplication is commutative? In conventional arithmetic multiplication is commutative. A simple example can be used to investigate whether or not modular multiplication is commutative: 5 × 7 = 3 mod 8 and 7 × 5 = 3 mod 8 So, 5 × 7 mod 8 = 7 × 5 mod 8 Suppose that Bob want to send a message to Alice by using a double locking protocol. So briefly show the three stages of this protocol? A- Stage (1): Bob sends Alice a message encrypted using his secret key B- Stage (2): Alice encrypts Bob’s message using her secret key and sends it back to Bob, then Bob decrypts the message using his decryption key derived from his encryption key C- Stage (3): Once decrypted with his key, Bob sends the result to Alice Arab Open University - Bahrain 2007, T209b

19 Arab Open University - Bahrain 2007, T209b
Mention two of the three important conditions for a secure communications protocol ? A- A cracker should be unable to find out the key given a sequence of messages encrypted with that key B- A cracker should be unable to find out the key given both the plaintext and the ciphertext C- It should be impossible to work out how to change the ciphertext to match a particular alteration in the plaintext and hence forge a plaintext without the need to decrypt the ciphertext !! Arab Open University - Bahrain 2007, T209b

20 مع تمنياتي للجميع بالتوفيـق ان شاء الله
لا تنسون الآلة الحاسبة . . مع تمنياتي للجميع بالتوفيـق ان شاء الله Arab Open University - Bahrain 2007, T209b


Download ppt "May 2008 Prepared by Dr. Abdulrahman Awadhi"

Similar presentations


Ads by Google