Crypto-View

hyperledger/fabric-sdk-java

Cryptographic posture

90 cryptographic locations: 31 quantum-vulnerable, 10 reduced-margin, 40 undetermined, 9 quantum-safe

2 establish keys, so traffic protected by them and recorded today becomes readable once the algorithm falls. 1 imported cryptographic library is listed separately. 229 files analysed.

Quantum-vulnerable 31 Reduced margin 10 Could not be determined 40 Quantum-safe 9
To address44
Key establishment2
Inventory only1
Total findings91
What was analysed
Branch main
Commit a61508e5bf7c8f7197926f28db51cdab0a6b9f1e Archive repo (#306)
Committed 2025-04-22 16:17 UTC
Scanned 2026-10-22 12:41 UTC 28 days ago
Coverage 229 files, 191 java
554 test files not scanned

Earlier scans of this repository

4 scans · compare any two
0 to 500 locations Quantum-vulnerable 479 → 59 (down 420) Reduced margin 12 → 27 (up 15) Could not be determined 32 → 41 (up 9) Quantum-safe 5 → 9 (up 4) The filled point is the scan you are reading.
Scanned Commit To address Key establishment
27 days ago a61508e5bf7c main 83 5 Compare
28 days ago a61508e5bf7c main 77 4 Compare
28 days ago this scan a61508e5bf7c main 44 2
29 days ago a61508e5bf7c main 469 1 Compare

A repository is scanned again when someone asks: Run a fresh scan.

List of cryptographic assets

ECDSA Quantum-vulnerable From a constant 5 places See details

Classical signature algorithm through the JCA

`Signature.getInstance()` with a classical algorithm. The digest and the key algorithm are split out of the JCA name, so `SHA1withRSA` reports both the broken digest and the quantum-vulnerable key.

A quantum computer of sufficient size breaks this completely. It has to be replaced, not tuned. Broken by Shor's algorithm on a cryptographically relevant quantum computer.

What to do. ML-DSA-65 (FIPS 204). Where the verifier cannot be changed, sign twice and publish both signatures.

  1. src/main/java/org/hyperledger/fabric_ca/sdk/helper/Config.java:90 defaultProperty(SIGNATURE_ALGORITHM, "SHA256withECDSA");
  2. src/main/java/org/hyperledger/fabric/sdk/helper/Config.java:170 defaultProperty(SIGNATURE_ALGORITHM, "SHA256withECDSA");
  3. src/main/java/org/hyperledger/fabric/sdk/security/certgen/TLSCertificateBuilder.java:53 private static final String defaultSignatureAlgorithm = "SHA256withECDSA";
  4. src/main/java/org/hyperledger/fabric/sdk/security/certgen/TLSCertificateBuilder.java:67 signatureAlgorithm = defaultSignatureAlgorithm;
  5. src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java:791 JcaContentSignerBuilder csBuilder = new JcaContentSignerBuilder("SHA256withECDSA");
java.signature · CWE-327
ECDSA-P384secg/secp384r1 Quantum-vulnerable 4 places See details

Classical signature algorithm through the JCA

`Signature.getInstance()` with a classical algorithm. The digest and the key algorithm are split out of the JCA name, so `SHA1withRSA` reports both the broken digest and the quantum-vulnerable key.

A quantum computer of sufficient size breaks this completely. It has to be replaced, not tuned. Broken by Shor's algorithm on a cryptographically relevant quantum computer.

What to do. ML-DSA-65 (FIPS 204). Where the verifier cannot be changed, sign twice and publish both signatures.

java.signature · CWE-327
ECDSA Quantum-vulnerable 3 places See details

Call to code named for an algorithm

A call, construction or operation whose own name states the algorithm: a project's wrapper such as `Hash.sha256(data)`, `hmacSha256(key, msg)`, `getMD5()` or `new ScryptGenerator(..)`, a key type such as `new Ed25519PublicKey(bytes)`, or an operation on an object named for its algorithm, `sha256.digest()`. The library call inside the wrapper is reported where it is written; these are the places it is used.

This line calls code named after an encryption or hashing method.

What to do. Migrate the wrapper once, and these call sites follow it.

  1. src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java:653 return ecdsaKeyGen();
  2. src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java:737 BigInteger[] sigs = preventMalleability(decodeECDSASignature(signature), curveN);
  3. src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java:759 return ecdsaSignToBytes((ECPrivateKey) key, data);
code.named-call
ECDSA Quantum-vulnerable 2 places See details

Algorithm named in a setting

A setting whose name says it holds an algorithm, given a literal that names one: `withOaepPaddingDigestAlgorithm("SHA-512")`, `signatureAlgorithm = "SHA256withRSA"`, `"digestAlgorithm": "SHA-256"`. The algorithm never reaches a `getInstance()` in this file - it is carried to one somewhere else, often through configuration - so a scan that only reads the factories cannot see it at all.

Something here is configured to use a named algorithm. The code that uses it may be somewhere else entirely, but this is the line that decides which algorithm it is.

What to do. Find what consumes the setting. The migration belongs to that operation; this line is where the choice is actually written down, and usually where it is easiest to change.

  1. src/main/java/org/hyperledger/fabric/sdk/security/certgen/TLSCertificateBuilder.java:53 private static final String defaultSignatureAlgorithm = "SHA256withECDSA";
  2. src/main/java/org/hyperledger/fabric/sdk/security/certgen/TLSCertificateBuilder.java:67 signatureAlgorithm = defaultSignatureAlgorithm;
config.algorithm-setting · CWE-327
ECDSA-P384secg/secp384r1 Quantum-vulnerable 2 places See details

Classical key pair generated through the JCA

`KeyPairGenerator.getInstance()` with a classical algorithm. The concrete family and, where an `initialize()` call is close enough to read, the key size are resolved from the source and reported on the finding.

A quantum computer of sufficient size breaks this completely. It has to be replaced, not tuned. Broken by Shor's algorithm on a cryptographically relevant quantum computer.

What to do. Generate the classical key alongside an ML-KEM or ML-DSA key and carry both until relying parties accept the post-quantum one.

java.keypairgenerator · CWE-327
EC Quantum-vulnerable 1 place See details

Classical key material handled through the JCA

`KeyFactory.getInstance()` for a classical algorithm. This indicates the code parses or produces keys of that family, which is a migration surface even where it does no cryptography itself.

A quantum computer of sufficient size breaks this completely. It has to be replaced, not tuned. An elliptic-curve key pair. The source does not say whether it signs or agrees a shared secret, and the curve alone cannot: the same curve serves both.

What to do. Include this code path in the inventory: it has to accept post-quantum key encodings before the keys themselves can change.

  1. src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java:1214 return KeyFactory.getInstance("EC").generatePublic(new X509EncodedKeySpec(der));
java.keyfactory · CWE-327
ECDSA384-bitsecg/secp384r1 Quantum-vulnerable 1 place See details

Named elliptic curve requested

`ECGenParameterSpec` names a curve explicitly. Every standardised prime curve is broken by Shor regardless of its size, so a larger curve is not a mitigation.

A quantum computer of sufficient size breaks this completely. It has to be replaced, not tuned. Broken by Shor's algorithm on a cryptographically relevant quantum computer.

What to do. ML-DSA-65 for signatures, ML-KEM-768 for key establishment.

  1. src/main/java/org/hyperledger/fabric/sdk/idemix/RevocationAuthority.java:69 AlgorithmParameterSpec params = new ECGenParameterSpec("secp384r1");
java.eccurve · CWE-327
TLS Quantum-vulnerable Recorded traffic 1 place See details

TLS used in code

A TLS connection, context or setting made in code: `SSLContexts.createDefault()`, `SSLSocketFactory.getDefault()`, `setEnabledProtocols()`, `setEnabledCipherSuites()`, `startHandshake()`, Go `tls.VersionTLS12` and `tls.Dial()`, Python `ssl.create_default_context()`, Node `tls.connect()`, and version names such as `"TLSv1.2"`. Every TLS key exchange in general use is classical, so recorded traffic is exposed.

This code opens or configures an encrypted connection. Its key exchange is the part a future quantum computer breaks, which exposes traffic recorded today.

What to do. TLS 1.3 everywhere, then a hybrid group such as X25519MLKEM768 as the platform offers it.

  1. src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java:1639 SSLContext sslContext = SSLContexts.custom()
tls.protocol · CWE-757
TLS Quantum-vulnerable Recorded traffic 1 place See details

TLS context created in code

`SSLContext.getInstance()`. The protocol version is reported; the key exchange it negotiates is classical in every TLS 1.2 and 1.3 cipher suite available today.

A quantum computer of sufficient size breaks this completely. It has to be replaced, not tuned. Every TLS cipher suite in general use negotiates a classical key exchange, so a recorded session is decryptable once that exchange falls.

What to do. Keep TLS 1.3, and track the hybrid key-exchange groups as they reach the JDK. TLS is where harvest-now-decrypt-later exposure is largest.

  1. src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java:1665 final SSLContext sslContext = SSLContext.getInstance("TLS");
java.sslcontext · CWE-757
AES Reduced margin From a constant 1 place See details

Cipher transformation named away from the call

A JCA transformation string - `algorithm/mode/padding` - written somewhere other than a `getInstance()` argument, which is how a codebase that centralises its cryptography passes the choice to a helper. The string is unambiguous wherever it appears: nothing but a transformation is spelled that way.

This names an encryption method as text, and passes it to code elsewhere that does the work. It is the same choice, made in a different place.

What to do. The same migration applies as to the call that consumes it. Move the constant and the call together, so the inventory keeps naming the algorithm after the change.

  1. src/main/java/org/hyperledger/fabric_ca/sdk/helper/Config.java:87 defaultProperty(SYMMETRIC_ALGORITHM, "AES/CFB/NoPadding");
java.transformation · CWE-327
SHA3-256 Reduced margin 4 places See details

Digest through BouncyCastle

A BouncyCastle digest class. The digest name is read from the class, so `MD5Digest` and `SHA512Digest` are the same rule with opposite conclusions.

A quantum computer weakens this but does not break it. Increasing the key or digest size restores the margin. Grover's algorithm halves the effective strength; the parameter, not the design, is the problem.

What to do. SHA-256 as the floor, SHA-384 where the digest protects something long-lived. MD5 and SHA-1 need replacing now.

  1. src/main/java/org/hyperledger/fabric/sdk/helper/Utils.java:109 return Hex.toHexString(hash(param.toString().getBytes(UTF_8), new SHA3Digest()));
  2. src/main/java/org/hyperledger/fabric/sdk/helper/Utils.java:145 hashBuilder.append(Hex.toHexString(hash(toHash, new SHA3Digest())));
  3. src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java:845 digest.doFinal(retValue, 0);
  4. src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java:868 return new SHA3Digest();
java.bouncycastle.digest · CWE-328
SHA-256 Reduced margin 3 places See details

Digest through BouncyCastle

A BouncyCastle digest class. The digest name is read from the class, so `MD5Digest` and `SHA512Digest` are the same rule with opposite conclusions.

A quantum computer weakens this but does not break it. Increasing the key or digest size restores the margin. Pre-image resistance falls to about 128 bits of quantum work. Adequate for most uses; SHA-384 restores the full margin where a signature must last decades.

What to do. SHA-256 as the floor, SHA-384 where the digest protects something long-lived. MD5 and SHA-1 need replacing now.

java.bouncycastle.digest · CWE-328
SHA-256 Reduced margin 2 places See details

Hash algorithm through the JCA

`MessageDigest.getInstance()`. MD5 and SHA-1 are reported as already broken; SHA-256 is reported as a reduced margin rather than a defect.

A quantum computer weakens this but does not break it. Increasing the key or digest size restores the margin. Pre-image resistance falls to about 128 bits of quantum work. Adequate for most uses; SHA-384 restores the full margin where a signature must last decades.

What to do. SHA-256 as the floor, SHA-384 where the digest protects something that must remain verifiable for decades.

  1. src/main/java/org/hyperledger/fabric/sdk/idemix/RevocationAuthority.java:106 Signature ecdsa = Signature.getInstance("SHA256withECDSA");
  2. src/main/java/org/hyperledger/fabric/sdk/idemix/RevocationAuthority.java:144 Signature dsa = Signature.getInstance("SHA256withECDSA");
java.messagedigest · CWE-328
X.509 Could not be determined 13 places See details

X.509 certificate handled in code

A certificate, signing request or revocation list loaded, parsed or created: `x509.load_pem_x509_certificate()`, `x509.ParseCertificate()`, `CertificateFactory.generateCertificate()`, `new X509Certificate()`. Certificates are the longest-lived cryptographic artefacts most systems own.

This code reads or builds a digital identity document. Its key, and how long it stays valid, decide when it has to be replaced.

What to do. Shorten certificate lifetimes now, so re-issuing with a post-quantum key is routine rather than an incident.

  1. src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java:730 CertificateFactory certFactory = CertificateFactory.getInstance(Config.getConfig().getCertificateFormat());
  2. src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java:731 X509Certificate certificate = (X509Certificate) certFactory.generateCertificate(pem);
  3. src/main/java/org/hyperledger/fabric_ca/sdk/HFCAX509Certificate.java:44 CertificateFactory cf = CertificateFactory.getInstance("X.509");
  4. src/main/java/org/hyperledger/fabric_ca/sdk/HFCAX509Certificate.java:45 return (X509Certificate) cf.generateCertificate(new ByteArrayInputStream(pem.getBytes()));
  5. src/main/java/org/hyperledger/fabric/sdk/security/certgen/TLSCertificateBuilder.java:129 JcaX509CertificateConverter converter = new JcaX509CertificateConverter();
  6. src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java:226 CertificateFactory certFactory = CertificateFactory.getInstance(CERTIFICATE_FORMAT, provider);
  7. src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java:228 Certificate certificate = certFactory.generateCertificate(bis);
  8. src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java:389 Certificate caCert = cf.generateCertificate(bis);
  9. src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java:412 final Collection<? extends Certificate> certificates = cf.generateCertificates(bis);
  10. src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java:581 CertificateFactory certFactory = CertificateFactory.getInstance(CERTIFICATE_FORMAT);
  11. src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java:582 CertPath certPath = certFactory.generateCertPath(start);
  12. src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java:818 PemObject pemCSR = new PemObject("CERTIFICATE REQUEST", csr.getEncoded());
  13. src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java:916 cf = CertificateFactory.getInstance(CERTIFICATE_FORMAT);
x509.certificate
unknown Could not be determined 6 places See details

Algorithm chosen at runtime

`KeyPairGenerator.getInstance(x)`, `Mac.getInstance(lookup(key))` and the other JCA factories, where the argument is a variable or a call. The algorithm cannot be resolved without running the program, so this is reported as an unknown rather than assumed to be classical; what the factory does - sign, tag, digest - is still reported, and so are the lines that use the object.

This code picks its encryption method while it runs, so a scan cannot tell which one it ends up using. Somebody has to check the configuration.

What to do. Trace the value to its configuration source and record the concrete algorithm in the cryptographic inventory by hand.

  1. src/main/java/org/hyperledger/fabric/sdk/security/certgen/TLSCertificateBuilder.java:159 KeyPairGenerator keypairGen = KeyPairGenerator.getInstance(keyType, new BouncyCastleProvider());
  2. src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java:305 Signature sig = Signature.getInstance(signatureAlgorithm);
  3. src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java:663 KeyPairGenerator g = SECURITY_PROVIDER == null ? KeyPairGenerator.getInstance(encryptionName) :
  4. src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java:664 KeyPairGenerator.getInstance(encryptionName, SECURITY_PROVIDER);
  5. src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java:731 Signature sig = SECURITY_PROVIDER == null ? Signature.getInstance(DEFAULT_SIGNATURE_ALGORITHM) :
  6. src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java:732 Signature.getInstance(DEFAULT_SIGNATURE_ALGORITHM, SECURITY_PROVIDER);
java.keypairgenerator.variable · CWE-327
X.509 Could not be determined 4 places See details

Certificate signed or verified

A certificate or signing request is signed - `x509.CreateCertificate()`, a pyca `builder.sign()`, a Bouncy Castle `certBuilder.build(signer)` - or its signature or chain is checked: `CheckSignature()`, `Verify(x509.VerifyOptions{})`, `CertPathValidator`, `is_signature_valid`. The algorithm is the signing key's.

This code puts a signature on a digital identity document, or checks one.

What to do. Find the key behind the signature. Issuing certificates is where an ML-DSA key eventually goes, and the relying parties that verify them have to accept it first.

  1. src/main/java/org/hyperledger/fabric/sdk/security/certgen/TLSCertificateBuilder.java:127 X509CertificateHolder holder = certBuilder.build(signer);
  2. src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java:577 CertPathValidator certValidator = CertPathValidator.getInstance(CertPathValidator.getDefaultType()); // PKIX
  3. src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java:584 certValidator.validate(certPath, parms);
  4. src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java:798 return certificationRequestToPEM(p10Builder.build(signer));
x509.signature
unknown Could not be determined 1 place See details

Cryptographic library in the dependency manifest

A dependency known to implement classical asymmetric cryptography. Its presence is inventory, not a finding about this codebase: the library may never be called with a quantum-vulnerable algorithm.

The project depends on a cryptography library. Listed so the inventory is complete; it is not by itself a problem.

What to do. Check the version. Several of these libraries have shipped ML-KEM and ML-DSA support since 2024, so the migration may need an upgrade rather than a replacement.

  1. pom.xml:108 <artifactId>bcprov-jdk18on</artifactId>
dep.crypto-library
CSPRNG Quantum-safe 9 places See details

Random number generation

`SecureRandom`. A platform CSPRNG is not a quantum exposure; it is recorded because an inventory that omits the randomness source is incomplete. `SHA1PRNG` is named explicitly where it appears, since it is a legacy algorithm even though its output is adequate.

This is where the software gets its random numbers. Quantum computers do not weaken it.

What to do. No action. Prefer the platform default over naming an algorithm.

java.rng

Cryptographic assets

Algorithm Assessment What it means Occurrences
unknown Could not be determined The algorithm could not be established from the source - chosen at runtime, or decided somewhere this scan does not reach. 23
ECDSA Quantum-vulnerable Broken by Shor's algorithm on a cryptographically relevant quantum computer. 17
X.509 Could not be determined An X.509 certificate, signing request or revocation list, or a signature over one. The algorithm is the key's, which this code does not name. 17
RSA Quantum-vulnerable Broken by Shor's algorithm on a cryptographically relevant quantum computer. 10
CSPRNG Quantum-safe A cryptographically secure random number generator provided by the platform. Not weakened by a quantum computer. 9
SHA-256 Reduced margin Pre-image resistance falls to about 128 bits of quantum work. Adequate for most uses; SHA-384 restores the full margin where a signature must last decades. 5
SHA3-256 Reduced margin Grover's algorithm halves the effective strength; the parameter, not the design, is the problem. 4
TLS Quantum-vulnerable Every TLS cipher suite in general use negotiates a classical key exchange, so a recorded session is decryptable once that exchange falls. 3
EC Quantum-vulnerable An elliptic-curve key pair. The source does not say whether it signs or agrees a shared secret, and the curve alone cannot: the same curve serves both. 1
AES Reduced margin Grover's algorithm halves the effective strength; the parameter, not the design, is the problem. The key size was not visible at this call site, so the weaker case is assumed. 1

Imported cryptographic libraries

Library Files
org.bouncycastle BouncyCastle, whose low-level API bypasses the JCA algorithm strings. It has shipped ML-KEM and ML-DSA since 1.79 10
javax.net.ssl the TLS client and server 1
java.security the JCA 17