Skip to content
ContentLora

    Tip: press / anywhere to search.

    Explainer

    RSA and elliptic-curve cryptography explained

    RSA and elliptic-curve cryptography (ECC) are the two public-key families behind most of today's secure connections and digital signatures: RSA rests on the difficulty of factoring large numbers, ECC on the discrete logarithm problem over elliptic curves.[1][2] ECC reaches the same estimated security with far smaller keys, for example a 256-bit curve against a 3072-bit RSA modulus.[3] Both are vulnerable to Shor's algorithm on a large enough quantum computer, so NIST's final transition plan, published in October 2026, deprecates them after 2030 and disallows them after 2035.[4][5]

    Editor reviewedUpdated Explainer25 claims · 100% primaryPost-quantum cryptography and security, Cybersecurity, Mathematics research
    Reading level: 6 passages differ; the rest is the same for everyone.

    This page goes one level deeper than how encryption works on the two public-key families that post-quantum cryptography replaces. For what comes next, read how post-quantum cryptography works. Choose a reading level in each section.

    What public-key cryptography needs

    Public-key cryptography uses two linked keys: a public key you can hand to anyone and a private key you keep. Working out the private key from the public one has to be practically impossible.[6] RSA and elliptic-curve cryptography are the two main ways of building such key pairs today. They are used to agree on secret keys and to sign data.[4]

    Each family relies on a math problem that ordinary computers find extremely hard. For RSA, it is splitting a huge number back into the two primes that were multiplied to make it.[1] For elliptic curves, it is a puzzle called the discrete logarithm problem.[2]

    Asymmetric schemes need a trapdoor: a public key from which the private key is computationally infeasible to derive.[6] NIST’s approved public-key standards fall into two groups. FIPS 186 covers signatures (RSA, ECDSA, EdDSA). SP 800-56A covers discrete-log key establishment (Diffie-Hellman and MQV over finite fields and elliptic curves), and SP 800-56B covers RSA-based key establishment.[4][2] Their security rests on integer factorisation and on the discrete logarithm problem respectively.[1][2]

    How RSA works

    RSA is named after the three researchers whose 1978 paper described it.[7] An RSA public key is a very large number, the modulus, made by multiplying two or more secret primes, plus a smaller number called the public exponent. The private key is a number worked out from those secret primes.[8] Anyone who could factor the modulus back into its primes could rebuild the private key, so RSA is only as strong as factoring is hard.[1]

    The current RSA rulebook is PKCS #1 version 2.2, published as RFC 8017 in 2016.[9] NIST counts RSA as the main algorithm of its type, and the size of the modulus is what people mean by “RSA key size”.[10]

    In RFC 8017 the public key is (n, e), where n is a product of u ≥ 2 distinct odd primes (conventionally p and q). The private exponent d satisfies e·d ≡ 1 (mod λ(n)).[8] NIST’s IFC key-establishment schemes rest on the intractability of factoring products of two large, distinct primes.[1]

    PKCS #1 v2.2 wraps the RSA primitive in encryption and signature schemes. It requires RSAES-OAEP for new encryption applications and keeps RSAES-PKCS1-v1_5 only for compatibility. For signatures it requires RSASSA-PSS in new applications.[11] NIST treats the modulus length k as the key size.[10]

    How elliptic-curve cryptography works

    Elliptic-curve cryptography does the same jobs as RSA using points on a special kind of curve. Its security depends on the discrete logarithm problem: it is easy to “multiply” a point on the curve by a secret number, but very hard to work backwards to the secret number.[2]

    Two well-known curves are NIST’s P-256, a long-standing US government recommendation, and Curve25519. Curve25519 was standardised by the internet standards community in 2016, in a form designed for implementations that resist timing attacks.[12][13] The 2016 standard for Curve25519 notes concern in the cryptographic community about how NIST’s original curves were generated.[14] Since 2023, NIST’s own list of recommended curves includes versions of the newer designs.[12]

    SP 800-56A specifies Diffie-Hellman and MQV schemes whose security depends on the discrete logarithm problem in the relevant group, including elliptic-curve groups.[2] SP 800-186 (February 2023) lists the curves recommended for US government use. It includes the long-standing Weierstrass curve P-256 and adds two Edwards curves that NIST credits with better performance, side-channel resistance and simpler implementation. Its W-25519 curve is isomorphic to Curve25519.[12]

    RFC 7748 specifies curve25519 and curve448 at roughly 128- and 224-bit security, chosen for constant-time, exception-free scalar multiplication that resists timing and cache attacks.[13] Its introduction cites community concern about the generation of the NIST curves.[14] X25519 inputs and outputs are 32-byte strings.[15] For signatures, RFC 8032 defines EdDSA over edwards25519 and edwards448.[16]

    Key sizes compared

    Elliptic curves need much shorter keys than RSA for the same protection. NIST estimates that a 256-bit elliptic-curve key is about as strong as a 3072-bit RSA key, and both match AES-128. At lower strength, a 2048-bit RSA key is roughly equal to a 224-bit curve key.[3]

    NIST adds a warning: these comparisons will change sharply once quantum computers become practical.[17]

    SP 800-57 Part 1 Rev. 5, Table 2, gives comparable strengths:

    Security strengthSymmetricRSA modulus (k)ECC key (f)
    112 bits-2048224-255
    128 bitsAES-1283072256-383
    256 bitsAES-25615360512+

    The figures come from that table.[3] Its footnote warns that the RSA and ECC estimates will be significantly affected once quantum computing is practical.[17]

    Where you meet them

    Every time your browser opens a secure website using TLS 1.3, it uses these algorithms. The standard requires support for RSA and elliptic-curve signatures and for key exchange on NIST’s P-256 curve, and recommends Curve25519 as well.[18] NIST’s signature standard, FIPS 186-5, approves RSA, ECDSA and EdDSA.[19] How digital signatures work explains the signing side.

    RFC 8446 makes rsa_pkcs1_sha256 (for certificates), rsa_pss_rsae_sha256 and ecdsa_secp256r1_sha256 mandatory signature schemes for TLS 1.3. It also makes secp256r1 key exchange mandatory and X25519 recommended.[18] FIPS 186-5 approves RSA, ECDSA and EdDSA and drops DSA for new signatures.[19] Hybrid post-quantum TLS, standardised in RFC 10024 in August 2026, combines ML-KEM with X25519 or NIST-curve Diffie-Hellman during the transition; see hybrid-post-quantum-tls.[20]

    The quantum deadline

    A powerful enough quantum computer running Shor’s algorithm could break both RSA and elliptic-curve cryptography.[21] NIST says the RSA, ECDSA and EdDSA signature algorithms, and the key-exchange methods built on RSA and Diffie-Hellman, are all vulnerable in this way.[4]

    In October 2026 NIST published its final transition plan. It will deprecate these algorithms after 2030 and stop allowing them under its standards after 2035.[22][5] The most sensitive US government systems face earlier deadlines: 2030 for key exchange and 2031 for signatures.[23] The replacements are new standards such as ML-KEM and ML-DSA, which NIST published in August 2024.[24]

    IR 8547 (final, 27 October 2026, replacing the November 2024 draft) states that FIPS 186 signatures and SP 800-56A/B key establishment are vulnerable to Shor’s algorithm on a cryptanalytically relevant quantum computer.[22][4] NIST will deprecate quantum-vulnerable public-key cryptography after 2030 and disallow it after 2035. For signatures this applies to all quantum-vulnerable algorithms, instead of the earlier SP 800-57 projection that 112-bit public-key schemes would be disallowed on 1 January 2031.[5] Under EO 14412 and OMB M-26-15, high-sensitivity federal systems must adopt PQC key establishment by 31 December 2030 and PQC signatures by 31 December 2031.[23] Because recorded traffic can be decrypted later, key exchange is the more urgent half; see harvest now, decrypt later.[25]

    Next in the crash course

    More in Post-quantum crypto

    Developing in AI & Computing

    Go deeper

    Questions readers ask

    What is the difference between RSA and elliptic-curve cryptography?

    Both are public-key systems, but they rest on different math problems. RSA's security relies on how hard it is to factor a number that is the product of two large primes, while elliptic-curve schemes rely on the discrete logarithm problem over elliptic curves.[1][2]

    Why are elliptic-curve keys so much shorter than RSA keys?

    NIST estimates that a 256-bit elliptic-curve key gives about the same security, 128 bits, as a 3072-bit RSA key or AES-128. At the 256-bit level the gap widens to an elliptic-curve key of 512 bits or more against a 15360-bit RSA key.[3]

    Is 2048-bit RSA still safe?

    NIST rates 2048-bit RSA at 112 bits of security. Its October 2026 transition plan deprecates all quantum-vulnerable public-key algorithms, including RSA at every key size, after 2030 and disallows them after 2035.[3][5]

    What is Curve25519?

    Curve25519 is an elliptic curve specified in RFC 7748 for Diffie-Hellman key agreement, designed for constant-time implementations that resist timing and cache side-channel attacks. The X25519 function built on it uses 32-byte keys, and NIST's SP 800-186 includes an equivalent form.[13][15][12]

    Will quantum computers break RSA and ECC?

    NIST says RSA, ECDSA, EdDSA and the Diffie-Hellman and RSA key-establishment schemes are all vulnerable to Shor's algorithm on a cryptanalytically relevant quantum computer. That is why NIST plans to deprecate them after 2030 and disallow them after 2035.[4][5]

    Sources

    · 25 claims from 3 publishers

    Each numbered claim is a statement we checked against the sources listed with it. Tap a number in the text to see its sources in place.

    1. [1]

      NIST says the security of its RSA-based key-establishment schemes relies on the difficulty of factoring integers that are products of two sufficiently large, distinct prime numbers. confirmedas of 2019-03-21

    2. [2]

      NIST's SP 800-56A specifies key-establishment schemes, including Diffie-Hellman and MQV variants, whose security depends on the difficulty of the discrete logarithm problem over finite fields and elliptic curves. confirmedas of 2018-04-16

    3. [3]

      NIST estimates that a 2048-bit RSA key and a 224- to 255-bit elliptic-curve key both give 112 bits of security; 128-bit security, comparable to AES-128, needs a 3072-bit RSA key or a 256- to 383-bit elliptic-curve key; and 256-bit security needs a 15360-bit RSA key or an elliptic-curve key of 512 bits or more. confirmedas of 2020-05-04

    4. [4]

      NIST's final IR 8547 (October 2026) says the RSA, ECDSA and EdDSA signature algorithms in FIPS 186 and the RSA, Diffie-Hellman and MQV key-establishment schemes in SP 800-56A and SP 800-56B are vulnerable to Shor's algorithm on a cryptanalytically relevant quantum computer. confirmedas of 2026-10-27

    5. [5]

      In its final IR 8547, NIST says it will deprecate quantum-vulnerable public-key cryptography after 2030 and disallow its use under NIST standards and guidelines after 2035; for signatures this covers all quantum-vulnerable algorithms, instead of the earlier projection that 112-bit public-key schemes would be disallowed on 1 January 2031. confirmedas of 2026-10-27

    6. [6]

      Public-key (asymmetric) cryptography uses two related keys, a public key and a private key that cannot feasibly be derived from the public one, using one to encrypt or digitally sign data and the other to decrypt it or verify the signature; it lets parties communicate securely without first sharing a secret key. confirmedas of 2026-11-07

    7. [7]

      RFC 8017 cites the RSA algorithm to a 1978 paper by Rivest, Shamir and Adleman in Communications of the ACM, "A Method for Obtaining Digital Signatures and Public-Key Cryptosystems". confirmedas of 2016-11-01

    8. [8]

      An RSA public key consists of a modulus n and a public exponent e, where n is the product of at least two distinct odd primes (the first two are usually called p and q); the private exponent d is chosen so that e times d equals 1 modulo a value computed from those primes. confirmedas of 2016-11-01

    9. [9]

      RFC 8017 (PKCS #1 version 2.2, November 2016) sets out recommendations for implementing public-key cryptography based on the RSA algorithm, covering the basic primitives, encryption schemes and signature schemes. confirmedas of 2016-11-01

    10. [10]

      NIST describes RSA as the predominant algorithm based on integer factorization, and says the RSA modulus size is commonly considered to be the key size. confirmedas of 2020-05-04

    11. [11]

      PKCS #1 v2.2 requires RSAES-OAEP to be supported for new encryption applications and keeps the older RSAES-PKCS1-v1_5 only for compatibility, and requires RSASSA-PSS in new signature applications. confirmedas of 2016-11-01

    12. [12]

      NIST SP 800-186 (February 2023) lists the elliptic curves recommended for US government use, including the long-standing P-256, two newer Edwards curves that NIST says give better performance, side-channel resistance and simpler implementation, and a curve, W-25519, that is isomorphic to the IETF's Curve25519. confirmedas of 2023-02-03

    13. [13]

      RFC 7748 (January 2016) specifies the curve25519 and curve448 elliptic curves for Diffie-Hellman key agreement, aimed at roughly 128-bit and 224-bit security and designed for constant-time implementation that resists timing and cache side-channel attacks. confirmedas of 2016-01-01

    14. [14]

      RFC 7748 notes concern in the cryptographic community about how the NIST-defined curves were generated and about their potential weaknesses, as part of the background for its alternative curves. confirmedas of 2016-01-01

    15. [15]

      The X25519 function in RFC 7748 takes and outputs 32-byte strings. confirmedas of 2016-01-01

    16. [16]

      RFC 8032 (January 2017) describes the Edwards-curve Digital Signature Algorithm (EdDSA), instantiated with the edwards25519 and edwards448 curves. confirmedas of 2017-01-01

    17. [17]

      NIST's key-size comparison table carries a warning that its security estimates for RSA and elliptic-curve keys will be significantly affected once quantum computing becomes practical. confirmedas of 2020-05-04

    18. [18]

      The TLS 1.3 standard requires compliant applications to support RSA and ECDSA (P-256) signatures and key exchange over the NIST P-256 curve, and recommends supporting key exchange with X25519. confirmedas of 2018-08-01

    19. [19]

      FIPS 186-5, published on 3 February 2023, approves three signature techniques - RSA (as specified in RFC 8017), ECDSA and EdDSA (as specified in RFC 8032) - and no longer specifies the older DSA, which may only be used to verify existing signatures. confirmedas of 2023-02-03

    20. [20]

      In August 2026 the IETF published RFC 10024, a Proposed Standard defining three hybrid key agreement mechanisms for TLS 1.3, X25519MLKEM768, SecP256r1MLKEM768 and SecP384r1MLKEM1024, which combine ML-KEM with elliptic-curve Diffie-Hellman. confirmedas of 2026-08-10

    21. [21]

      A large-scale quantum computer would make insecure the public-key systems based on integer factorization, such as RSA, and those based on the discrete logarithm problem, which includes elliptic-curve cryptography. confirmedas of 2026-10-10

    22. [22]

      NIST published the final version of IR 8547, Transition to Post-Quantum Cryptography Standards, on 27 October 2026, replacing the initial public draft of 12 November 2024. confirmedas of 2026-10-27

    23. [23]

      NIST's final IR 8547 notes that Executive Order 14412 and OMB Memorandum M-26-15 require the US government's most sensitive systems to adopt post-quantum cryptography for key establishment by 31 December 2030 and for digital signatures by 31 December 2031. confirmedas of 2026-10-27

    24. [24]

      On 13 August 2024 NIST published its first three finalized post-quantum standards, FIPS 203 (ML-KEM), FIPS 204 (ML-DSA) and FIPS 205 (SLH-DSA). confirmedas of 2024-08-13

    25. [25]

      In a "harvest now, decrypt later" attack, an adversary captures encrypted data today and stores it, hoping a future quantum computer will break the encryption. confirmedas of 2026-10-10

    Revision history (1)
    1. Page created.

    Created Nov 21, 2026. Last reviewed by an editor on Nov 22, 2026. Next scheduled review: May 17, 2027.

    Cite this page

    "RSA and elliptic-curve cryptography explained." ContentLora, updated Nov 21, 2026. https://contentlora.com/explain/rsa-and-elliptic-curve-cryptography-explained

    Spotted an error? Suggest a correction or emailcorrections@contentlora.com.