Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cryptography By: Nick Belhumeur. Overview What is Cryptography? What is Cryptography? 2 types of cryptosystems 2 types of cryptosystems Example of Encryption.

Similar presentations


Presentation on theme: "Cryptography By: Nick Belhumeur. Overview What is Cryptography? What is Cryptography? 2 types of cryptosystems 2 types of cryptosystems Example of Encryption."— Presentation transcript:

1 Cryptography By: Nick Belhumeur

2 Overview What is Cryptography? What is Cryptography? 2 types of cryptosystems 2 types of cryptosystems Example of Encryption Example of Encryption Padding Schemes Padding Schemes Security Security

3 What is Cryptography? the science encompassing the principles and methods of transforming an intelligible message into one that is unintelligible, and then transforming that message back to its original form the science encompassing the principles and methods of transforming an intelligible message into one that is unintelligible, and then transforming that message back to its original form 2 types of cryptosystems: 2 types of cryptosystems: 1. Symmetric 2. Asymmetric

4 Symmetric Cryptosystems Symmetric cryptosystems use the same key (the secret key) to encrypt and decrypt a message Symmetric cryptosystems use the same key (the secret key) to encrypt and decrypt a message Also known as “private key encryption” Also known as “private key encryption” Key sent with message for decryption Key sent with message for decryption Wouldn’t need if key could be sent securely with message Wouldn’t need if key could be sent securely with message

5 Asymmetric Cryptosystems asymmetric cryptosystems use one key (the public key) to encrypt a message and a different key (the private key) to decrypt it asymmetric cryptosystems use one key (the public key) to encrypt a message and a different key (the private key) to decrypt it Also known as “public key encryption” Also known as “public key encryption” A reliable public key encryption: RSA A reliable public key encryption: RSA Ron Rivest, Adi Shamir, Leonard Adleman Ron Rivest, Adi Shamir, Leonard Adleman

6 What is RSA? A complex mathematical equation through which variables are used but are not all available to be sent to the recipient. A complex mathematical equation through which variables are used but are not all available to be sent to the recipient. The missing variable is calculated during the end process by various methods of the recipient computer. The missing variable is calculated during the end process by various methods of the recipient computer.

7 RSA Example Person A selects 2 prime numbers. Person A selects 2 prime numbers. P=23 and q=41 P=23 and q=41 This is normally a much larger number (1024 bits max) This is normally a much larger number (1024 bits max) Person A multiplies p and q Person A multiplies p and q Pq = (23)(41) = 943 Pq = (23)(41) = 943 This is the public key (943) This is the public key (943) This can be told to person B. This can be told to person B.

8 RSA Example Person A also chooses a number e. Person A also chooses a number e. e is relatively prime to (p-1)(q-1) e is relatively prime to (p-1)(q-1) (23-1)(41-1) = (22)(40) = 880 (23-1)(41-1) = (22)(40) = 880 e = 7 (randomly chosen, relatively prime) e = 7 (randomly chosen, relatively prime) Person A tells Person B e as well Person A tells Person B e as well Now, Person B can send a message to Person A with this information Now, Person B can send a message to Person A with this information

9 RSA Example Person B sends message m=35 Person B sends message m=35 Person B must calculate the value C Person B must calculate the value C C = M e (mod N) = 35 7 (mod 943) C = M e (mod N) = 35 7 (mod 943) 35 7 (mod 943) = 64339296875(mod 943) 35 7 (mod 943) = 64339296875(mod 943) = 545 = 545 Person B sends the encoding, 545, to Person A Person B sends the encoding, 545, to Person A

10 RSA Example Now Person A wants to decode 545 Now Person A wants to decode 545 To do this, A must find a number d To do this, A must find a number d such that ed = 1(mod(p-1)(q-1)) In our case… 7d = 1(mod 880) In our case… 7d = 1(mod 880) d = 503 d = 503 To find the decoding, A must calculate C d (mod N) = 545 503 (mod 943) To find the decoding, A must calculate C d (mod N) = 545 503 (mod 943) This looks like a bad calculation…but notice This looks like a bad calculation…but notice

11 RSA Example 503 = 256+128+64+32+16+4+2+1 503 = 256+128+64+32+16+4+2+1 The binary expression of 503!!! The binary expression of 503!!! 545 503 = 545 356+128+64+32+16+4+2+1 545 503 = 545 356+128+64+32+16+4+2+1 = 545 256 545 128 …545 1 = 545 256 545 128 …545 1 We only care about the result of (mod 943) We only care about the result of (mod 943)

12 RSA Example Table generated by the binary expression of 503 Table generated by the binary expression of 503 545 1 = 545 545 2 = 923 545 4 = 400 545 8 = 633 545 16 = 857 545 32 = 795 545 64 = 215 545 128 = 18 545 256 = 324

13 RSA Example The result we want from the previous table The result we want from the previous table 545 503 (mod 943) = 324*18*215*795*857*400*923*545 (mod 493) = 35 This may seem complex, but is simple for a computer to calculate This may seem complex, but is simple for a computer to calculate N = 35 (Person A decrypted the message) N = 35 (Person A decrypted the message)

14 Important factors of RSA Plain-text attacks are potentially possible in discovering the private key to decrypt the message. Plain-text attacks are potentially possible in discovering the private key to decrypt the message. Additionally, there are other disadvantages to RSA that can compromise the private key. Additionally, there are other disadvantages to RSA that can compromise the private key.

15 Padding Schemes When RSA is used in practice, it is often combined with a padding scheme. When RSA is used in practice, it is often combined with a padding scheme. Similar to the “dear …” part of a letter Similar to the “dear …” part of a letter Is used to add a random size to the message so the hacker will not know the exact size of the entire message Is used to add a random size to the message so the hacker will not know the exact size of the entire message

16 Results of padding scheme This secures the RSA encryption method further by protecting it against some of the attacks that the RSA method would typically be weaker against. This secures the RSA encryption method further by protecting it against some of the attacks that the RSA method would typically be weaker against.

17 Plain-text attack Because RSA is a deterministic-based encryption method, there is no random component to encryption. Because RSA is a deterministic-based encryption method, there is no random component to encryption. This means a comparison of text to the encrypted text could potentially be enough to begin to crack the algorithm. This means a comparison of text to the encrypted text could potentially be enough to begin to crack the algorithm. The padding makes RSA semantically secure which means an attacker wouldn’t know the difference between two encryptions, even with the corresponding plain-texts. The padding makes RSA semantically secure which means an attacker wouldn’t know the difference between two encryptions, even with the corresponding plain-texts.

18 Security In choosing prime numbers for the RSA encryption, it would be easy to see that factoring n is the easiest way to crack the encryption. In choosing prime numbers for the RSA encryption, it would be easy to see that factoring n is the easiest way to crack the encryption. Get the prime numbers in doing so and you could potentially decrypt the message. Get the prime numbers in doing so and you could potentially decrypt the message. Remember: 1 – 1024bits for the key Remember: 1 – 1024bits for the key

19 Summary Definition of Cryptography Definition of Cryptography Types of cryptosystems Types of cryptosystems RSA Encryption RSA Encryption Padding Schemes Padding Schemes Security of RSA method Security of RSA method

20 Any Questions?


Download ppt "Cryptography By: Nick Belhumeur. Overview What is Cryptography? What is Cryptography? 2 types of cryptosystems 2 types of cryptosystems Example of Encryption."

Similar presentations


Ads by Google