190 likes | 362 Views
RSA. By: Abhishek Naik Viswanath Chennuru CPSC 624. Contents. What is Encryption ? What is RSA ? Key Generation Encryption and Decryption Applications Attacks on RSA Conclusion. What is encryption ?.
E N D
RSA By: AbhishekNaik ViswanathChennuru CPSC 624
Contents • What is Encryption ? • What is RSA ? • Key Generation • Encryption and Decryption • Applications • Attacks on RSA • Conclusion
What is encryption ? • Transforming Plaintext using a Cipher such that only person with the key can read the information. • Two types of Encryption are: Symmetric and Public key
Why public key encryption ? • Two different keys for encryption and decryption(public and private) • No secret key exchange is necessary • Anyone can encrypt using receivers public key but only he can decrypt
What is RSA? • Named after Ron Rivest, AdiShamir and Leonard Adleman, the inventors. • Is a Public Key Algorithm first described in 1978 • Based on the presumed difficulty of factoring large integers • Used for Encryption and Authentication
Steps in RSA • Key generation • Encryption • Transmitting • Decryption
Key generation in RSA • Two distinct prime numbers are chosen, p and q • Compute n = pq. n is used as modulus for both private and public key • Compute φ(n) = (p – 1)(q – 1), where φ is Euler's totient function.
Key generation in RSA • Choose a large, random integer d such that it is a relative prime to z. i.e. if gcd (d, z) = 1 • The integer e is computed using p, q and d to be the multiplicative inverse of “d modulo z”. i.e. • The public key is (e, n) and the private key is (d, n).
Encryption and decryption • Encryption: • To encrypt the plain text M using the public key (e, n), represent the message as an integer value between 0 and n – 1. This can be done by breaking the message into blocks and assigning values to it • After the message is obtained in the necessary numeric format, it can be encrypted by raising it to the 2 e’thpower modulo of n • The resulting cipher text of the encryption will be integer values ranging between 0 and n – 1.
Encryption and decryption • Decryption: • When the receiver gets the cipher text (C), it is decrypted using the private key (d, n). • The cipher text is raised to another power d and then modulo n which gives back the plain text.
applications • RSA is used in security protocols such as: • IPSEC/IKE - IP data security • TLS/SSL - transport data security (web) • PGP - email security • SSH - terminal connection security • SILC - conferencing service security
Applications • Digital Signature: • To verify the origin of the document and identity of the sender • Based on both the document and the signer's private key • Sender encrypts the message with the public key of the intended recipient • Then encrypts the "digital fingerprint" of the document with his or her own private key • Anyone with access to the public key of the signer may verify the signature
Attacks on RSA • Searching the Message Space • If the message space is small, then one could simply try to encrypt every possible message block, until a match is found with one of the ciphertext blocks. • Guessing d • Known ciphertext attack. The attacker know both the private and public key. They then try to crack the key to discover the private exponent d. • Cycle Attack • Encrypt the ciphertext repeatedly and count the iterations, continue till the original text is found
Attacks on RSA • Common Modulus • A weakness where users within an organization share a public modulus. Eavesdropping is easier • Faulty Encryption • During exchange of public keys, man in middle changes specific bits in the public key • Low Exponent • Based on Chinese Remainder Theorem, where if same message is encrypted 3 times with different types of moduli, we can retrieve the message
Conclusion • RSA has many advantages over symmetric key encryption, but it is considerably slower • RSA Security claims that 1024 bit keys suffice for the current period and 2048 keys can be adopted in future • After 2030, 3072-bit keys should be used