Network Security
RSA
RSA is a widely used asymmetric cryptographic algorithm, named after its inventors Rivest, Shamir, and Adleman, that enables encryption, key exchange, and digital signatures based on the computational difficulty of factoring the product of two large prime numbers.
In plain terms
RSA is one of the original public-key algorithms, the math that lets you encrypt to someone using their public key or prove a message is yours with a digital signature. Its security comes from the fact that multiplying two huge prime numbers is easy, but undoing that multiplication is extraordinarily hard.
RSA is one of the first practical and most influential asymmetric cryptographic algorithms, named after Rivest, Shamir, and Adleman, who published it. As a public-key algorithm, it uses a pair of keys, a public key and a private key, and supports both encryption and digital signatures. For decades RSA has been a cornerstone of secure communication, underpinning TLS, secure email, code signing, and countless other systems, and although newer algorithms are increasingly preferred for efficiency, RSA remains widely deployed and important to understand.
RSA’s security rests on a mathematical asymmetry: it is easy to multiply two large prime numbers together but extremely hard to factor the resulting product back into those primes. The public and private keys are derived from such large numbers, and the difficulty of factoring is what prevents an attacker who knows the public key from deducing the private key. As long as the numbers involved are large enough, factoring them is computationally infeasible with classical computers, which is what makes RSA secure. This reliance on the factoring problem is the defining feature of the algorithm.
In use, RSA serves the two complementary roles of asymmetric cryptography. For confidentiality and key transport, data or a symmetric key can be encrypted with a recipient’s public key so that only the holder of the private key can decrypt it; historically RSA was commonly used to transport a session key in protocols like older TLS. For authentication and integrity, the private key holder produces a digital signature that anyone can verify with the public key, proving authorship and that the data is unchanged. These capabilities made RSA a general-purpose foundation for both establishing secure channels and signing data.
Because RSA is computationally heavy and its security requires large keys, it is not used to encrypt large volumes of data directly. As with asymmetric cryptography generally, RSA is used to establish trust and exchange or protect a symmetric key, after which fast symmetric encryption handles the bulk data. RSA key sizes have grown over time as computing power increased; key lengths once considered safe are now inadequate, and current practice uses substantially larger keys to maintain security. This steady increase in required key size, and the resulting performance cost, is one reason elliptic-curve cryptography, which achieves comparable security with smaller keys, has become attractive as an alternative.
RSA must be implemented carefully, because the raw mathematical operation is not secure on its own. Proper padding schemes are essential, and the use of weak or absent padding has led to real-world attacks. Other pitfalls include using insufficient key sizes, generating keys with poor randomness or shared prime factors, and side-channel leaks during private key operations. As with other cryptography, the algorithm itself can be sound while a flawed implementation undermines security, so standardized, well-reviewed libraries and correct padding and parameter choices are critical for safe RSA use.
RSA also sits at the center of concerns about quantum computing. The factoring problem that makes RSA secure against classical computers could, in principle, be solved efficiently by a sufficiently powerful quantum computer using a known quantum algorithm, which would break RSA. This is a major driver of post-quantum cryptography and migration planning, since RSA secures so much existing infrastructure. While large-scale quantum computers capable of this do not exist today, the long lifetime of some protected data and systems makes planning for a transition away from RSA and similar algorithms a current concern rather than a purely future one.
In practice, RSA is a foundational asymmetric algorithm that brought public-key encryption and digital signatures into widespread use, secured by the difficulty of factoring large numbers. It establishes trust and protects or exchanges symmetric keys rather than encrypting bulk data, requires ever-larger keys and careful implementation to stay secure, and faces an eventual quantum threat that motivates migration to newer algorithms. Understanding RSA clarifies both how much of today’s security was built on it and why the field is gradually evolving toward more efficient and quantum-resistant alternatives.