[KongchangAI]
· 3 min read· 1,546 words

Where Is RSA Hiding in Your Code? A Practical Migration Guide

Where Is RSA Hiding in Your Code? A Practical Migration Guide

RSA isn't broken but should be migrated early: build a usage inventory, prioritize, and use compatibility and telemetry for a smooth decommission.

The article notes that RSA itself hasn't been broken, but the engineering rollout of post-quantum cryptography is compressing its lifecycle, making migration an architectural cleanup rather than a vulnerability response. It lays out three steps: (1) build a complete RSA usage inventory via static and dynamic audits and turn it into a classified ledger; (2) prioritize uses by exposure surface, data lifecycle, and dependency controllability; (3) run dual algorithms during the compatibility period, use telemetry to drive decommissioning, and codify scanning into CI or periodic audits. Key takeaway: the goal is post-quantum solutions, not another classical algorithm, and compatibility and observability are critical.

RSA hasn't been broken, but it is becoming an increasingly conspicuous piece of technical debt. As post-quantum cryptography moves into engineering implementation, many teams are facing a practical question: just how many places in the system still depend on RSA? Based on an engineering guide about "locating and migrating RSA," this article lays out an actionable path for auditing and migration.

Source screenshot of the RSA migration guide

Why migrating RSA is not urgent but still important

The original piece opens with a key judgment: RSA is not broken. This is not a vulnerability emergency response, but a future-oriented architectural cleanup. The RSA algorithm itself still works fine; the problem is that its lifecycle is being compressed by the advance of post-quantum cryptography (PQC).

This means the migration effort has two characteristics. First, there is no burning deadline, so teams easily put it off. Second, the migration has broad scope: once you start reactively, you often find RSA scattered across certificates, signatures, key exchange, config files, and third-party dependencies—pull one thread and the whole thing moves.

The original recommendation is clear: find it now, identify which uses need priority handling, then complete the migration without breaking clients. This is a classic "pay down the debt early" strategy—cost is controllable, and risk is controllable.

Post-quantum cryptography (PQC) refers to the family of cryptographic algorithms designed to resist attacks by quantum computers. Its urgency stems from the "harvest now, decrypt later" threat: attackers can intercept and store encrypted traffic today and decrypt it once quantum computers mature. NIST officially published the first batch of PQC standards in 2024, including ML-KEM (formerly Kyber) for key exchange and ML-DSA (formerly Dilithium) and SLH-DSA (formerly SPHINCS+) for digital signatures. This means the migration direction is no longer a theoretical discussion but an engineering task with clear standards to follow. RSA and ECC will both fail in the face of quantum computers, so the migration is not about switching to another classical algorithm but switching to an entirely new algorithm family.

Step 1: Build a complete inventory of RSA usage points

Visibility is the prerequisite for migration. The core action emphasized in the original is "find where your systems use it"—systematically locating where RSA is used across the codebase and runtime environment.

Static audit: start with code and configuration

RSA usage often doesn't appear as the conspicuous string RSA. It may hide in crypto library call parameters, in the cipher suite lists of TLS configuration, in the algorithm declarations of JWT signatures, or in the form of key file formats (such as PEM headers). A static audit needs to cover three layers: source code, configuration files, and deployment manifests.

A cipher suite is an identifier for the combination of algorithms negotiated during a TLS handshake. A single suite name specifies four types of algorithms at once: key exchange, authentication, symmetric encryption, and message authentication. For example, TLS_RSA in TLS_RSA_WITH_AES_128_CBC_SHA indicates the use of RSA for key exchange and authentication. Modern TLS 1.3 has removed static RSA key exchange, but TLS 1.2 and earlier, as well as a large number of legacy configurations, still widely use it. When auditing, you can't just search for the string RSA; you also need to recognize cipher suite abbreviations, OpenSSL configuration items (such as SSLCipherSuite), and the signature algorithm fields of the certificates themselves (such as sha256WithRSAEncryption). For JWT scenarios, check values such as RS256, RS384, and RS512 in the alg declaration.

Dynamic audit: observe runtime handshakes and signatures

Searching the code alone is not enough. The original points out that you should pay attention to the system's actual runtime behavior—for example, the algorithms negotiated in TLS handshakes and the specific implementations invoked during signing and verification. Runtime observation can catch cases where RSA is used indirectly through dependency libraries—these usage points are the hardest to find via text search.

Turn the inventory into a classified ledger

Finding the usage points is only the beginning; the original emphasizes classifying these uses. A practical dimension for categorization is: which are client-facing (migration requires a compatibility period), which are purely internal (migration can be faster), and which are on critical paths (migration requires stricter validation). This classified ledger is the basis for subsequent scheduling.

Step 2: Identify which RSA uses truly need handling

Not all RSA usage points are equally urgent. The original's phrasing is "identify the uses that need attention," implying that prioritization is required.

From an engineering practice perspective, the judgment dimensions typically include:

  • Exposure surface: Public-facing TLS endpoints and signing interfaces have the largest impact footprint, but they also most need advance planning.
  • Data lifecycle: If encrypted data must be retained long-term, the "encrypt now, decrypt later" risk is significantly higher than for short-lived data.
  • Dependency controllability: RSA calls in in-house code can be migrated independently, whereas RSA dependencies in third-party SDKs or hardware devices require waiting for vendor support.

Overlaying these three dimensions onto the ledger from step one yields a prioritized migration map. The original does not give specific technology selection recommendations, but from context, the migration direction points toward post-quantum cryptography solutions rather than simply replacing RSA with another classical algorithm.

Step 3: Migrate without breaking clients

The most pragmatic phrase in the original title is "migrate them without breaking clients." The hard part of cryptographic migration has never been the algorithm itself, but compatibility.

Dual-algorithm parallelism during the compatibility period

Clients may be spread across various versions and platforms, and you cannot require all clients to upgrade at the same moment. A viable approach is to support both old and new algorithms during the compatibility period, using negotiation mechanisms so new clients take the new path while old clients continue to work. This requires the server to have algorithm negotiation and fallback capabilities.

Algorithm negotiation and fallback are fundamental mechanisms of cryptographic migration. Taking TLS as an example, the client lists the algorithms and suites it supports in the ClientHello, and the server selects the best combination supported by both sides. During migration, the server needs to configure both classical algorithms and PQC algorithms so that new clients take the PQC path and old clients fall back. Hybrid key exchange is the current mainstream transitional approach: in a single handshake, both classical ECDH and the PQC ML-KEM are executed, and as long as one of them is not broken, the session is secure. Browsers such as Google Chrome have enabled the X25519MLKEM768 hybrid group by default; if the server does not support it, it will naturally fall back. This design makes migration risk controllable, but it also requires the server to have clear algorithm priority configuration and fallback observability.

Use telemetry to decide when to decommission

Parallel support is not a permanent state. You need to build observability to track how many clients are still using the RSA path. When traffic on the old path drops to an acceptable level, then decommission it. The original's emphasis on "not breaking clients" is essentially about making decommissioning decisions data-driven rather than calendar-driven.

Treat migration as an ongoing process

Cryptographic migration is not a one-off project. As standards evolve and dependencies update, new usage points may appear again. Incorporating RSA usage-point scanning into regular engineering workflows—such as CI checks or periodic audits—helps the results of this migration last longer.

Practical takeaways for engineering teams

The value of this guide is that it pulls cryptographic migration from "a security team topic" back to "an executable task for engineering teams." Here are several actions you can put into practice directly:

  1. First, do a full scan and produce an RSA usage-point inventory, even if it is imperfect.
  2. Prioritize and classify the inventory, putting externally exposed surfaces and long-cycle data at the front.
  3. When designing the migration plan, treat client compatibility and decommissioning telemetry as first-class citizens.
  4. Codify the scanning into the process so the inventory doesn't decay over time.

RSA still works, and that is precisely the best time to act—wait until it no longer works, and you will have no room for unhurried planning.

Source screenshot of the RSA migration guide

One-line Summary

RSA is not broken but should be migrated proactively: first build an inventory of usage points, then schedule by priority, and use compatibility and telemetry to ensure a smooth decommission.

Paragraph Summary

The article points out that the RSA algorithm itself has not been broken, but the engineering implementation of post-quantum cryptography is compressing its lifecycle, so migration is an architectural cleanup of "paying down debt early" rather than a vulnerability emergency. The author offers a three-step path: first, build a complete inventory of RSA usage points through static audits (source code, configuration, deployment manifests) and dynamic audits (runtime handshake and signature behavior), and organize it into a classified ledger; second, identify the uses that truly need priority handling across three dimensions—exposure surface, data lifecycle, and dependency controllability; third, during the compatibility period, run both algorithms in parallel, use telemetry data to drive decommissioning of the old path, and codify scanning into CI or periodic audit workflows. The core conclusion: the migration direction points toward post-quantum solutions rather than replacing RSA with another classical algorithm, and compatibility and observability are the keys to success.

#RSA migration#post-quantum cryptography#PQC#cryptographic migration#TLS cipher suite#JWT RS256#hybrid key exchange
Share:

Related articles