Ask a bank where it uses cryptography and the first answer is usually TLS on the websites. A fuller answer takes months to assemble, because cryptography is spread across code, libraries, settings, certificates, cloud services, pipelines, network devices and products bought from vendors. No team sees all of it.
A post-quantum migration starts with cryptographic discovery, and the resulting cryptographic inventory is only as good as its coverage. Regulators now expect one. US federal agencies have been asked to inventory their cryptographic systems every year since 2022,[2] and the UK NCSC expects discovery and a migration plan by 2028.[3] This article sets out ten levels at which cryptography hides, with examples, owners and search methods for each.
The ten levels
The levels run from the code a developer writes to the boxes a vendor ships. A given algorithm, such as RSA-2048, usually appears at several levels at once. The demo lets you explore each level and what you would look for there.
- L1Application code
KeyPairGenerator.getInstance("RSA") · generateKeyPairSync("ec") · CALL 'CSNDPKG'Source rules for 30+ languages, COBOL to Rust - L2Libraries and dependencies
openssl 1.1.1 · bcprov-jdk15on 1.70 · jsonwebtoken 9 · pycryptodomeManifests, lockfiles and SBOMs - L3Protocols and configuration
ssl_ecdh_curve · KexAlgorithms · jdk.tls.namedGroups · ike=aes256-sha2_256-modp2048TLS, SSH, VPN and middleware rules - L4Certificates and keys
sha256WithRSAEncryption 2048 · id_ecdsa · server.p12 · tls.crt in a Kubernetes secretCertificate and key parser - L5Identity and tokens
alg: RS256 · rsa-sha256 XML-DSig · rc4-hmac enctype · JWKS kty: ECIdentity and token rules - L6Data at rest
DBMS_CRYPTO.ENCRYPT_3DES · pgp_pub_encrypt · RSA-OAEP key wrapDatabase and source rules - L7Cloud keys and HSMs
AWS KMS RSA_2048 · Azure Key Vault RSA-HSM · GCP EC_SIGN_P256_SHA256Read-only cloud inventory - L8Infrastructure and pipelines
key_spec = "ECC_NIST_P256" · ELBSecurityPolicy-2016-08 · signtool sign /fd sha1Infrastructure-as-code and script rules - L9Network edge
api.bank.example:443 → X25519 only · bastion:22 → no ML-KEMLive TLS and SSH probes you aim - L10Mainframe and vendors
z/OS ICSF CSNDPKG · MQ SSLCIPH(TLS_RSA_WITH_AES_256_CBC_SHA256) · core-banking productCOBOL, PL/I, HLASM rules and vendor advisories
| Level | Typical owner | Main ways to find it |
|---|---|---|
| 1. Application code | Development teams | Source scan, code search, code review |
| 2. Libraries and dependencies | Development and platform teams | Manifest and lockfile scan, SBOMs, container images |
| 3. Protocols and configuration | Platform, middleware and network teams | Configuration scan, live endpoint probes |
| 4. Certificates and keys | PKI and security teams | Certificate and key scan, endpoint probes, CA exports |
| 5. Identity and tokens | Identity and access teams | JWKS and SAML scans, identity-provider settings |
| 6. Data at rest | Database, storage and application teams | Database and storage settings, SQL and code scan |
| 7. Cloud keys and HSMs | Cloud platform and security teams | Cloud inventories, infrastructure code, HSM vendor inventory |
| 8. Infrastructure as code and pipelines | DevOps and site reliability teams | IaC scan, pipeline and script scan |
| 9. Network edge | Network and security operations | Config scan, endpoint probes, vendor review |
| 10. Mainframe and vendors | Mainframe teams and vendor management | Exported source scan, vendor questionnaires, SBOMs |
Levels 1 to 3: code, libraries, protocols
1. Application code
Examples. A Java service that calls Signature.getInstance("SHA256withRSA"). A Python batch job that signs payment files with an RSA key. A C# service that creates an ECDsaobject. A COBOL program on a mainframe that calls ICSF for RSA key generation. Hard-coded key sizes, algorithm names in constants, and home-grown wrappers around crypto calls.
What to look for. Direct calls to crypto APIs with an algorithm name or constant, key generation, signature and verification, key agreement, and hashing with weak digests.
Who owns it. The development team that owns the repository, and for old code the application owner, who may no longer have developers.
How to find it. A scanner with source rules covers the common languages. QSC has pattern rules for more than 30 languages and formats, including COBOL, PL/I, HLASM, RPG, PL/SQL, T-SQL and ABAP. Manual methods are text search on API names, and review of the small shared "security" module that most organisations have. Scanners find API calls but do not follow data flow, so keys built through in-house wrappers can be missed, which is why a manual look at those wrappers is worth the time.[7]
2. Libraries and dependencies
Examples. Bouncy Castle in a Java service, OpenSSL linked into a C++ application, a JWT library in a Node.js API, cryptography in a Python package. The library, not your code, decides which algorithms are available and what the defaults are. Containers often bundle their own copy of OpenSSL.
What to look for. Which crypto libraries are present, at which versions, in which applications and images. The version tells you whether post-quantum algorithms are available at all.
Who owns it. Development teams for application dependencies, platform teams for base images and runtimes.
How to find it. Dependency scanning of manifests and lockfiles, which QSC covers for 12 ecosystems, plus SBOMs produced by tools such as trivy, syft or cdxgen. Container image scans catch libraries that no manifest lists. Manual methods include listing shared libraries on a host and checking runtime versions.[7]
3. Protocols and configuration
Examples. TLS settings in nginx, Apache, HAProxy, Tomcat, WebSphere or WildFly. SSH daemon settings. IPsec proposals on VPN gateways. Kafka, MQ and database connection settings. Windows Schannel registry settings.
What to look for. Allowed protocol versions, cipher suites, key-exchange groups and curves, host-key types, minimum key sizes, and any setting that is left empty so that a default applies.
Who owns it. Platform and middleware teams, and network teams for VPNs.
How to find it. Configuration scanning of the files in version control. Settings left at a product's default do not appear in files, so also probe the running service. A live probe against a host and port shows what the server actually negotiates, with no access to the file.
qsc scan --target bank.example.com:443
qsc scan --target ssh://host.example.comLevels 4 to 6: certificates, identity, data at rest
4. Certificates and keys
Examples. Server certificates for websites and APIs, an internal CA hierarchy, client certificates on devices, SSH host and user keys, code-signing keys, PGP keys, Java keystores, PKCS#12 bundles sitting in a deploy folder.
What to look for. The public-key algorithm and size of every certificate and key, the signature algorithm on each certificate, expiry dates, and who holds the private key. Test and legacy keys left in repositories are a recurring finding.
Who owns it. The PKI or security engineering team for CAs, application teams for the certificates they request, and often nobody for the forgotten ones.
How to find it. Scan repositories and file shares for PEM, DER, PKCS#12, OpenSSH and PGP material. Java keystores (.jks, .bks) are flagged for manual inspection, because QSC does not open them. Run keytool -list -v against each. Export the CA's issued-certificate database, and probe endpoints to see the certificate each one presents.[7]
5. Identity and tokens
Examples. JWTs signed with RS256 or ES256, JWKS endpoints, OIDC discovery documents, SAML assertions signed with RSA-SHA256, Kerberos encryption types, LDAP over TLS, XML signatures on ISO 20022 and SWIFT MX messages.
What to look for. The signing algorithm in token headers and metadata, which keys sign tokens, who verifies them, and legacy settings such as DES or RC4 Kerberos enctypes and NTLM.
Who owns it. The identity and access team for the identity provider, and each application team for tokens it issues itself. Partners often hold the verifying side.
How to find it. Scan JWKS files, OIDC discovery documents, SAML metadata, XML signature policies and krb5.conf. Fetch the live discovery documents from the identity provider, since they list supported algorithms. Ask partners which signature algorithms they accept, because a token verified by an external party cannot move to a new algorithm until they do.[7]
6. Data at rest
Examples. Database encryption such as transparent data encryption, column encryption with pgcrypto or DBMS_CRYPTO, encrypted file stores and backups, application-level encryption of customer records, tokenised card data.
What to look for. The cipher and key length, how the data key is protected (usually by an RSA or ECC key in a key manager or HSM), how long the data lives, and where backups of the encrypted data go.
Who owns it. Database and storage teams, with application teams for encryption they implemented in code, and the data owner who decides retention.
How to find it. Scan SQL and database configuration for crypto calls and weak settings, scan code for application-level encryption, and read storage encryption settings in cloud and database consoles. Symmetric encryption of the data itself is the lower quantum risk, as long as the key is 256-bit. The higher-risk part is the public-key step that wraps the data key, because a recorded copy of the wrapped key and the encrypted data can be attacked later. Oracle TDE wallets are not covered by QSC yet and need a manual inventory.[7]
Levels 7 to 10: cloud, pipelines, edge, mainframe and vendors
7. Cloud keys and HSMs
Examples. AWS KMS, Azure Key Vault and Google Cloud KMS keys, cloud HSM services, on-premises HSMs from payment and general-purpose vendors, customer-managed keys for storage and databases.
What to look for. The key spec of each key (RSA-2048, ECC_NIST_P256, AES-256), what each key is used for, rotation, and which services depend on it. Whether the provider offers post-quantum key types changes quickly. As of mid-2026, check the provider's current documentation and the readiness tracker.
Who owns it. Cloud platform and security teams for cloud keys, and a dedicated HSM or payments security team for on-premises devices.
How to find it. QSC reads key inventories with the --cloud aws|azure|gcp option, which is read-only. A scan of infrastructure code shows the key specs declared in Terraform and similar. HSMs must be inventoried through the vendor's management tools, covered below.[7]
8. Infrastructure as code and pipelines
Examples. Terraform that creates KMS keys, load-balancer TLS policies and private CAs. Kubernetes manifests with certificate settings, Helm charts, cert-manager issuers, Ansible tasks that generate keys, CI scripts that run openssl, jarsigner or cosign.
What to look for. Key algorithms and sizes declared in templates, minimum TLS versions, signing steps in the build, and secrets in pipeline variables. Templates are where a weak setting is copied to hundreds of environments.
Who owns it. DevOps and site reliability teams, and the central platform team that maintains shared modules.
How to find it. Scan the IaC repositories and pipeline definitions. Fixing a shared module fixes every environment built from it, so it makes a good early target. Where the code builds images, scan the images.
9. Network edge
Examples. Load balancers and reverse proxies, VPN gateways, web application firewalls, API gateways, partner-facing SFTP and managed file transfer servers, mail gateways.
What to look for. What each device negotiates with the outside world: protocol versions, key-exchange groups, certificate chains, and whether the device software can support hybrid post-quantum key exchange.
Who owns it. The network and security operations teams, with vendors for firmware.
How to find it. Scan device configuration exports where a scanner supports the format, and probe public and internal virtual servers. QSC does not yet cover F5 BIG-IP or Palo Alto configuration exports, so probe their virtual servers with --target host:443 instead. Probes cover TLS and SSH, and do not yet cover STARTTLS services or IKE.[7]
10. Mainframe and vendors
Examples. COBOL and PL/I programs that call ICSF, z/OS AT-TLS policy, MQ channels, RACF certificates, IBM i applications, core-banking platforms, card-management systems, payment HSM host commands, SWIFT connectivity.
What to look for. ICSF service calls, algorithm and key-length parameters in rule arrays, TLS policies, certificate sizes, and for vendor products the algorithm support and post-quantum roadmap.
Who owns it. Mainframe system programmers and application teams for what runs on the platform, and vendor management for the products.
How to find it. A scanner reads files, so export source from the library manager (Endevor, ChangeMan, PDS members) into a directory first. Export RACF key rings with RACDCERT LISTRING and scan the certificates. QSC does not yet cover CICS, RACF key rings, ICSF key data sets or payment HSM host commands, so these remain interview and questionnaire items.[7]
Common surprises
Teams that run a first inventory tend to report the same kinds of finding. These are patterns, not statistics.
- Test keys in real paths. Certificates and private keys committed for testing that were later copied into a deploy package.
- Several copies of a library. One OpenSSL on the host, another bundled in a container, a third inside a vendor agent, each with its own defaults.
- Algorithms chosen by default. Nothing in the repository mentions RSA, but the framework chooses it when no setting is given.
- Old protocols kept for one partner. A weak cipher suite stays enabled on a whole gateway because a single counterparty cannot upgrade.
- Long-lived signing keys. Code-signing and document-signing keys with ten-year certificates, whose signatures must stay valid for years.
- Crypto in scripts. Shell and PowerShell scripts that call
opensslorgpgin a scheduled job nobody remembers. - Hash use that looks weak but is not. MD5 or SHA-1 used to build identifiers or checksums is lower risk than the same hash in a signature. Triage by purpose, as the scanner does.
What scanners cannot see
Any file-based scan has limits. Three areas deserve their own plan.
- HSM contents. The keys inside an HSM are not files. A scanner can see the code and settings that call the HSM, and the mechanisms requested through PKCS#11, but not the list of keys inside.
- Vendor binaries. Compiled products show no source. Their libraries and algorithms are visible only through SBOMs, container layers and what they do on the wire.
- Runtime state. Windows certificate stores, browser policies, endpoint agents, and settings changed by hand on a running appliance exist only on the machine.
How to cover the gaps
Vendor questionnaires
For each product that handles cryptography, ask the vendor in writing: which public-key algorithms and key sizes the product uses; whether it supports ML-KEM, ML-DSA or SLH-DSA, and in which version; whether it can use hybrid key exchange; what the planned release dates are; whether algorithms are configurable; and where the product stores keys. Keep the answers with dates. Vendor claims change, so record when each was given.
Endpoint probes
A probe observes behaviour from outside and so works on any product with a network port. It shows the protocol version, key-exchange group and certificate the product really uses, whatever its documentation says. Probe every externally reachable service, and a sample of internal ones, on a schedule.
SBOMs
Ask vendors for a software bill of materials, preferably in CycloneDX, and generate your own for images with trivy or syft. QSC imports CycloneDX files. CycloneDX 1.6 also defines a CBOM format for cryptographic assets, so vendors can state their algorithms in a machine-readable form.[1]
Interviews and manual checks
Some items need a conversation: payment HSM key hierarchies, SWIFT connectivity, mainframe key data sets, and undocumented scheduled jobs. Use a short checklist per system owner, and write each answer into the inventory as manually sourced.
keytool -list -v -keystore app.jks
openssl s_client -connect host:443 -showcerts
ssh-keyscan -t rsa,ecdsa,ed25519 host
RACDCERT LISTRING(ringname) ID(userid) # on z/OSWhat to do now
- Assign an owner to each of the ten levels. A single named person per level, even if the answer is "nobody yet".
- Run a first scan. Use
qsc scanon repositories, add--targetfor your external endpoints,--cloudfor key services, and--importfor SBOMs. Output a CBOM in CycloneDX 1.6 format for the record. - List what the scan cannot see. HSMs, vendor products, mainframe key data sets, runtime state. Send questionnaires and book the interviews.
- Record a baseline. Use
--baseline, then re-scan after each change and useqsc diffto show the difference. - Link the inventory to obligations. PCI DSS 4.0 requirement 12.3.3 already asks for a documented, annually reviewed list of cipher suites and protocols in use, with a strategy for anticipated changes.[4] NIST's draft timeline and NSA's CNSA 2.0 give planning dates for the move away from vulnerable public-key algorithms.[5][6]
Related reading
How today's cryptography works describes the algorithms you will be finding. Cryptography in the cloud goes deeper on levels 7 and 9, and The post-quantum migration playbook explains what to do with the inventory once you have it.