Cryptography By Nick Belhumeur Overview What is Cryptography
Cryptography By: Nick Belhumeur
Overview What is Cryptography? l 2 types of cryptosystems l Example of Encryption l Padding Schemes l Security l
What is Cryptography? l l 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: 1. 2. Symmetric Asymmetric
Symmetric Cryptosystems l l l Symmetric cryptosystems use the same key (the secret key) to encrypt and decrypt a message Also known as “private key encryption” Key sent with message for decryption l Wouldn’t need if key could be sent securely with message
Asymmetric Cryptosystems asymmetric cryptosystems use one key (the public key) to encrypt a message and a different key (the private key) to decrypt it l Also known as “public key encryption” l A reliable public key encryption: RSA l l Ron Rivest, Adi Shamir, Leonard Adleman
What is RSA? l A complex mathematical equation through which variables are used but are not all available to be sent to the recipient. l The missing variable is calculated during the end process by various methods of the recipient computer.
RSA Example l Person A selects 2 prime numbers. l P=23 and q=41 l This is normally a much larger number (1024 bits max) l Person A multiplies p and q l Pq l = (23)(41) = 943 This is the public key (943) l This can be told to person B.
RSA Example l Person A also chooses a number e. le is relatively prime to (p-1)(q-1) l (23 -1)(41 -1) = (22)(40) = 880 l e = 7 (randomly chosen, relatively prime) Person A tells Person B e as well l Now, Person B can send a message to Person A with this information l
RSA Example Person B sends message m=35 l Person B must calculate the value C l l. C = Me(mod N) = 357(mod 943) l 357(mod 943) = 64339296875(mod 943) = 545 l Person B sends the encoding, 545, to Person A
RSA Example l Now Person A wants to decode 545 l To do this, A must find a number d such that ed = 1(mod(p-1)(q-1)) l In our case… 7 d = 1(mod 880) l d = 503 l To find the decoding, A must calculate Cd(mod N) = 545503(mod 943) l This looks like a bad calculation…but notice
RSA Example l 503 = 256+128+64+32+16+4+2+1 l The binary expression of 503!!! 545503 = 545356+128+64+32+16+4+2+1 = 545256 545128 … 5451 l We only care about the result of (mod 943) l
RSA Example l Table generated by the binary expression of 503 5451 = 5452 = 923 5454 = 400 5458 = 633 54516 = 857 54532 = 795 54564 = 215 545128 = 18 545256 = 324
RSA Example l The result we want from the previous table 545503(mod 943) = 324*18*215*795*857*400*923*545 (mod 493) = 35 l This may seem complex, but is simple for a computer to calculate l N = 35 (Person A decrypted the message)
Important factors of RSA l Plain-text attacks are potentially possible in discovering the private key to decrypt the message. l Additionally, there are other disadvantages to RSA that can compromise the private key.
Padding Schemes When RSA is used in practice, it is often combined with a padding scheme. l Similar to the “dear …” part of a letter l Is used to add a random size to the message so the hacker will not know the exact size of the entire message l
Results of padding scheme l This secures the RSA encryption method further by protecting it against some of the attacks that the RSA method would typically be weaker against.
Plain-text attack l l l 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. The padding makes RSA semantically secure which means an attacker wouldn’t know the difference between two encryptions, even with the corresponding plain-texts.
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. l Get the prime numbers in doing so and you could potentially decrypt the message. l Remember: 1 – 1024 bits for the key l
Summary l Definition of Cryptography l Types of cryptosystems l RSA Encryption l Padding Schemes l Security of RSA method
Any Questions?
- Slides: 20