Module 1 · Unit 2 · Lesson 2.3
COMP 6660 · Enterprise Cybersecurity Asymmetric Cryptography
Asymmetric cryptography solved the key distribution problem that limited symmetric cryptography — and in doing so, made modern enterprise trust infrastructure possible. This lesson examines RSA, elliptic-curve cryptography, and Diffie–Hellman key exchange.
00 Introduction
Symmetric cryptography is fast and efficient, but it has a fatal flaw at enterprise scale: both parties must share the same secret key, and there is no obvious way to deliver that key securely without already having a secure channel. Asymmetric cryptography solves this problem.
The idea behind asymmetric cryptography is elegant and — when it was first proposed in the mid-1970s — revolutionary. Instead of a single shared key, each party has a key pair: a public key that can be freely distributed, and a private key that is kept secret. The two keys are mathematically related, such that data encrypted with the public key can only be decrypted with the private key. Because the public key can be shared openly, the key distribution problem disappears.
The consequences of this idea extend far beyond encryption. Digital signatures — the mechanism through which enterprises verify the authenticity of software, certificates, and messages — depend on asymmetric cryptography. Certificate infrastructure — the trust fabric of the web and of enterprise identity — depends on asymmetric cryptography. Modern secure protocols such as TLS, SSH, and IPsec depend on asymmetric cryptography to establish trust and negotiate keys. Without asymmetric cryptography, the digital economy as we know it would not exist.
This lesson examines the principal asymmetric algorithms — RSA, elliptic-curve cryptography, and Diffie–Hellman key exchange — and the criteria for selecting among them. It explains how asymmetric and symmetric cryptography work together in hybrid systems, examines the enterprise contexts in which asymmetric cryptography is most critical, and closes with the emerging challenge of quantum computing, which threatens the mathematical foundations on which RSA and elliptic-curve cryptography rest.
How to read this lesson
Sections 1–2 establish the conceptual foundation. Sections 3–5 examine the three principal algorithm families. Sections 6–8 compare them and address enterprise application. Section 9 introduces the quantum horizon. If you are short on time, read Sections 2, 6, and 9 carefully — they contain the framing and the forward-looking material most relevant to enterprise decisions.
01 Learning objectives
By the end of this lesson you should be able to:
Lesson objectives
- Explain public-key cryptography and why it solves the key distribution problem.
- Describe the mathematical assumptions underlying RSA, elliptic-curve cryptography, and Diffie–Hellman.
- Compare RSA, ECC, and Diffie–Hellman in terms of performance, key length, and appropriate use.
- Explain hybrid cryptography and why real-world systems combine symmetric and asymmetric approaches.
- Evaluate asymmetric algorithms against enterprise requirements.
- Assess the implications of quantum computing for current asymmetric cryptographic deployments.
These objectives contribute to Unit 2 outcome U2.1 (cryptographic principles), and to Module 1 outcomes M1.9 and M1.10. See the Unit 2 learning outcomes page for the full mapping.
02 The key distribution problem
Symmetric cryptography, as Lesson 2.2 established, requires both parties to possess the same secret key. This creates a problem that has no obvious solution within the symmetric framework itself.
Why symmetric key distribution is hard
Consider two parties who wish to communicate securely using symmetric encryption. They must first establish a shared secret key. The channel through which they exchange that key must itself be secure — otherwise an attacker who intercepts the key can decrypt all subsequent communication. But the secure channel that would be needed to exchange the key is exactly what they are trying to establish.
This is the circularity at the heart of symmetric cryptography at scale. There are only three ways out:
- Physical key exchange. The parties meet in person and exchange keys physically. This works for a small number of parties but does not scale to thousands of users, systems, and services.
- A trusted intermediary. A central authority distributes keys to all parties. This works within an organisation but creates a single point of failure and does not extend easily across organisational boundaries.
- Asymmetric cryptography. The parties use public-key cryptography to establish a shared secret key over an untrusted channel. This is the approach that made modern secure communication possible.
The scale problem
The distribution problem is compounded by scale. If every pair of communicating parties needs a distinct symmetric key, an enterprise with N parties needs approximately N²/2 keys. The table below shows how quickly this becomes unmanageable.
| Parties | Pairwise keys required | Practical viability |
|---|---|---|
| 10 | 45 | Manageable manually |
| 100 | 4,950 | Requires central management |
| 1,000 | 499,500 | Requires automated key management |
| 10,000 | ~50 million | Impractical without asymmetric cryptography |
| 100,000 | ~5 billion | Not feasible |
Even with a trusted key distribution centre, managing pairwise keys at this scale is operationally complex and creates a central point of compromise. Asymmetric cryptography sidesteps the problem entirely by eliminating the need for pairwise shared secrets.
The essential insight
The insight at the heart of asymmetric cryptography is that encryption and decryption need not use the same key. If the key used to encrypt can be made public, then no secure channel is needed to distribute it. This is what makes asymmetric cryptography transformative — not the encryption itself, but the elimination of the key distribution problem.
03 Public-key cryptography
Public-key cryptography uses a pair of mathematically related keys instead of a single shared key. The relationship between the two keys is asymmetric — knowledge of one does not readily yield knowledge of the other — which is what gives the approach its name.
The key pair
Public key
- Can be distributed freely to anyone.
- Used to encrypt data that only the private key holder can decrypt.
- Used to verify signatures produced by the private key.
- Not secret — its publication is essential to the scheme's usefulness.
Private key
- Must be kept secret by its owner.
- Used to decrypt data encrypted with the corresponding public key.
- Used to produce digital signatures.
- Compromise of the private key undermines the security of the whole pair.
Mathematical relationship
- The two keys are related by a mathematical function that is easy to compute in one direction but infeasible to reverse.
- The relationship is what makes the pair work; the difficulty of reversing it is what makes the pair secure.
- Different algorithms rely on different mathematical problems (factorisation, discrete logarithms, elliptic curves).
Two operations: encryption and signing
Public-key cryptography supports two distinct operations, which use the keys in opposite directions:
| Operation | Sender uses | Recipient uses | Provides |
|---|---|---|---|
| Encryption | Recipient's public key | Recipient's private key | Confidentiality |
| Signing | Sender's private key | Sender's public key | Authenticity, integrity, non-repudiation |
The distinction matters. Encryption uses the recipient's keys — the sender encrypts with the recipient's public key so that only the recipient can decrypt. Signing uses the sender's keys — the sender signs with their own private key so that anyone holding the sender's public key can verify. Confusing the two is a common conceptual error and, in implementation, a serious vulnerability.
The mathematical foundation: trapdoor functions
Public-key cryptography relies on trapdoor functions — mathematical functions that are easy to compute in one direction but infeasible to reverse without additional information (the "trapdoor"). For example, multiplying two large prime numbers is easy; factoring the product back into the two primes is hard. This asymmetry is what allows a public key to reveal enough information to encrypt but not enough to decrypt.
The difficulty of the underlying mathematical problem determines the security of the algorithm. When that problem becomes tractable — through mathematical advance, computing power, or a new class of algorithm — the cryptographic algorithm built on it becomes insecure. This is precisely the situation that quantum computing threatens (Section 9).
The most useful mental model
Think of the public key as a padlock that anyone can snap shut, and the private key as the only key that can open it. Anyone can lock a message in the box using the padlock; only the private key holder can open it. For signing, the direction reverses: the sender uses their private key to "unlock" a value that anyone with the corresponding public key can verify.
04 RSA
Overview
RSA is the oldest and most widely deployed public-key algorithm. Published in 1977 by Rivest, Shamir, and Adleman, it is based on the mathematical difficulty of factoring the product of two large prime numbers. RSA supports both encryption and digital signatures.
Design and history
RSA was the first publicly available public-key cryptosystem. Its publication in 1977 made the concept of public-key cryptography practical, and RSA became the foundation of early secure communication on the internet. It remains in widespread use nearly five decades later, though its role has shifted as more efficient alternatives have emerged.
RSA's security rests on the integer factorisation problem: given a large number that is the product of two primes, finding those primes is computationally infeasible for sufficiently large numbers. RSA keys are generated by selecting two large primes, computing their product (part of the public key), and deriving the private key from knowledge of the primes. An attacker who could factor the public modulus could derive the private key.
Key lengths
RSA key lengths are measured in bits and are much longer than symmetric key lengths for equivalent security. The following table shows current guidance:
| Key length | Status | Notes |
|---|---|---|
| 512 bits | Broken | Factored in 1999; no longer used |
| 1024 bits | Deprecated | No longer considered adequate; migration required |
| 2048 bits | Minimum acceptable | Common baseline for enterprise use; widely supported |
| 3072 bits | Recommended | Provides security margin comparable to AES-128 for the foreseeable future |
| 4096 bits | High assurance | Used for long-lived keys and high-value applications |
2048-bit RSA is the minimum acceptable key length in current practice, but guidance increasingly recommends 3072 bits or larger for new deployments. The difference in performance between 2048 and 3072 is modest; the difference in security margin is meaningful, particularly for long-lived keys.
Strengths of RSA
- Maturity. RSA has been extensively analysed for nearly five decades. Its security properties are well understood.
- Universal support. RSA is implemented in every modern cryptographic library, operating system, and protocol. Compatibility is rarely an issue.
- Dual use. RSA supports both encryption and digital signatures with the same key pair — a flexibility that has contributed to its widespread deployment.
- Well-understood security assumptions. The factorisation problem is a well-studied mathematical problem; its difficulty is understood.
Weaknesses of RSA
- Large key sizes. RSA requires much longer keys than elliptic-curve cryptography for equivalent security, resulting in larger certificates, more bandwidth, and greater storage requirements.
- Slow performance. RSA operations are computationally expensive, particularly decryption and signing. This limits its use to key exchange and signatures rather than bulk data.
- Implementation pitfalls. RSA is vulnerable to specific implementation errors — improper padding, insufficient randomness in key generation, and side-channel attacks — that have produced real vulnerabilities.
- Quantum vulnerability. RSA is broken by Shor's algorithm running on a sufficiently powerful quantum computer. This is the most significant long-term concern.
Common RSA pitfalls
- Weak padding. RSA without proper padding — or with the obsolete PKCS#1 v1.5 padding — is vulnerable to a range of attacks. Modern implementations should use OAEP for encryption and PSS for signatures.
- Small key lengths. RSA keys below 2048 bits should be considered compromised. Some legacy systems still use 1024-bit keys.
- Shared prime factors. Keys generated with insufficient randomness may share prime factors with other keys, allowing an attacker who collects many public keys to factor some of them.
- Side-channel attacks. RSA implementations that leak information through timing or power consumption can be attacked even when the algorithm itself is sound.
When to use RSA
RSA remains appropriate for digital signatures and key exchange where compatibility is the primary concern, and where key lengths of 2048 bits or larger are used with modern padding. For new deployments where performance and key size matter, elliptic-curve cryptography is generally preferable.
05 Elliptic-Curve Cryptography (ECC)
Overview
Elliptic-curve cryptography is a family of public-key algorithms based on the mathematical properties of elliptic curves over finite fields. ECC provides the same security as RSA with substantially smaller keys and better performance, and is increasingly the preferred choice for new deployments.
Design and history
The use of elliptic curves in cryptography was independently proposed by Neal Koblitz and Victor Miller in 1985. ECC's security rests on the elliptic-curve discrete logarithm problem — determining the scalar multiple of a point on an elliptic curve given the curve and the result. This problem is believed to be substantially harder than the integer factorisation problem on which RSA is based, which is why ECC achieves equivalent security with much smaller keys.
ECC's adoption was initially slow, in part because the mathematics is more complex and in part because RSA was already entrenched. Over the past two decades, however, ECC has become increasingly common — particularly on constrained devices, in mobile applications, and in modern protocols. TLS 1.3, for example, favours ECC over RSA in its recommended cipher suites.
Key lengths
The key-size advantage of ECC is substantial. The table below compares equivalent security levels:
| Symmetric equivalent | RSA key length | ECC key length | Ratio |
|---|---|---|---|
| 80 bits (legacy) | 1024 bits | 160 bits | ~6× |
| 112 bits | 2048 bits | 224 bits | ~9× |
| 128 bits | 3072 bits | 256 bits | ~12× |
| 192 bits | 7680 bits | 384 bits | ~20× |
| 256 bits | 15360 bits | 512 bits | ~30× |
A 256-bit ECC key provides security equivalent to a 3072-bit RSA key — a difference that matters significantly for performance, certificate size, and storage. This is why ECC is increasingly preferred for new deployments, particularly in bandwidth-constrained or storage-constrained environments.
Common elliptic curves
Unlike RSA, which has a single underlying algorithm, ECC is a family of algorithms defined over a choice of curves. The curves matter: not all curves are equally secure, and some have been suspected of harbouring weaknesses. The following curves are widely used:
NIST P-256
Also known as secp256r1 or prime256v1. Widely supported; used in TLS, SSH, and many enterprise systems. 256-bit curve providing roughly 128-bit security.
NIST P-384
Also known as secp384r1. Higher-security variant of P-256, providing roughly 192-bit security. Used where additional margin is desired.
Curve25519
Designed by Daniel J. Bernstein. Widely regarded as one of the most secure and efficient curves. Used in modern protocols including Signal, WireGuard, and TLS 1.3.
Curve448
Higher-security variant of Curve25519. Less widely deployed but increasingly supported in modern cryptographic libraries.
The choice of curve matters for cryptographic assurance. Curves published by NIST have been subjected to significant scrutiny; some have been suspected of containing weaknesses known to the designers (though no practical attacks have been demonstrated against the recommended curves). Curves such as Curve25519, designed without government involvement, are often preferred where independence from such concerns is important.
Strengths of ECC
- Smaller keys. Equivalent security with substantially smaller keys, reducing bandwidth, storage, and certificate size.
- Better performance. ECC operations are generally faster than RSA operations of equivalent security, particularly for signing and key agreement.
- Suited to constrained environments. Smaller keys and lower computational requirements make ECC well-suited to mobile devices, IoT devices, and embedded systems.
- Modern protocol preference. TLS 1.3 and modern cryptographic libraries favour ECC for key exchange and signatures.
Weaknesses of ECC
- More complex mathematics. ECC is harder to understand than RSA, which means implementation errors can be subtler and harder to detect.
- Implementation pitfalls. ECC implementations are vulnerable to specific attacks — invalid curve attacks, side-channel attacks, weak randomness in key generation — that have produced real vulnerabilities.
- Curve choice matters. Not all elliptic curves are equally secure. Some curves (notably certain binary-field curves) have been deprecated or are no longer recommended.
- Quantum vulnerability. Like RSA, ECC is broken by Shor's algorithm on a sufficiently powerful quantum computer.
When to use ECC
ECC is generally preferable to RSA for new deployments where performance, key size, or constrained environments matter. Modern guidance increasingly recommends ECC — particularly Curve25519 or P-256 — for TLS, SSH, and other protocols. RSA remains appropriate where compatibility with legacy systems is required.
06 Diffie–Hellman key exchange
Overview
Diffie–Hellman is a key agreement protocol that allows two parties to establish a shared secret key over an untrusted channel, without ever transmitting the key itself. It was the first publicly disclosed public-key algorithm and remains fundamental to secure communication protocols.
Design and history
Diffie–Hellman was published in 1976 by Whitfield Diffie and Martin Hellman, a year before RSA. It was the first public demonstration that two parties could establish a shared secret over an untrusted channel without prior contact — an idea that had previously been considered impossible. Its publication launched the modern era of public-key cryptography.
Diffie–Hellman is a key agreement protocol rather than a general encryption algorithm. It does not encrypt data; it establishes a shared secret key that can then be used for symmetric encryption. Its security rests on the discrete logarithm problem — determining the exponent given the base and the result.
How it works (conceptually)
The protocol works as follows. Two parties, Alice and Bob, agree on public parameters. Each selects a private value and computes a public value from it. They exchange public values. Each then combines their own private value with the other party's public value to compute a shared secret. Because of the mathematical properties involved, both parties arrive at the same shared secret, which an eavesdropper cannot compute from the public values alone.
The protocol is elegant because it requires no prior shared secret and no trusted third party. Both parties can be certain that the shared secret is known only to them (subject to authentication, discussed below) — a property that would have seemed magical to earlier cryptographers.
Variants
- Classical Diffie–Hellman. Uses modular exponentiation over finite fields. Requires relatively large keys for adequate security.
- Elliptic-Curve Diffie–Hellman (ECDH). Uses elliptic-curve mathematics. Provides equivalent security with much smaller keys and better performance. Increasingly the default choice.
- Ephemeral Diffie–Hellman (DHE, ECDHE). Generates a fresh key pair for each session, providing forward secrecy — the property that compromise of a long-term key does not compromise past sessions. ECDHE is the standard for modern TLS.
The authentication problem
Diffie–Hellman by itself does not authenticate the parties. An attacker who can intercept the exchange can establish separate shared secrets with each party, then relay messages between them — a man-in-the-middle attack. Each party believes they are communicating with the other, but both are communicating with the attacker.
This weakness is addressed by combining Diffie–Hellman with authentication. In TLS, for example, the server authenticates using a digital signature (based on RSA or ECDSA), proving its identity to the client. The Diffie–Hellman exchange then establishes the session key, with the assurance that the client is genuinely communicating with the authenticated server.
This combination — key agreement plus authentication — is the standard pattern in modern secure protocols. Diffie–Hellman alone is insufficient; Diffie–Hellman with authentication is the basis of secure communication.
Forward secrecy
A particularly valuable property of ephemeral Diffie–Hellman is forward secrecy. Because a fresh key pair is generated for each session and discarded afterward, compromise of a long-term private key does not allow an attacker to decrypt past sessions. The attacker would need to have recorded the session and then compromise the ephemeral key, which has already been discarded.
Forward secrecy is now considered essential for enterprise systems that handle sensitive data. Without it, compromise of a server's private key retroactively compromises all past communication — a catastrophic outcome in a breach. Modern protocol configurations (TLS 1.3, for example) require forward secrecy by default.
The authentication requirement
Diffie–Hellman without authentication is vulnerable to man-in-the-middle attack. In practice, every deployment of Diffie–Hellman should be paired with an authentication mechanism — digital signatures, pre-shared keys, or certificate-based verification. Failure to do so undermines the security of the protocol entirely, regardless of the mathematical strength of the underlying problem.
07 Comparing asymmetric algorithms
RSA, elliptic-curve cryptography, and Diffie–Hellman are not alternatives in the sense that one replaces the other. They serve overlapping but distinct purposes, and the choice among them depends on the operation required, the performance constraints of the environment, and the compatibility requirements of the system.
| Dimension | RSA | ECC | Diffie–Hellman |
|---|---|---|---|
| Primary use | Encryption and digital signatures | Digital signatures and key agreement (ECDH) | Key agreement only |
| Mathematical basis | Integer factorisation | Elliptic-curve discrete logarithm | Discrete logarithm (classical or elliptic-curve) |
| Equivalent key sizes | 2048–4096 bits for enterprise use | 224–512 bits for equivalent security | Dependent on variant (large for classical, small for ECDH) |
| Performance | Slower | Faster | Fast (especially ECDH) |
| Maturity | Very high — nearly five decades | High — three decades; widely adopted | Very high — the oldest public-key scheme |
| Forward secrecy support | Not directly (requires ephemeral variant) | Yes (via ECDHE) | Yes (via DHE or ECDHE) |
| Quantum vulnerability | Broken by Shor's algorithm | Broken by Shor's algorithm | Broken by Shor's algorithm |
| Typical enterprise use | Legacy TLS, code signing, certificate signatures where compatibility requires | Modern TLS, SSH, code signing, mobile and IoT | TLS key agreement (as ECDHE), SSH, VPNs |
Selection guidance
The following guidance reflects current best practice:
- For key agreement: Use ECDHE (ephemeral elliptic-curve Diffie–Hellman) where supported. It provides forward secrecy, is efficient, and is the standard choice in TLS 1.3.
- For digital signatures: Use ECDSA with a modern curve (P-256, P-384, or Curve25519) where supported. RSA with PSS padding and key lengths of 3072 bits or larger remains acceptable for compatibility.
- For encryption of bulk data: Do not use asymmetric cryptography directly. Use symmetric encryption (AES) with keys established via asymmetric key agreement.
- For certificates: ECDSA certificates are smaller and faster; RSA certificates remain more widely supported in legacy systems. The choice depends on the ecosystem.
- For constrained environments: ECC is strongly preferred due to its smaller key sizes and lower computational requirements.
- For long-lived keys: Consider the quantum implications (Section 9) and plan for migration.
What to avoid
- RSA below 2048 bits. Deprecated; migration to larger keys or to ECC is required.
- RSA without modern padding. PKCS#1 v1.5 padding for encryption is deprecated; use OAEP. PKCS#1 v1.5 for signatures is deprecated; use PSS.
- Elliptic curves not recommended by standards bodies. Some curves have been deprecated; use P-256, P-384, or Curve25519.
- Diffie–Hellman without authentication. Vulnerable to man-in-the-middle attack; always pair with authentication.
- Non-ephemeral key agreement. Does not provide forward secrecy; use ephemeral variants.
The practical default
For most new enterprise deployments, the modern default is: ECDHE for key agreement (with ECDSA or RSA signatures for authentication), and AES-GCM for symmetric encryption. This combination provides strong security, forward secrecy, and good performance, and is what TLS 1.3 negotiates by default.
08 Hybrid cryptography
Asymmetric cryptography is slow — orders of magnitude slower than symmetric cryptography. It is also mathematically limited: an RSA key of 2048 bits cannot directly encrypt a message longer than 245 bytes. This is why real-world cryptographic systems do not use asymmetric cryptography to protect bulk data. Instead, they combine asymmetric and symmetric cryptography in a hybrid scheme.
The hybrid pattern
- Establish trust Parties authenticate each other using digital signatures or certificates. The server proves its identity to the client (or vice versa).
- Negotiate a shared secret Using Diffie–Hellman (typically ECDHE) or by transporting a symmetric key encrypted with a public key, the parties establish a shared secret that only they know.
- Derive symmetric keys From the shared secret, the parties derive symmetric keys for encryption and integrity using a key-derivation function.
- Protect the data with symmetric cryptography All subsequent data is protected using symmetric encryption (typically AES-GCM), exploiting its speed and efficiency.
This is exactly the pattern used by TLS, SSH, IPsec, and almost every other secure protocol. When you see "encryption" in an enterprise context, the underlying mechanism is almost always hybrid.
Why the hybrid approach works
The hybrid approach exploits the strengths of each family:
- Asymmetric cryptography solves the key distribution problem. Parties can establish a shared secret without prior contact or a secure channel.
- Symmetric cryptography handles the volume. Once a shared secret is established, symmetric encryption protects the actual data with the speed and efficiency the workload requires.
- Forward secrecy is provided by ephemeral key agreement. Because the session key is generated freshly and discarded, past sessions remain secure even if long-term keys are later compromised.
An example: TLS 1.3
A TLS 1.3 handshake illustrates the hybrid pattern in a modern protocol:
- The client sends a ClientHello with supported cipher suites and a key share for Diffie–Hellman.
- The server responds with its ServerHello, its own key share, and its certificate.
- The client verifies the server's certificate against trusted authorities, authenticating the server.
- Both parties compute the shared secret from their key shares using ECDHE.
- Session keys are derived from the shared secret and used for symmetric encryption of application data.
- The server signs the handshake transcript, proving possession of the private key corresponding to its certificate.
The result is a secure channel in which the parties have authenticated each other, established a shared secret through ephemeral key agreement, and are protecting data with symmetric cryptography. Every modern secure connection works this way in essence.
Why this matters for assessment
When assessing an enterprise's cryptography, you rarely encounter asymmetric cryptography in isolation. The relevant questions are about the whole hybrid system: is key agreement using a modern protocol (ECDHE)? Is the certificate chain validated properly? Is symmetric encryption configured correctly (AES-GCM)? Is forward secrecy provided? These questions are more useful than any question about which algorithm is used in isolation.
09 Asymmetric cryptography in the enterprise
Asymmetric cryptography is present in almost every enterprise system, though it rarely appears directly to users. The following table shows where it is found and what it provides.
| Domain | Typical asymmetric mechanisms | Provides |
|---|---|---|
| Web and API security | TLS with ECDHE key agreement and ECDSA or RSA certificate signatures | Confidentiality, integrity, authenticity, forward secrecy |
| Identity and authentication | Certificate-based authentication, SAML/OIDC signed assertions, FIDO2/WebAuthn credentials | Authenticity, non-repudiation |
| Code and software integrity | Code signing, package signatures, secure boot attestation | Integrity, authenticity |
| Email security | S/MIME signatures, DKIM domain signatures, PGP (where used) | Integrity, authenticity, non-repudiation |
| VPN and network access | IPsec with ECDH, certificate-based VPN authentication | Confidentiality, integrity, authenticity |
| Certificate infrastructure | Certificate authorities, intermediate CAs, OCSP responders | Trust infrastructure |
| Blockchain and distributed systems | ECDSA signatures, cryptographic hashes for consensus | Integrity, authenticity, non-repudiation |
Common enterprise patterns of weakness
- Legacy RSA key lengths. 1024-bit RSA keys still present in some systems, even though they are no longer considered adequate.
- Weak TLS configurations. Support for deprecated protocol versions (TLS 1.0, 1.1) or weak cipher suites enabling downgrade attacks.
- Certificate validation failures. Applications that accept any certificate, ignore hostname mismatches, or fail to check revocation.
- Shared or mismanaged private keys. Private keys stored in code, configuration files, or shared locations without adequate protection.
- Self-signed certificates in production. Often indicating that certificate management has been neglected.
- Missing forward secrecy. Key agreement configurations that do not use ephemeral variants, leaving past sessions exposed if long-term keys are compromised.
- Unmanaged certificate expiry. Certificates allowed to expire, causing outages, or renewed reactively rather than managed proactively.
Assessing enterprise asymmetric cryptographic posture
Useful assessment questions include:
- What key lengths are in use? Confirm RSA keys are 2048 bits or larger; preferably 3072. Confirm ECC keys use recommended curves (P-256, P-384, Curve25519).
- What protocols and versions are supported? Confirm TLS 1.2 and 1.3 only; no TLS 1.0 or 1.1. Confirm SSH uses modern configurations.
- Is forward secrecy provided? Confirm ECDHE (or DHE) is negotiated by default in TLS and SSH configurations.
- How are private keys protected? Confirm keys are stored in HSMs, key management services, or other protected storage — not in code, configuration, or shared locations.
- How are certificates managed? Confirm inventory, monitoring for expiry, and process for renewal. Confirm certificate validation is enforced by applications.
- Is there a cryptographic inventory? Can the enterprise enumerate the asymmetric keys and certificates it relies on, who owns them, and what they protect?
- Is there cryptographic agility? Can the enterprise migrate to new algorithms and key lengths when needed without redesign?
Worked example — assessing a mid-sized enterprise's TLS configuration
A mid-sized enterprise operates a public web application and internal APIs used by its partners. An assessment of its TLS configuration reveals the following:
- Protocol versions: TLS 1.2 and 1.3 supported; TLS 1.0 and 1.1 disabled. Acceptable.
- Key agreement: ECDHE negotiated by default; forward secrecy provided. Acceptable.
- Cipher suites: Includes some deprecated cipher suites (3DES, RC4) enabled for compatibility with legacy clients. Weak — these should be disabled unless specific client requirements mandate otherwise.
- Certificates: RSA-2048 server certificates issued by a commercial CA. Acceptable, though migration to ECDSA certificates would provide better performance.
- Private keys: Stored on web server filesystems with file-level permissions. Weak — should be protected in an HSM or equivalent.
- Certificate validation (client side): The enterprise's applications correctly validate server certificates, including hostname and chain validation. Acceptable.
- Internal APIs: Some internal services use self-signed certificates and disable validation in client libraries to avoid certificate management. Weak — this pattern undermines TLS security and should be remediated.
The assessment reveals a mixed picture: strong configuration in some areas, weaknesses driven by compatibility and convenience in others. The characteristic enterprise pattern.
10 The quantum horizon
RSA and elliptic-curve cryptography rest on mathematical problems that are believed to be computationally infeasible to solve with classical computers. Quantum computing changes that assumption — and the implications for enterprise cryptography are significant.
Shor's algorithm
In 1994, mathematician Peter Shor published an algorithm for quantum computers that solves both integer factorisation and discrete logarithms in polynomial time. This means that a sufficiently powerful quantum computer running Shor's algorithm would break RSA and elliptic-curve cryptography entirely — not merely weaken them, but render them unusable.
The practical significance of this depends on whether and when such quantum computers will exist. Current quantum computers are far from the scale required to break real-world cryptographic keys. Estimates of the timeline vary widely, from a decade to several decades, and are the subject of ongoing debate. But the direction of travel is clear: current asymmetric cryptography has a finite lifetime.
Grover's algorithm
A related algorithm, published by Lov Grover in 1996, provides a quadratic speedup for unstructured search problems. Its effect on symmetric cryptography is to halve the effective key length: a 128-bit symmetric key provides only 64 bits of security against a quantum adversary using Grover's algorithm.
The consequence for symmetric cryptography is more manageable than for asymmetric. Doubling key lengths restores security: AES-256 provides adequate margin against Grover's algorithm, as does SHA-384 or SHA-512 for hashing. Symmetric cryptography is quantum-vulnerable but not quantum-broken.
| Primitive | Quantum impact | Countermeasure |
|---|---|---|
| RSA | Broken by Shor's algorithm | Migration to post-quantum cryptography |
| Elliptic-curve cryptography | Broken by Shor's algorithm | Migration to post-quantum cryptography |
| Diffie–Hellman | Broken by Shor's algorithm | Migration to post-quantum key agreement |
| AES-128 | Effective security halved (to 64 bits) by Grover's algorithm | Use AES-256 |
| AES-256 | Effective security halved (to 128 bits); still adequate | None needed at present |
| SHA-256 | Effective security reduced by Grover's algorithm | Use SHA-384 or SHA-512 where long-term security is required |
Post-quantum cryptography
Post-quantum cryptography (sometimes called quantum-resistant or quantum-safe cryptography) refers to cryptographic algorithms believed to be resistant to attack by both classical and quantum computers. These algorithms are based on mathematical problems that are not known to be solvable by quantum algorithms — lattice problems, hash-based constructions, code-based cryptography, and multivariate polynomial systems.
In 2022 and 2023, NIST announced the first standards-track selections for post-quantum cryptography, including CRYSTALS-Kyber for key encapsulation and CRYSTALS-Dilithium, Falcon, and SPHINCS+ for digital signatures. These algorithms are expected to become the basis for future cryptographic standards, and implementations are becoming available in major cryptographic libraries.
The "harvest now, decrypt later" threat
A particularly important consideration is that adversaries can record encrypted traffic today and decrypt it once quantum computers become available. This is known as the harvest now, decrypt later threat. For data with long confidentiality requirements — classified information, personal data with decades of sensitivity, intellectual property — the quantum threat is not merely future; it is potentially already present.
The implication for enterprises is that migration to post-quantum cryptography should be planned rather than deferred. The migration will take years, and enterprises that begin planning now will be better positioned than those that wait. The governance implications are examined in Module 3, Lesson 6.10.
What enterprises should do now
- Inventory cryptographic dependencies. Identify where RSA and ECC are used, and what would need to change in a migration. This is the foundation of any post-quantum plan.
- Prioritise cryptographic agility. Ensure systems can migrate to new algorithms without redesign. Systems with hard-coded algorithms will be difficult and expensive to migrate.
- Use strong symmetric cryptography. AES-256 provides quantum resistance with adequate margin; AES-128 does not. Where symmetric key lengths are being chosen today, AES-256 should be preferred for long-lived data.
- Extend key lengths for asymmetric cryptography where possible. Larger RSA keys and larger elliptic-curve keys provide no protection against Shor's algorithm, but they do provide additional margin against classical attack and extend the window before migration becomes urgent.
- Track post-quantum standards. NIST and other standards bodies are publishing post-quantum algorithms. Enterprises should be aware of the emerging standards and plan for their adoption.
- Plan for migration. Post-quantum migration is a multi-year effort. Enterprises that begin planning now will be better positioned.
The most important takeaway
The quantum threat is not imminent, but it is real and it is directionally certain. RSA and ECC have a finite lifetime. The most useful action an enterprise can take today is to build cryptographic agility and inventory — the prerequisites for any future migration — rather than to defer the question until the threat is closer.
11 Key concepts
The terms below are used throughout the course. Capture them in your own words as you work through the lesson.
- Asymmetric cryptography
- Cryptography using a mathematically related key pair — a public key that can be distributed openly and a private key that is kept secret. Solves the key distribution problem that limits symmetric cryptography.
- Public key / private key
- A mathematically related pair used in asymmetric cryptography. The public key can be shared openly; the private key must remain secret. Data encrypted with the public key can only be decrypted with the private key, and vice versa.
- Key distribution problem
- The challenge of securely delivering shared symmetric keys to parties who need them, without a pre-existing secure channel. Asymmetric cryptography solves this problem by eliminating the need for pairwise shared secrets.
- Trapdoor function
- A mathematical function that is easy to compute in one direction but infeasible to reverse without additional information. Underlies all public-key cryptography.
- RSA
- The oldest and most widely deployed public-key algorithm, published in 1977. Security based on the integer factorisation problem. Supports encryption and digital signatures. Key lengths of 2048 bits or larger; preferably 3072.
- Elliptic-curve cryptography (ECC)
- A family of public-key algorithms based on the elliptic-curve discrete logarithm problem. Provides equivalent security to RSA with substantially smaller keys and better performance.
- ECDSA
- Elliptic-Curve Digital Signature Algorithm. A digital signature scheme based on elliptic-curve cryptography. Widely used in TLS, SSH, and code signing.
- Diffie–Hellman key exchange
- A key agreement protocol published in 1976 that allows two parties to establish a shared secret over an untrusted channel. The first publicly disclosed public-key algorithm.
- ECDH / ECDHE
- Elliptic-Curve Diffie–Hellman. The elliptic-curve variant of Diffie–Hellman key agreement. ECDHE (the ephemeral variant) provides forward secrecy and is the standard for modern TLS.
- Forward secrecy
- The property that compromise of a long-term private key does not allow decryption of past sessions. Provided by ephemeral key agreement (ECDHE or DHE). Considered essential for modern secure communication.
- Man-in-the-middle attack
- An attack in which an adversary intercepts communication between two parties and relays messages between them, convincing each that they are communicating directly with the other. Diffie–Hellman without authentication is vulnerable; combining key agreement with authentication prevents the attack.
- Hybrid cryptography
- The combination of asymmetric and symmetric cryptography used by modern secure protocols: asymmetric for authentication and key agreement, symmetric for bulk data protection.
- Certificate
- A digitally signed statement binding a public key to an identity. Issued by a certificate authority; used to establish trust in public-key infrastructure. Examined in detail in Lesson 2.4.
- Post-quantum cryptography
- Cryptographic algorithms believed to be resistant to attack by both classical and quantum computers. Based on mathematical problems not known to be solvable by quantum algorithms. Standards-track algorithms are emerging (CRYSTALS-Kyber, CRYSTALS-Dilithium, and others).
- Shor's algorithm
- A quantum algorithm that solves integer factorisation and discrete logarithms in polynomial time. Breaks RSA, elliptic-curve cryptography, and Diffie–Hellman on a sufficiently powerful quantum computer.
- Grover's algorithm
- A quantum algorithm providing quadratic speedup for unstructured search. Halves the effective key length of symmetric cryptography. Countered by doubling key lengths (AES-256).
- Harvest now, decrypt later
- A threat model in which an adversary records encrypted traffic today and decrypts it once quantum computers become available. Justifies planning for post-quantum migration now rather than waiting.
12 Activities
The activities below help you test your understanding and prepare for the unit discussion and Assignment 1. They are not graded, but completing them will improve the quality of your forum contribution.
Activity 1 — Asymmetric cryptography survey
For an enterprise context you know well, identify three places where asymmetric cryptography is used — for example, TLS, code signing, or certificate-based authentication. For each, determine:
- which algorithm is used (RSA, ECDSA, or another);
- which key length is used;
- whether forward secrecy is provided;
- where the private keys are stored and how they are protected;
- how certificates are managed (inventory, expiry monitoring, renewal).
Reflect on the results: which areas are strong, which are weak, and where would migration to post-quantum cryptography be most challenging.
Activity 2 — RSA versus ECC comparison
Write a short comparison (300–400 words) of RSA and elliptic-curve cryptography, addressing:
- the mathematical bases of each;
- the equivalent security levels and key-size ratios;
- performance differences and their practical implications;
- appropriate use cases for each;
- the circumstances in which you would choose one over the other;
- what each means for cryptographic agility and post-quantum migration.
Support your analysis with reference to the lesson material and to published guidance (NIST, ENISA, or equivalent).
Activity 3 — Preparing for Forum 2
Forum 2 includes discussion of Zero Trust adoption, MFA effectiveness, and IAM challenges. Asymmetric cryptography is central to all of these topics: MFA tokens rely on cryptographic mechanisms, federated identity uses signed assertions, and Zero Trust architectures depend on cryptographic guarantees of device and identity trust.
Review the Forum 2 prompts and note where the material from this lesson — particularly around hybrid cryptography, forward secrecy, and the authentication requirement for key agreement — will strengthen your analysis.
13 Self-check
Answer the questions below before moving to Lesson 2.4. If you cannot answer a question confidently, revisit the corresponding section.
Reveal answer
B. The key advantage of asymmetric cryptography is that it solves the key distribution problem — the public key can be shared openly, so no secure channel is needed to distribute it. A is false (asymmetric is slower). C is not quite right (symmetric key exchange is possible with a trusted intermediary, but does not scale). D inverts the reason.
Reveal answer
B. Diffie–Hellman is a key agreement protocol — it establishes a shared secret but does not encrypt or sign directly. RSA supports both encryption and digital signatures. C describes only one variant of Diffie–Hellman (ECDH); classical DH uses discrete logarithms over finite fields. D is false — both are vulnerable to Shor's algorithm.
Reveal answer
B. Without authentication, Diffie–Hellman is vulnerable to man-in-the-middle attack: an attacker can establish separate shared secrets with each party and relay messages between them. C is incorrect — Diffie–Hellman can provide forward secrecy (in ephemeral variants). D is false — the absence of a trusted third party is one of Diffie–Hellman's strengths.
Reveal answer
B. The hybrid approach exploits the strengths of both families: asymmetric cryptography for authentication and key agreement, symmetric cryptography for bulk data. C is true but incomplete — it captures one limitation of asymmetric cryptography but not the full reason for the hybrid approach. A and D are not the primary reasons.
Reveal answer
B. Shor's algorithm breaks RSA, elliptic-curve cryptography, and Diffie–Hellman on a sufficiently powerful quantum computer, requiring migration to post-quantum algorithms. A is incorrect — symmetric cryptography is quantum-vulnerable but not quantum-broken (AES-256 provides adequate margin). C overstates the case — the timeline is uncertain and key lengths affect the difficulty. D is false.
14 Summary
This lesson has examined asymmetric cryptography — the technology that made modern enterprise trust infrastructure possible. The essential points are:
- Asymmetric cryptography solves the key distribution problem. By using a key pair — a public key that can be shared openly and a private key that is kept secret — it eliminates the need for a secure channel to distribute keys.
- Public-key cryptography supports two distinct operations. Encryption uses the recipient's keys to protect confidentiality; signing uses the sender's keys to provide authenticity, integrity, and non-repudiation. Confusing the two is a serious error.
- RSA is the oldest and most widely deployed asymmetric algorithm. Based on integer factorisation. Key lengths of 2048 bits minimum; 3072 bits or larger recommended. Both encryption and signatures. Slower and larger keys than ECC.
- Elliptic-curve cryptography provides equivalent security with much smaller keys. A 256-bit ECC key matches a 3072-bit RSA key. Better performance, smaller certificates, suited to constrained environments. Increasingly the preferred choice for new deployments.
- Diffie–Hellman is a key agreement protocol, not an encryption or signature scheme. It allows two parties to establish a shared secret over an untrusted channel. Ephemeral variants (DHE, ECDHE) provide forward secrecy. Requires authentication to prevent man-in-the-middle attacks.
- Hybrid cryptography is the standard in practice. Modern secure protocols combine asymmetric cryptography (for authentication and key agreement) with symmetric cryptography (for bulk data protection). Forward secrecy is provided by ephemeral key agreement.
- Enterprise assessment focuses on configuration, not algorithm choice. Key lengths, protocol versions, forward secrecy, private key protection, and certificate management matter more than which algorithm is used.
- The quantum horizon is real. RSA, ECC, and Diffie–Hellman are broken by Shor's algorithm on a sufficiently powerful quantum computer. Migration to post-quantum cryptography is inevitable. The most useful actions today are to build cryptographic agility, inventory dependencies, and plan for migration.
These ideas prepare for Lesson 2.4, which examines digital signatures and public key infrastructure — where the cryptographic primitives introduced here are assembled into the trust infrastructure on which enterprise identity and secure communication depend.
Before moving on
Make sure you can explain the key distribution problem, distinguish encryption from signing in public-key cryptography, compare RSA with ECC, explain what forward secrecy is and why it matters, and describe the quantum threat and its implications. If you cannot yet do all five, revisit Sections 2, 6, and 9.
Next lesson
Lesson 2.4 — Digital Signatures and PKI examines the trust infrastructure that makes public-key cryptography practical at enterprise scale: certificates, certificate authorities, and trust models.