TOPICS
Search

RSA Cryptosystem


The RSA cryptosystem is a public-key system based on modular exponentiation and the difficulty of factoring a product of two large primes. To generate keys, choose primes p and q, set n=pq, choose an encryption exponent e relatively prime to phi(n), and choose d such that ed=1  (modphi(n)). The pair (n,e) is public, while d and the factorization of n are private.

For a message representative m, RSA encryption computes c=m^e  (modn), and decryption recovers m=c^d  (modn). RSA signatures reverse the private and public exponents: a signer computes a representative s=m^d  (modn), and verification checks s^e=m  (modn). Practical RSA uses encoding and padding schemes rather than applying these textbook operations directly to a message.


See also

Public-Key Cryptography, RSA Encryption, RSA Number

Explore with Wolfram|Alpha

References

Rivest, R.; Shamir, A.; and Adleman, L. "A Method for Obtaining Digital Signatures and Public Key Cryptosystems." Comm. ACM 21, 120-126, 1978.

Cite this as:

Weisstein, Eric W. "RSA Cryptosystem." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/RSACryptosystem.html

Subject classifications