Crypto-View

apache/santuario-xml-security-java

Cryptographic posture

2473 cryptographic locations: 976 already broken, 469 quantum-vulnerable, 313 reduced-margin, 400 undetermined, 315 quantum-safe

57 establish keys, so traffic protected by them and recorded today becomes readable once the algorithm falls. 28 imported cryptographic libraries are listed separately. 1504 files analysed.

Quantum-vulnerable 469 Already broken 976 Reduced margin 313 Could not be determined 400 Quantum-safe 315
To address1781
Key establishment57
Inventory only28
Total findings2501
What was analysed
Branch main
Commit 497d3fb4c8b5654a9951a3de4682c6ed48038173 Only set setIsInSignedContent when we're inside the signed content, fix some NPEs (#666)
Committed 2026-09-15 15:39 UTC
Scanned 2026-09-21 10:57 UTC 9 hours ago
Coverage 1504 files, 674 java

List of cryptographic assets

SHA-1 Already broken Renamed import 768 places See details

XML signature or encryption algorithm

An XML Signature or XML Encryption algorithm URI - SAML, XAdES or WS-Security. The URI names the algorithm exactly, and a signature URI names its digest as well, so `#rsa-sha1` reports both the key and the broken digest.

Federated login and signed XML documents name their cryptography in a web address. Some of those addresses name algorithms that are already broken.

What to do. Move off `#rsa-sha1` first: that signature is forgeable today, with no quantum computer involved. The key algorithm changes with the wider migration.

  1. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:80 "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1";
  2. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:236 } else if (alg.equals(ECDSA_SHA1)) {
  3. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:1042 return ECDSA_SHA1;
  4. src/main/java/org/apache/xml/security/encryption/XMLCipherParameters.java:57 "http://www.w3.org/2000/09/xmldsig#sha1";
  5. src/main/java/org/apache/xml/security/resource/config.xml:79 <SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
  6. src/main/java/org/apache/xml/security/resource/config.xml:81 <SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
  7. src/main/java/org/apache/xml/security/resource/config.xml:83 <SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#hmac-sha1"
  8. src/main/java/org/apache/xml/security/resource/config.xml:119 <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"
  9. src/main/java/org/apache/xml/security/resource/config.xml:164 <Algorithm URI="http://www.w3.org/2000/09/xmldsig#sha1"
  10. src/main/java/org/apache/xml/security/resource/config.xml:226 <Algorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
  11. src/main/java/org/apache/xml/security/resource/config.xml:249 <Algorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
  12. src/main/java/org/apache/xml/security/resource/config.xml:327 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"
  13. src/main/java/org/apache/xml/security/resource/config.xml:394 <Algorithm URI="http://www.w3.org/2000/09/xmldsig#hmac-sha1"
  14. src/main/java/org/apache/xml/security/signature/XMLSignature.java:184 "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1";
  15. src/main/java/org/apache/xml/security/stax/ext/XMLSec.java:149 securityProperties.setSignatureAlgorithm("http://www.w3.org/2000/09/xmldsig#rsa-sha1");
  16. src/main/java/org/apache/xml/security/stax/ext/XMLSec.java:151 securityProperties.setSignatureAlgorithm("http://www.w3.org/2000/09/xmldsig#dsa-sha1");
  17. src/main/java/org/apache/xml/security/stax/ext/XMLSec.java:153 securityProperties.setSignatureAlgorithm("http://www.w3.org/2000/09/xmldsig#hmac-sha1");
  18. src/main/java/org/apache/xml/security/stax/ext/XMLSec.java:157 securityProperties.setSignatureDigestAlgorithm("http://www.w3.org/2000/09/xmldsig#sha1");
  19. src/main/resources/security-config.xml:83 <Algorithm URI="http://www.w3.org/2000/09/xmldsig#sha1"
  20. src/main/resources/security-config.xml:175 <Algorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
  21. src/main/resources/security-config.xml:198 <Algorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
  22. src/main/resources/security-config.xml:276 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"
  23. src/main/resources/security-config.xml:343 <Algorithm URI="http://www.w3.org/2000/09/xmldsig#hmac-sha1"
  24. src/test/java/org/apache/xml/security/encryption/keys/content/derivedKey/HKDFTest.java:65 test path "'Rfc5869: Test Case 4','http://www.w3.org/2000/09/xmldsig#sha1', " +
  25. src/test/java/org/apache/xml/security/encryption/keys/content/derivedKey/HKDFTest.java:72 test path "'Rfc5869: Test Case 5','http://www.w3.org/2000/09/xmldsig#sha1', " +
  26. src/test/java/org/apache/xml/security/encryption/keys/content/derivedKey/HKDFTest.java:79 test path "'Rfc5869: Test Case 6','http://www.w3.org/2000/09/xmldsig#sha1', " +
  27. src/test/java/org/apache/xml/security/encryption/keys/content/derivedKey/HKDFTest.java:86 test path "'Rfc5869: Test Case 7','http://www.w3.org/2000/09/xmldsig#sha1', " +
  28. src/test/java/org/apache/xml/security/test/dom/algorithms/HMACSignatureAlgorithmTest.java:97 test path SecretKey key = new SecretKeySpec(hmacKey, "http://www.w3.org/2000/09/xmldsig#hmac-sha1");
  29. src/test/java/org/apache/xml/security/test/dom/algorithms/HMACSignatureAlgorithmTest.java:102 test path sign("http://www.w3.org/2000/09/xmldsig#hmac-sha1", document, localNames, key);
  30. src/test/java/org/apache/xml/security/test/dom/algorithms/HMACSignatureAlgorithmTest.java:246 test path String digestMethod = "http://www.w3.org/2000/09/xmldsig#sha1";
  31. src/test/java/org/apache/xml/security/test/dom/algorithms/HMACSignatureAlgorithmTest.java:247 test path sig.addDocument("#" + id, transforms, digestMethod);
  32. src/test/java/org/apache/xml/security/test/dom/algorithms/PKSignatureAlgorithmTest.java:586 test path String digestMethod = "http://www.w3.org/2000/09/xmldsig#sha1";
  33. src/test/java/org/apache/xml/security/test/dom/algorithms/PKSignatureAlgorithmTest.java:587 test path sig.addDocument("#" + id, transforms, digestMethod);
  34. src/test/java/org/apache/xml/security/test/dom/c14n/implementations/Santuario273Test.java:52 test path + " <SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\" />\n"
  35. src/test/java/org/apache/xml/security/test/dom/c14n/implementations/Santuario273Test.java:54 test path + " <DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\" />\n"
  36. src/test/java/org/apache/xml/security/test/dom/c14n/implementations/Santuario273Test.java:71 test path + " <SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\"></SignatureMethod>\n"
  37. src/test/java/org/apache/xml/security/test/dom/c14n/implementations/Santuario273Test.java:73 test path + " <DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\"></DigestMethod>\n"
  38. src/test/java/org/apache/xml/security/test/dom/encryption/XMLEncryption11Test.java:116 test path "http://www.w3.org/2000/09/xmldsig#sha1",
  39. src/test/java/org/apache/xml/security/test/dom/encryption/XMLEncryption11Test.java:165 test path "http://www.w3.org/2000/09/xmldsig#sha1",
  40. src/test/java/org/apache/xml/security/test/dom/parser/XMLParserTest.java:128 test path String digestMethod = "http://www.w3.org/2000/09/xmldsig#sha1";
  41. src/test/java/org/apache/xml/security/test/dom/parser/XMLParserTest.java:129 test path sig.addDocument("#" + id, transforms, digestMethod);
  42. src/test/java/org/apache/xml/security/test/dom/transforms/implementations/Xpath2TransformationTest.java:92 test path "<ds:SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\"></ds:SignatureMethod>\r\n" +
  43. src/test/java/org/apache/xml/security/test/dom/transforms/implementations/Xpath2TransformationTest.java:99 test path "<ds:DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\"></ds:DigestMethod>\r\n" +
  44. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/CreateInteropXMLDSig11Test.java:135 test path ("http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1", null);
  45. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/HMACSignatureAlgorithmTest.java:106 test path hmacSha1 = fac.newSignatureMethod("http://www.w3.org/2000/09/xmldsig#hmac-sha1", null);
  46. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/PKSignatureAlgorithmTest.java:135 test path rsaSha1 = fac.newSignatureMethod("http://www.w3.org/2000/09/xmldsig#rsa-sha1", null);
  47. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/PKSignatureAlgorithmTest.java:158 test path ecdsaSha1 = fac.newSignatureMethod("http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1", null);
  48. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/SignatureDigestMethodTest.java:93 test path ("http://www.w3.org/2000/09/xmldsig#rsa-sha1", null);
  49. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/XMLSignatureECDSATest.java:90 test path "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1, secp256r1",
  50. src/test/java/org/apache/xml/security/test/stax/STAXSecureDefaultsTest.java:68 test path assertEquals("http://www.w3.org/2000/09/xmldsig#rsa-sha1", sigAlgo,
  51. src/test/java/org/apache/xml/security/test/stax/STAXSecureDefaultsTest.java:85 test path assertEquals("http://www.w3.org/2000/09/xmldsig#dsa-sha1", sigAlgo,
  52. src/test/java/org/apache/xml/security/test/stax/STAXSecureDefaultsTest.java:102 test path assertEquals("http://www.w3.org/2000/09/xmldsig#hmac-sha1", sigAlgo,
  53. src/test/java/org/apache/xml/security/test/stax/STAXSecureDefaultsTest.java:119 test path assertEquals("http://www.w3.org/2000/09/xmldsig#sha1", digestAlgo,
  54. src/test/java/org/apache/xml/security/test/stax/performance/BenchmarkXmlFileFactory.java:160 test path sig.addDocument("", transforms, "http://www.w3.org/2000/09/xmldsig#sha1");
  55. src/test/java/org/apache/xml/security/test/stax/performance/BenchmarkXmlFileFactory.java:291 test path "http://www.w3.org/2000/09/xmldsig#sha1"
  56. src/test/java/org/apache/xml/security/test/stax/signature/AbstractSignatureVerificationTest.java:190 test path String digestMethod = "http://www.w3.org/2000/09/xmldsig#sha1";
  57. src/test/java/org/apache/xml/security/test/stax/signature/AbstractSignatureVerificationTest.java:206 test path String digestMethod = "http://www.w3.org/2000/09/xmldsig#sha1";
  58. src/test/java/org/apache/xml/security/test/stax/signature/AbstractSignatureVerificationTest.java:222 test path String digestMethod = "http://www.w3.org/2000/09/xmldsig#sha1";
  59. src/test/java/org/apache/xml/security/test/stax/signature/AbstractSignatureVerificationTest.java:236 test path String digestMethod
  60. src/test/java/org/apache/xml/security/test/stax/signature/AbstractSignatureVerificationTest.java:250 test path String digestMethod,
  61. src/test/java/org/apache/xml/security/test/stax/signature/AbstractSignatureVerificationTest.java:279 test path sig.addDocument("#" + id, transforms, digestMethod);
  62. src/test/java/org/apache/xml/security/test/stax/signature/AbstractSignatureVerificationTest.java:310 test path String digestAlgorithm = "http://www.w3.org/2000/09/xmldsig#sha1";
  63. src/test/java/org/apache/xml/security/test/stax/signature/AbstractSignatureVerificationTest.java:311 test path String signatureMethod = "http://www.w3.org/2000/09/xmldsig#rsa-sha1";
  64. src/test/java/org/apache/xml/security/test/stax/signature/AbstractSignatureVerificationTest.java:318 test path String digestAlgorithm,
  65. src/test/java/org/apache/xml/security/test/stax/signature/AbstractSignatureVerificationTest.java:319 test path String signatureMethod
  66. src/test/java/org/apache/xml/security/test/stax/signature/AbstractSignatureVerificationTest.java:343 test path assertEquals(digestAlgorithm, algorithmEvent.getAlgorithmURI());
  67. src/test/java/org/apache/xml/security/test/stax/signature/AbstractSignatureVerificationTest.java:352 test path assertEquals(signatureMethod, algorithmEvent.getAlgorithmURI());
  68. src/test/java/org/apache/xml/security/test/stax/signature/AbstractSignatureVerificationTest.java:436 test path private String digestMethod;
  69. src/test/java/org/apache/xml/security/test/stax/signature/AbstractSignatureVerificationTest.java:439 test path ReferenceInfo(String resource, String[] c14NMethod, String digestMethod, boolean binary) {
  70. src/test/java/org/apache/xml/security/test/stax/signature/AbstractSignatureVerificationTest.java:442 test path this.digestMethod = digestMethod;
  71. src/test/java/org/apache/xml/security/test/stax/signature/AbstractSignatureVerificationTest.java:463 test path return digestMethod;
  72. src/test/java/org/apache/xml/security/test/stax/signature/AbstractSignatureVerificationTest.java:466 test path public void setDigestMethod(String digestMethod) {
  73. src/test/java/org/apache/xml/security/test/stax/signature/AbstractSignatureVerificationTest.java:467 test path this.digestMethod = digestMethod;
  74. src/test/java/org/apache/xml/security/test/stax/signature/BaltimoreTest.java:126 test path SecretKey key = new SecretKeySpec(hmacKey, "http://www.w3.org/2000/09/xmldsig#hmac-sha1");
  75. src/test/java/org/apache/xml/security/test/stax/signature/BaltimoreTest.java:164 test path SecretKey key = new SecretKeySpec(hmacKey, "http://www.w3.org/2000/09/xmldsig#hmac-sha1");
  76. src/test/java/org/apache/xml/security/test/stax/signature/BaltimoreTest.java:335 test path SecretKey key = new SecretKeySpec(hmacKey, "http://www.w3.org/2000/09/xmldsig#hmac-sha1");
  77. src/test/java/org/apache/xml/security/test/stax/signature/BaltimoreTest.java:373 test path SecretKey key = new SecretKeySpec(hmacKey, "http://www.w3.org/2000/09/xmldsig#hmac-sha1");
  78. src/test/java/org/apache/xml/security/test/stax/signature/IAIKTest.java:115 test path SecretKey key = new SecretKeySpec(hmacKey, "http://www.w3.org/2000/09/xmldsig#hmac-sha1");
  79. src/test/java/org/apache/xml/security/test/stax/signature/IAIKTest.java:151 test path SecretKey key = new SecretKeySpec(hmacKey, "http://www.w3.org/2000/09/xmldsig#hmac-sha1");
  80. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:69 test path String signatureAlgorithm = "http://www.w3.org/2000/09/xmldsig#rsa-sha1";
  81. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:78 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  82. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:110 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  83. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:142 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  84. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:174 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  85. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:208 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  86. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:242 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  87. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:276 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  88. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:310 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  89. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:344 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  90. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:378 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  91. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:413 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  92. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:436 test path String signatureAlgorithm = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1";
  93. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:445 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  94. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:477 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  95. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:509 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  96. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:541 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  97. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:573 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  98. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:607 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  99. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureVerificationTest.java:70 test path String signatureAlgorithm = "http://www.w3.org/2000/09/xmldsig#rsa-sha1";
  100. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureVerificationTest.java:471 test path String digestMethod = "http://www.w3.org/2000/09/xmldsig#sha1";
  101. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureVerificationTest.java:507 test path String signatureAlgorithm = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1";
  102. src/test/java/org/apache/xml/security/test/stax/signature/PhaosExceptionForManifestTest.java:78 test path SecretKey key = new SecretKeySpec(hmacKey, "http://www.w3.org/2000/09/xmldsig#hmac-sha1");
  103. src/test/java/org/apache/xml/security/test/stax/signature/PhaosRemoteReferenceTest.java:127 test path SecretKey key = new SecretKeySpec(hmacKey, "http://www.w3.org/2000/09/xmldsig#hmac-sha1");
  104. src/test/java/org/apache/xml/security/test/stax/signature/PhaosTest.java:137 test path SecretKey key = new SecretKeySpec(hmacKey, "http://www.w3.org/2000/09/xmldsig#hmac-sha1");
  105. src/test/java/org/apache/xml/security/test/stax/signature/SignatureCreationTest.java:208 test path "http://www.w3.org/2000/09/xmldsig#sha1"
  106. src/test/java/org/apache/xml/security/test/stax/signature/SignatureCreationTest.java:257 test path "http://www.w3.org/2000/09/xmldsig#sha1"
  107. src/test/java/org/apache/xml/security/test/stax/signature/SignatureCreationTest.java:305 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  108. src/test/java/org/apache/xml/security/test/stax/signature/SignatureCreationTest.java:379 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  109. src/test/java/org/apache/xml/security/test/stax/signature/SignatureCreationTest.java:453 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  110. src/test/java/org/apache/xml/security/test/stax/signature/SignatureCreationTest.java:573 test path SecretKey key = new SecretKeySpec(hmacKey, "http://www.w3.org/2000/09/xmldsig#hmac-sha1");
  111. src/test/java/org/apache/xml/security/test/stax/signature/SignatureCreationTest.java:576 test path properties.setSignatureAlgorithm("http://www.w3.org/2000/09/xmldsig#hmac-sha1");
  112. src/test/java/org/apache/xml/security/test/stax/signature/SignatureCreationTest.java:692 test path properties.setSignatureAlgorithm("http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1");
  113. src/test/java/org/apache/xml/security/test/stax/signature/SignatureCreationTest.java:803 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  114. src/test/java/org/apache/xml/security/test/stax/signature/SignatureCreationTest.java:1017 test path properties.setSignatureAlgorithm("http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1");
  115. src/test/java/org/apache/xml/security/test/stax/signature/SignatureCreationTest.java:1050 test path properties.setSignatureAlgorithm("http://www.w3.org/2000/09/xmldsig#rsa-sha1");
  116. src/test/java/org/apache/xml/security/test/stax/signature/SignatureCreationTest.java:1193 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  117. src/test/java/org/apache/xml/security/test/stax/signature/SignatureCreationTest.java:1337 test path }, "http://www.w3.org/2000/09/xmldsig#sha1");
  118. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestCreationTest.java:65 test path String digestAlgorithm = "http://www.w3.org/2000/09/xmldsig#sha1";
  119. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestVerificationTest.java:70 test path String digestAlgorithm = "http://www.w3.org/2000/09/xmldsig#sha1";
  120. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestVerificationTest.java:73 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  121. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestVerificationTest.java:118 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  122. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestVerificationTest.java:163 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  123. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestVerificationTest.java:208 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  124. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestVerificationTest.java:253 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  125. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestVerificationTest.java:300 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  126. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestVerificationTest.java:347 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  127. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestVerificationTest.java:394 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  128. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestVerificationTest.java:441 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  129. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestVerificationTest.java:488 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  130. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestVerificationTest.java:535 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  131. src/test/java/org/apache/xml/security/test/stax/signature/SignatureEncryptionTest.java:198 test path "http://www.w3.org/2000/09/xmldsig#sha1"
  132. src/test/java/org/apache/xml/security/test/stax/signature/SignatureEncryptionTest.java:260 test path "http://www.w3.org/2000/09/xmldsig#sha1"
  133. src/test/java/org/apache/xml/security/test/stax/signature/SignatureEncryptionTest.java:322 test path "http://www.w3.org/2000/09/xmldsig#sha1"
  134. src/test/java/org/apache/xml/security/test/stax/signature/SignatureHMACCreationTest.java:60 test path String signatureAlgorithm = "http://www.w3.org/2000/09/xmldsig#hmac-sha1";
  135. src/test/java/org/apache/xml/security/test/stax/signature/SignatureHMACCreationTest.java:70 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  136. src/test/java/org/apache/xml/security/test/stax/signature/SignatureHMACCreationTest.java:104 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  137. src/test/java/org/apache/xml/security/test/stax/signature/SignatureHMACCreationTest.java:138 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  138. src/test/java/org/apache/xml/security/test/stax/signature/SignatureHMACCreationTest.java:172 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  139. src/test/java/org/apache/xml/security/test/stax/signature/SignatureHMACCreationTest.java:206 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  140. src/test/java/org/apache/xml/security/test/stax/signature/SignatureHMACCreationTest.java:242 test path "http://www.w3.org/2000/09/xmldsig#sha1");
  141. src/test/java/org/apache/xml/security/test/stax/signature/SignatureHMACVerificationTest.java:59 test path String signatureAlgorithm = "http://www.w3.org/2000/09/xmldsig#hmac-sha1";
  142. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationMaxRefTest.java:89 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key
  143. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationMaxTransTest.java:86 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key
  144. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationReferenceURIResolverRemoteReferenceTest.java:94 test path "http://www.w3.org/2000/09/xmldsig#sha1",
  145. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationReferenceURIResolverRemoteReferenceTest.java:102 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1",
  146. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationReferenceURIResolverRemoteReferenceTest.java:152 test path "http://www.w3.org/2000/09/xmldsig#sha1",
  147. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationReferenceURIResolverRemoteReferenceTest.java:160 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1",
  148. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationReferenceURIResolverRemoteReferenceTest.java:218 test path "http://www.w3.org/2000/09/xmldsig#sha1",
  149. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationReferenceURIResolverRemoteReferenceTest.java:226 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1",
  150. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationReferenceURIResolverTest.java:87 test path "http://www.w3.org/2000/09/xmldsig#sha1",
  151. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationReferenceURIResolverTest.java:95 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1",
  152. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationReferenceURIResolverTest.java:154 test path "http://www.w3.org/2000/09/xmldsig#sha1",
  153. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationReferenceURIResolverTest.java:162 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1",
  154. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationReferenceURIResolverTest.java:211 test path "http://www.w3.org/2000/09/xmldsig#sha1",
  155. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationReferenceURIResolverTest.java:219 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1",
  156. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:99 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key
  157. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:172 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key
  158. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:251 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key
  159. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:259 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key
  160. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:308 test path "http://www.w3.org/2000/09/xmldsig#sha1",
  161. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:319 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key, referenceInfos
  162. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:364 test path "http://www.w3.org/2000/09/xmldsig#sha1",
  163. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:375 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key, referenceInfos
  164. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:411 test path SecretKey key = new SecretKeySpec(hmacKey, "http://www.w3.org/2000/09/xmldsig#hmac-sha1");
  165. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:417 test path "http://www.w3.org/2000/09/xmldsig#hmac-sha1", document, localNames, key
  166. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:450 test path "http://www.w3.org/2000/09/xmldsig#sha1",
  167. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:451 test path "http://www.w3.org/2000/09/xmldsig#hmac-sha1");
  168. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:488 test path SecretKey key = new SecretKeySpec(hmacKey, "http://www.w3.org/2000/09/xmldsig#hmac-sha1");
  169. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:494 test path "http://www.w3.org/2000/09/xmldsig#hmac-sha1", document, localNames, key
  170. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:518 test path key = new SecretKeySpec(badKey, "http://www.w3.org/2000/09/xmldsig#hmac-sha1");
  171. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:563 test path "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1", document, localNames, key
  172. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:593 test path "http://www.w3.org/2000/09/xmldsig#sha1",
  173. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:594 test path "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1");
  174. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:638 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  175. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:669 test path "http://www.w3.org/2000/09/xmldsig#sha1",
  176. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:670 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1");
  177. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:714 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  178. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:745 test path "http://www.w3.org/2000/09/xmldsig#sha1",
  179. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:746 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1");
  180. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:866 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key
  181. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:944 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key
  182. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:1032 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key
  183. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:1108 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key
  184. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:1181 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1",
  185. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:1309 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  186. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:1352 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key
  187. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:1403 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key
  188. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:1466 test path "http://www.w3.org/2000/09/xmldsig#sha1",
  189. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:1474 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key, referenceInfos
  190. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:1530 test path "http://www.w3.org/2000/09/xmldsig#sha1",
  191. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:1538 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key, referenceInfos
  192. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-3des-ka-dh.xml:9 test path <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
  193. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-3des-kt-rsa_oaep_sha1.xml:9 test path <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>
  194. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes128-ka-dh.xml:9 test path <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
  195. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes128-kt-rsa_oaep_sha1.xml:9 test path <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>
  196. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes192-ka-dh.xml:9 test path <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
  197. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes192-kt-rsa_oaep_sha1.xml:9 test path <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>
  198. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes256-ka-dh.xml:9 test path <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
  199. src/test/resources/com/phaos/phaos-xmlenc-3/enc-text-aes256-kt-rsa_oaep_sha1.xml:10 test path <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>
  200. src/test/resources/com/rsasecurity/bdournaee/certj201_enveloped.xml:7 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>

Showing the first 200. The CBOM has every one.

xmldsig.algorithm · CWE-327
3DES Already broken 90 places See details

XML signature or encryption algorithm

An XML Signature or XML Encryption algorithm URI - SAML, XAdES or WS-Security. The URI names the algorithm exactly, and a signature URI names its digest as well, so `#rsa-sha1` reports both the key and the broken digest.

Federated login and signed XML documents name their cryptography in a web address. Some of those addresses name algorithms that are already broken.

What to do. Move off `#rsa-sha1` first: that signature is forgeable today, with no quantum computer involved. The key algorithm changes with the wider migration.

  1. src/main/java/org/apache/xml/security/encryption/XMLCipherParameters.java:45 "http://www.w3.org/2001/04/xmlenc#kw-tripledes";
  2. src/main/java/org/apache/xml/security/resource/config.xml:439 <Algorithm URI="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"
  3. src/main/java/org/apache/xml/security/resource/config.xml:566 <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-tripledes"
  4. src/main/resources/security-config.xml:388 <Algorithm URI="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"
  5. src/main/resources/security-config.xml:515 <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-tripledes"
  6. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:125 test path "http://www.w3.org/2001/04/xmlenc#tripledes-cbc", secretKey, null, null, document,
  7. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:161 test path securityEventListener, "http://www.w3.org/2001/04/xmlenc#tripledes-cbc", null);
  8. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:178 test path "http://www.w3.org/2001/04/xmlenc#tripledes-cbc", secretKey, null, null, document,
  9. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:217 test path securityEventListener, "http://www.w3.org/2001/04/xmlenc#tripledes-cbc", null);
  10. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:291 test path "http://www.w3.org/2001/04/xmlenc#tripledes-cbc", secretKey, null, null, document,
  11. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:334 test path securityEventListener, "http://www.w3.org/2001/04/xmlenc#tripledes-cbc", null);
  12. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:566 test path "http://www.w3.org/2001/04/xmlenc#kw-tripledes", kek, document, localNames, true
  13. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:606 test path "http://www.w3.org/2001/04/xmlenc#kw-tripledes");
  14. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:625 test path "http://www.w3.org/2001/04/xmlenc#tripledes-cbc", secretKey,
  15. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:664 test path securityEventListener, "http://www.w3.org/2001/04/xmlenc#tripledes-cbc", "");
  16. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:871 test path "http://www.w3.org/2001/04/xmlenc#tripledes-cbc", secretKey,
  17. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:909 test path securityEventListener, "http://www.w3.org/2001/04/xmlenc#tripledes-cbc", "");
  18. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:931 test path "http://www.w3.org/2001/04/xmlenc#tripledes-cbc", secretKey,
  19. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:976 test path securityEventListener, "http://www.w3.org/2001/04/xmlenc#tripledes-cbc", "");
  20. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:998 test path "http://www.w3.org/2001/04/xmlenc#tripledes-cbc", secretKey,
  21. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:1043 test path securityEventListener, "http://www.w3.org/2001/04/xmlenc#tripledes-cbc", "");
  22. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:1265 test path "http://www.w3.org/2001/04/xmlenc#tripledes-cbc", secretKey, null, null, document,
  23. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:1767 test path "http://www.w3.org/2001/04/xmlenc#tripledes-cbc", secretKey, null, null, document,
  24. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:1809 test path securityEventListener, "http://www.w3.org/2001/04/xmlenc#tripledes-cbc", null);
  25. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:1826 test path "http://www.w3.org/2001/04/xmlenc#tripledes-cbc", secretKey, null, null, document,
  26. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:1866 test path securityEventListener, "http://www.w3.org/2001/04/xmlenc#tripledes-cbc", null);
  27. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:1882 test path "http://www.w3.org/2001/04/xmlenc#tripledes-cbc", secretKey, null, null, document,
  28. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:1927 test path securityEventListener, "http://www.w3.org/2001/04/xmlenc#tripledes-cbc", null);
  29. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:103 test path properties.setEncryptionSymAlgorithm("http://www.w3.org/2001/04/xmlenc#tripledes-cbc");
  30. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:132 test path decryptUsingDOM("http://www.w3.org/2001/04/xmlenc#tripledes-cbc", key, null, document);
  31. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:150 test path properties.setEncryptionSymAlgorithm("http://www.w3.org/2001/04/xmlenc#tripledes-cbc");
  32. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:177 test path decryptUsingDOM("http://www.w3.org/2001/04/xmlenc#tripledes-cbc", key, null, document);
  33. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:195 test path properties.setEncryptionSymAlgorithm("http://www.w3.org/2001/04/xmlenc#tripledes-cbc");
  34. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:231 test path properties.setEncryptionSymAlgorithm("http://www.w3.org/2001/04/xmlenc#tripledes-cbc");
  35. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:260 test path decryptUsingDOM("http://www.w3.org/2001/04/xmlenc#tripledes-cbc", key, null, document);
  36. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:326 test path properties.setEncryptionSymAlgorithm("http://www.w3.org/2001/04/xmlenc#tripledes-cbc");
  37. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:944 test path properties.setEncryptionKeyTransportAlgorithm("http://www.w3.org/2001/04/xmlenc#kw-tripledes");
  38. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1001 test path properties.setEncryptionSymAlgorithm("http://www.w3.org/2001/04/xmlenc#tripledes-cbc");
  39. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1030 test path decryptUsingDOM("http://www.w3.org/2001/04/xmlenc#tripledes-cbc", key, null, document);
  40. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1214 test path properties.setEncryptionSymAlgorithm("http://www.w3.org/2001/04/xmlenc#tripledes-cbc");
  41. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1243 test path decryptUsingDOM("http://www.w3.org/2001/04/xmlenc#tripledes-cbc", key, null, document);
  42. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1265 test path properties.setEncryptionSymAlgorithm("http://www.w3.org/2001/04/xmlenc#tripledes-cbc");
  43. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1300 test path decryptUsingDOM("http://www.w3.org/2001/04/xmlenc#tripledes-cbc", key, null, document);
  44. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1326 test path properties.setEncryptionSymAlgorithm("http://www.w3.org/2001/04/xmlenc#tripledes-cbc");
  45. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1361 test path decryptUsingDOM("http://www.w3.org/2001/04/xmlenc#tripledes-cbc", key, null, document);
  46. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionCreationTest.java:291 test path String algorithm = "http://www.w3.org/2001/04/xmlenc#tripledes-cbc";
  47. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionCreationTest.java:297 test path String wrappingAlgorithm = "http://www.w3.org/2001/04/xmlenc#kw-tripledes";
  48. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionCreationTest.java:346 test path String algorithm = "http://www.w3.org/2001/04/xmlenc#tripledes-cbc";
  49. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionCreationTest.java:400 test path String algorithm = "http://www.w3.org/2001/04/xmlenc#tripledes-cbc";
  50. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionCreationTest.java:454 test path String algorithm = "http://www.w3.org/2001/04/xmlenc#tripledes-cbc";
  51. src/test/java/org/apache/xml/security/test/stax/encryption/SymmetricEncryptionCreationTest.java:407 test path String algorithm = "http://www.w3.org/2001/04/xmlenc#tripledes-cbc";
  52. src/test/java/org/apache/xml/security/test/stax/encryption/SymmetricEncryptionVerificationTest.java:440 test path String algorithm = "http://www.w3.org/2001/04/xmlenc#tripledes-cbc";
  53. src/test/java/org/apache/xml/security/test/stax/signature/SignatureEncryptionTest.java:80 test path properties.setEncryptionSymAlgorithm("http://www.w3.org/2001/04/xmlenc#tripledes-cbc");
  54. src/test/java/org/apache/xml/security/test/stax/signature/SignatureEncryptionTest.java:99 test path decryptUsingDOM("http://www.w3.org/2001/04/xmlenc#tripledes-cbc", encryptionKey, null, document);
  55. src/test/java/org/apache/xml/security/test/stax/signature/SignatureEncryptionTest.java:134 test path properties.setEncryptionSymAlgorithm("http://www.w3.org/2001/04/xmlenc#tripledes-cbc");
  56. src/test/java/org/apache/xml/security/test/stax/signature/SignatureEncryptionTest.java:153 test path decryptUsingDOM("http://www.w3.org/2001/04/xmlenc#tripledes-cbc", encryptionKey, null, document);
  57. src/test/java/org/apache/xml/security/test/stax/signature/SignatureEncryptionTest.java:188 test path properties.setEncryptionSymAlgorithm("http://www.w3.org/2001/04/xmlenc#tripledes-cbc");
  58. src/test/java/org/apache/xml/security/test/stax/signature/SignatureEncryptionTest.java:215 test path decryptUsingDOM("http://www.w3.org/2001/04/xmlenc#tripledes-cbc", encryptionKey, null, document);
  59. src/test/java/org/apache/xml/security/test/stax/signature/SignatureEncryptionTest.java:250 test path properties.setEncryptionSymAlgorithm("http://www.w3.org/2001/04/xmlenc#tripledes-cbc");
  60. src/test/java/org/apache/xml/security/test/stax/signature/SignatureEncryptionTest.java:277 test path decryptUsingDOM("http://www.w3.org/2001/04/xmlenc#tripledes-cbc", encryptionKey, null, document);
  61. src/test/java/org/apache/xml/security/test/stax/signature/SignatureEncryptionTest.java:312 test path properties.setEncryptionSymAlgorithm("http://www.w3.org/2001/04/xmlenc#tripledes-cbc");
  62. src/test/java/org/apache/xml/security/test/stax/signature/SignatureEncryptionTest.java:342 test path decryptUsingDOM("http://www.w3.org/2001/04/xmlenc#tripledes-cbc", encryptionKey, null, document);
  63. src/test/resources/com/phaos/phaos-xmlenc-3/bad-alg-enc-element-aes128-kw-3des.xml:8 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#kw-tripledes"/>
  64. src/test/resources/com/phaos/phaos-xmlenc-3/enc-content-3des-kw-aes192.xml:6 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
  65. src/test/resources/com/phaos/phaos-xmlenc-3/enc-content-aes128-kw-3des.xml:9 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#kw-tripledes"/>
  66. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-3des-ka-dh.xml:5 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
  67. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-3des-kt-rsa1_5.xml:5 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
  68. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-3des-kt-rsa_oaep_sha1.xml:5 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
  69. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-3des-kt-rsa_oaep_sha256.xml:5 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
  70. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-3des-kt-rsa_oaep_sha512.xml:5 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
  71. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-3des-kw-3des.xml:5 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
  72. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-3des-kw-3des.xml:8 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#kw-tripledes"/>
  73. src/test/resources/com/phaos/phaos-xmlenc-3/enc-text-3des-kw-aes256.xml:6 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
  74. src/test/resources/config-xalan.xml:434 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"
  75. src/test/resources/config-xalan.xml:561 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-tripledes"
  76. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-content-tripledes-cbc.xml:16 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc" />
  77. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-data-aes256-cbc-kw-tripledes.xml:6 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#kw-tripledes" />
  78. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-data-tripledes-cbc-rsa-oaep-mgf1p-sha256.xml:3 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc" />
  79. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-data-tripledes-cbc-rsa-oaep-mgf1p.xml:3 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc" />
  80. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-element-tripledes-cbc-kw-aes128.xml:15 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc" />
  81. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encsig-hmac-sha256-kw-tripledes-dh.xml:16 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#kw-tripledes" />
  82. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encsig-ripemd160-hmac-ripemd160-kw-tripledes.xml:16 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#kw-tripledes" />
  83. src/test/resources/security-config-allow-same-doc.xml:388 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"
  84. src/test/resources/security-config-allow-same-doc.xml:515 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-tripledes"
  85. src/test/resources/security-config-ex-manifests.xml:388 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"
  86. src/test/resources/security-config-ex-manifests.xml:515 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-tripledes"
  87. src/test/resources/security-config-max-ref-per.xml:388 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"
  88. src/test/resources/security-config-max-ref-per.xml:515 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-tripledes"
  89. src/test/resources/security-config-max-trans-per.xml:388 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"
  90. src/test/resources/security-config-max-trans-per.xml:515 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-tripledes"
xmldsig.algorithm · CWE-327
3DES Already broken 35 places See details

Classical public-key cipher through the JCA

`Cipher.getInstance()` with a transformation whose algorithm component is a public-key or legacy symmetric cipher. The transformation string is parsed into algorithm, mode and padding, so `RSA/ECB/PKCS1Padding` is separated from `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`.

This is already unsafe today, with no quantum computer involved. Triple DES is withdrawn by NIST and limited by its 64-bit block, independent of quantum.

What to do. For RSA encryption, move to ML-KEM-768 and keep RSA-OAEP only as the classical half of a hybrid during transition.

  1. src/test/java/org/apache/xml/security/test/dom/algorithms/KeyWrapEncryptionAlgorithmTest.java:217 test path KeyGenerator keygen = KeyGenerator.getInstance("DESede");
  2. src/test/java/org/apache/xml/security/test/dom/algorithms/KeyWrapEncryptionAlgorithmTest.java:222 test path keygen = KeyGenerator.getInstance("DESede");
  3. src/test/java/org/apache/xml/security/test/dom/algorithms/KeyWrapEncryptionAlgorithmTest.java:253 test path KeyGenerator keygen = KeyGenerator.getInstance("DESede");
  4. src/test/java/org/apache/xml/security/test/dom/algorithms/KeyWrapEncryptionAlgorithmTest.java:287 test path KeyGenerator keygen = KeyGenerator.getInstance("DESede");
  5. src/test/java/org/apache/xml/security/test/dom/algorithms/KeyWrapEncryptionAlgorithmTest.java:321 test path KeyGenerator keygen = KeyGenerator.getInstance("DESede");
  6. src/test/java/org/apache/xml/security/test/dom/algorithms/SymmetricEncryptionAlgorithmTest.java:275 test path KeyGenerator keygen = KeyGenerator.getInstance("DESede");
  7. src/test/java/org/apache/xml/security/test/dom/encryption/BobKeyResolver.java:94 test path SecretKeyFactory.getInstance("DESede");
  8. src/test/java/org/apache/xml/security/test/dom/encryption/EncryptContentTest.java:84 test path SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede");
  9. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:727 test path SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede");
  10. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:908 test path SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede");
  11. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:949 test path SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede");
  12. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:1070 test path SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede");
  13. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:618 test path SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede");
  14. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:864 test path SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede");
  15. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:924 test path SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede");
  16. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:991 test path SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede");
  17. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:1052 test path SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede");
  18. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:998 test path SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede");
  19. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1211 test path SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede");
  20. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1262 test path SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede");
  21. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1323 test path SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede");
  22. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1427 test path SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede");
  23. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionCreationTest.java:288 test path KeyGenerator keygen = KeyGenerator.getInstance("DESede");
  24. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionCreationTest.java:295 test path keygen = KeyGenerator.getInstance("DESede");
  25. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionCreationTest.java:343 test path KeyGenerator keygen = KeyGenerator.getInstance("DESede");
  26. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionCreationTest.java:397 test path KeyGenerator keygen = KeyGenerator.getInstance("DESede");
  27. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionCreationTest.java:451 test path KeyGenerator keygen = KeyGenerator.getInstance("DESede");
  28. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionVerificationTest.java:294 test path KeyGenerator keygen = KeyGenerator.getInstance("DESede");
  29. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionVerificationTest.java:299 test path keygen = KeyGenerator.getInstance("DESede");
  30. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionVerificationTest.java:351 test path KeyGenerator keygen = KeyGenerator.getInstance("DESede");
  31. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionVerificationTest.java:407 test path KeyGenerator keygen = KeyGenerator.getInstance("DESede");
  32. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionVerificationTest.java:463 test path KeyGenerator keygen = KeyGenerator.getInstance("DESede");
  33. src/test/java/org/apache/xml/security/test/stax/encryption/SymmetricEncryptionCreationTest.java:403 test path KeyGenerator keygen = KeyGenerator.getInstance("DESede");
  34. src/test/java/org/apache/xml/security/test/stax/encryption/SymmetricEncryptionVerificationTest.java:434 test path KeyGenerator keygen = KeyGenerator.getInstance("DESede");
  35. src/test/java/org/apache/xml/security/test/stax/signature/SignatureEncryptionTest.java:380 test path SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede");
java.cipher · CWE-327
RSAES-PKCS1v15 Already broken 30 places See details

XML signature or encryption algorithm

An XML Signature or XML Encryption algorithm URI - SAML, XAdES or WS-Security. The URI names the algorithm exactly, and a signature URI names its digest as well, so `#rsa-sha1` reports both the key and the broken digest.

Federated login and signed XML documents name their cryptography in a web address. Some of those addresses name algorithms that are already broken.

What to do. Move off `#rsa-sha1` first: that signature is forgeable today, with no quantum computer involved. The key algorithm changes with the wider migration.

  1. src/main/java/org/apache/xml/security/encryption/XMLCipherParameters.java:36 "http://www.w3.org/2001/04/xmlenc#rsa-1_5";
  2. src/main/java/org/apache/xml/security/resource/config.xml:538 <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-1_5"
  3. src/main/resources/security-config.xml:487 <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-1_5"
  4. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:430 test path "http://www.w3.org/2001/04/xmlenc#rsa-1_5", pub, document, localNames, true
  5. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:470 test path "http://www.w3.org/2001/04/xmlenc#rsa-1_5");
  6. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:495 test path "http://www.w3.org/2001/04/xmlenc#rsa-1_5", pub, true, document, localNames, true
  7. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:535 test path "http://www.w3.org/2001/04/xmlenc#rsa-1_5");
  8. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:1318 test path "http://www.w3.org/2001/04/xmlenc#rsa-1_5", pub, document, localNames, true
  9. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:428 test path properties.setEncryptionKeyTransportAlgorithm("http://www.w3.org/2001/04/xmlenc#rsa-1_5");
  10. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:485 test path properties.setEncryptionKeyTransportAlgorithm("http://www.w3.org/2001/04/xmlenc#rsa-1_5");
  11. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:543 test path properties.setEncryptionKeyTransportAlgorithm("http://www.w3.org/2001/04/xmlenc#rsa-1_5");
  12. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:602 test path properties.setEncryptionKeyTransportAlgorithm("http://www.w3.org/2001/04/xmlenc#rsa-1_5");
  13. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:653 test path properties.setEncryptionKeyTransportAlgorithm("http://www.w3.org/2001/04/xmlenc#rsa-1_5");
  14. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:709 test path properties.setEncryptionKeyTransportAlgorithm("http://www.w3.org/2001/04/xmlenc#rsa-1_5");
  15. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:776 test path properties.setEncryptionKeyTransportAlgorithm("http://www.w3.org/2001/04/xmlenc#rsa-1_5");
  16. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:832 test path properties.setEncryptionKeyTransportAlgorithm("http://www.w3.org/2001/04/xmlenc#rsa-1_5");
  17. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:888 test path properties.setEncryptionKeyTransportAlgorithm("http://www.w3.org/2001/04/xmlenc#rsa-1_5");
  18. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionCreationTest.java:351 test path String wrappingAlgorithm = "http://www.w3.org/2001/04/xmlenc#rsa-1_5";
  19. src/test/resources/com/phaos/phaos-xmlenc-3/enc-content-aes256-kt-rsa1_5.xml:10 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
  20. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-3des-kt-rsa1_5.xml:8 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
  21. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes128-kt-rsa1_5.xml:8 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
  22. src/test/resources/com/phaos/phaos-xmlenc-3/enc-text-aes192-kt-rsa1_5.xml:9 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
  23. src/test/resources/config-xalan.xml:533 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-1_5"
  24. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-element-aes128-cbc-rsa-1_5.xml:18 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5" />
  25. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encsig-hmac-sha256-rsa-1_5.xml:16 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5" />
  26. src/test/resources/org/apache/xml/security/encryption/encryptedKey.xml:2 test path <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5">
  27. src/test/resources/security-config-allow-same-doc.xml:487 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-1_5"
  28. src/test/resources/security-config-ex-manifests.xml:487 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-1_5"
  29. src/test/resources/security-config-max-ref-per.xml:487 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-1_5"
  30. src/test/resources/security-config-max-trans-per.xml:487 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-1_5"
xmldsig.algorithm · CWE-327
3DES Already broken 21 places See details

Key material constructed for a named algorithm

`new SecretKeySpec(bytes, "AES")` and the other key-spec constructors name the algorithm as an argument rather than through `getInstance()`. Code that wraps raw bytes into a key this way often never calls `getInstance()` at all, so the algorithm is invisible to a scan that only looks at the factories.

This wraps raw bytes into a key for a named algorithm. It is part of the same migration as whatever uses that key.

What to do. Wherever this key is used, the same migration applies as to the call that consumes it. Trace it to the operation and treat the two together.

  1. src/test/java/org/apache/xml/security/test/dom/encryption/BobKeyResolver.java:92 test path new DESedeKeySpec("abcdefghijklmnopqrstuvwx".getBytes(StandardCharsets.US_ASCII));
  2. src/test/java/org/apache/xml/security/test/dom/encryption/EncryptContentTest.java:83 test path DESedeKeySpec keySpec = new DESedeKeySpec(bits192);
  3. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:645 test path DESedeKeySpec keySpec = new DESedeKeySpec(bits192);
  4. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:726 test path DESedeKeySpec keySpec = new DESedeKeySpec(passPhrase);
  5. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:907 test path DESedeKeySpec keySpec = new DESedeKeySpec(passPhrase);
  6. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:948 test path DESedeKeySpec keySpec = new DESedeKeySpec(passPhrase);
  7. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:1069 test path DESedeKeySpec keySpec = new DESedeKeySpec(bits192);
  8. src/test/java/org/apache/xml/security/test/stax/encryption/BaltimoreEncTest.java:115 test path SecretKey secretKey = new SecretKeySpec(keyBytes, "DESede");
  9. src/test/java/org/apache/xml/security/test/stax/encryption/BaltimoreEncTest.java:328 test path SecretKey secretKey = new SecretKeySpec(keyBytes, "DESede");
  10. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:552 test path DESedeKeySpec keySpec = new DESedeKeySpec(bits192);
  11. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:617 test path DESedeKeySpec keySpec = new DESedeKeySpec(passPhrase);
  12. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:863 test path DESedeKeySpec keySpec = new DESedeKeySpec(passPhrase);
  13. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:923 test path DESedeKeySpec keySpec = new DESedeKeySpec(bits192);
  14. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:990 test path DESedeKeySpec keySpec = new DESedeKeySpec(bits192);
  15. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:1051 test path DESedeKeySpec keySpec = new DESedeKeySpec(bits192);
  16. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:997 test path DESedeKeySpec keySpec = new DESedeKeySpec(passPhrase);
  17. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1210 test path DESedeKeySpec keySpec = new DESedeKeySpec(passPhrase);
  18. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1261 test path DESedeKeySpec keySpec = new DESedeKeySpec(bits192);
  19. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1322 test path DESedeKeySpec keySpec = new DESedeKeySpec(bits192);
  20. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1426 test path DESedeKeySpec keySpec = new DESedeKeySpec(bits192);
  21. src/test/java/org/apache/xml/security/test/stax/signature/SignatureEncryptionTest.java:379 test path DESedeKeySpec keySpec = new DESedeKeySpec(bits192);
java.keyspec · CWE-327
MD5 Already broken 11 places See details

XML signature or encryption algorithm

An XML Signature or XML Encryption algorithm URI - SAML, XAdES or WS-Security. The URI names the algorithm exactly, and a signature URI names its digest as well, so `#rsa-sha1` reports both the key and the broken digest.

Federated login and signed XML documents name their cryptography in a web address. Some of those addresses name algorithms that are already broken.

What to do. Move off `#rsa-sha1` first: that signature is forgeable today, with no quantum computer involved. The key algorithm changes with the wider migration.

  1. src/main/java/org/apache/xml/security/resource/config.xml:151 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#md5"
  2. src/main/resources/security-config.xml:70 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#md5"
  3. src/test/java/org/apache/xml/security/test/dom/secure_val/ForbiddenAlgorithmTest.java:57 test path String error = "It is forbidden to use algorithm http://www.w3.org/2001/04/xmldsig-more#md5 "
  4. src/test/resources/config-xalan.xml:146 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#md5"
  5. src/test/resources/interop/c14n/Y2/signature-joseph-exc.xml:29 test path <DigestMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#md5" />
  6. src/test/resources/interop/c14n/Y2/signature-joseph-exc.xml:41 test path <DigestMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#md5" />
  7. src/test/resources/interop/c14n/Y2/signature-joseph-exc.xml:55 test path <DigestMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#md5" />
  8. src/test/resources/security-config-allow-same-doc.xml:70 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#md5"
  9. src/test/resources/security-config-ex-manifests.xml:70 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#md5"
  10. src/test/resources/security-config-max-ref-per.xml:70 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#md5"
  11. src/test/resources/security-config-max-trans-per.xml:70 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#md5"
xmldsig.algorithm · CWE-327
SHA-1 Already broken 8 places See details

Mask-generation digest named for RSA padding

`MGF1ParameterSpec.SHA256` names the digest inside RSA-OAEP and RSA-PSS padding. It is a separate choice from the digest the signature or the cipher uses, it is frequently left at SHA-1 by default, and a static import of it - `import static java.security.spec.MGF1ParameterSpec.SHA512` - is the only place the choice appears in the file that makes it.

This picks the hash used inside RSA padding. It matters because the default is often SHA-1, which is broken today without any quantum computer.

What to do. The mask-generation digest travels with the RSA key it pads. When that key moves to ML-KEM or ML-DSA the padding goes with it; until then, SHA-256 or better.

  1. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:726 = new PSSParameterSpec("SHA-1", "MGF1", MGF1ParameterSpec.SHA1,
  2. src/main/java/org/apache/xml/security/algorithms/implementations/SignatureBaseRSA.java:416 = new PSSParameterSpec("SHA-1", "MGF1", MGF1ParameterSpec.SHA1,
  3. src/main/java/org/apache/xml/security/encryption/XMLCipherUtil.java:124 MGF1ParameterSpec mgfParameterSpec = new MGF1ParameterSpec("SHA-1");
  4. src/main/java/org/apache/xml/security/encryption/XMLCipherUtil.java:143 return new MGF1ParameterSpec("SHA-1");
  5. src/main/java/org/apache/xml/security/encryption/XMLCipherUtil.java:148 return new MGF1ParameterSpec("SHA-1");
  6. src/main/java/org/apache/xml/security/encryption/XMLCipherUtil.java:159 return new MGF1ParameterSpec("SHA-1");
  7. src/main/java/org/apache/xml/security/stax/impl/processor/input/XMLEncryptedKeyInputHandler.java:219 MGF1ParameterSpec mgfParameterSpec = new MGF1ParameterSpec("SHA-1");
  8. src/main/java/org/apache/xml/security/stax/impl/processor/output/XMLEncryptOutputProcessor.java:218 MGF1ParameterSpec mgfParameterSpec = new MGF1ParameterSpec("SHA-1");
java.mgf1 · CWE-327
SHA-1 Already broken 3 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.

config.algorithm-setting · CWE-327
SHA-1 Already broken 3 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.

This is already unsafe today, with no quantum computer involved. SHAttered and subsequent work produced practical collisions; NIST withdrew SHA-1 in 2030 guidance and it is already unacceptable for signatures.

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/apache/xml/security/stax/impl/processor/input/XMLEncryptedKeyInputHandler.java:313 return MessageDigest.getInstance("SHA-1").digest(inputBytes);
  2. src/test/java/org/apache/xml/security/test/dom/algorithms/DigestAlgorithmTest.java:92 test path MessageDigest md = MessageDigest.getInstance("SHA-1");
  3. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/ReferenceTest.java:299 test path MessageDigest md = MessageDigest.getInstance("SHA1");
java.messagedigest · CWE-328
3DES192-bit Already broken 2 places See details

Classical public-key cipher through the JCA

`Cipher.getInstance()` with a transformation whose algorithm component is a public-key or legacy symmetric cipher. The transformation string is parsed into algorithm, mode and padding, so `RSA/ECB/PKCS1Padding` is separated from `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`.

This is already unsafe today, with no quantum computer involved. Triple DES is withdrawn by NIST and limited by its 64-bit block, independent of quantum.

What to do. For RSA encryption, move to ML-KEM-768 and keep RSA-OAEP only as the classical half of a hybrid during transition.

  1. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:646 test path SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede");
  2. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:553 test path SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede");
java.cipher · CWE-327
DES Already broken 2 places See details

Key material constructed for a named algorithm

`new SecretKeySpec(bytes, "AES")` and the other key-spec constructors name the algorithm as an argument rather than through `getInstance()`. Code that wraps raw bytes into a key this way often never calls `getInstance()` at all, so the algorithm is invisible to a scan that only looks at the factories.

This wraps raw bytes into a key for a named algorithm. It is part of the same migration as whatever uses that key.

What to do. Wherever this key is used, the same migration applies as to the call that consumes it. Trace it to the operation and treat the two together.

  1. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/XMLSignContextTest.java:58 test path SecretKey sk = new SecretKeySpec(new byte[8], "DES");
  2. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/XMLValidateContextTest.java:49 test path SecretKey sk = new SecretKeySpec(new byte[8], "DES");
java.keyspec · CWE-327
3DES Already broken 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/apache/xml/security/algorithms/JCEMapper.java:267 new Algorithm("DESede", "DESede/CBC/ISO10126Padding", "BlockEncryption", 192, 64)
java.transformation · CWE-327
MD5 Already broken 1 place 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.

This is already unsafe today, with no quantum computer involved. Practical chosen-prefix collisions exist; MD5 has no remaining security as a digest.

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

  1. src/test/java/org/apache/xml/security/test/dom/algorithms/DigestAlgorithmTest.java:182 test path MessageDigest md = MessageDigest.getInstance("MD5");
java.messagedigest · CWE-328
RSAES-PKCS1v15 Already broken Recorded traffic 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/apache/xml/security/algorithms/JCEMapper.java:311 new Algorithm("RSA", "RSA/ECB/PKCS1Padding", "KeyTransport")
java.transformation · CWE-327
RSASSA-PKCS1v15 Quantum-vulnerable Renamed import 147 places See details

XML signature or encryption algorithm

An XML Signature or XML Encryption algorithm URI - SAML, XAdES or WS-Security. The URI names the algorithm exactly, and a signature URI names its digest as well, so `#rsa-sha1` reports both the key and the broken digest.

Federated login and signed XML documents name their cryptography in a web address. Some of those addresses name algorithms that are already broken.

What to do. Move off `#rsa-sha1` first: that signature is forgeable today, with no quantum computer involved. The key algorithm changes with the wider migration.

  1. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:70 "http://www.w3.org/2001/04/xmldsig-more#rsa-sha224";
  2. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:72 "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256";
  3. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:74 "http://www.w3.org/2001/04/xmldsig-more#rsa-sha384";
  4. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:76 "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512";
  5. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:200 } else if (alg.equals(RSA_SHA224)) {
  6. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:202 } else if (alg.equals(RSA_SHA256)) {
  7. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:204 } else if (alg.equals(RSA_SHA384)) {
  8. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:206 } else if (alg.equals(RSA_SHA512)) {
  9. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:643 return RSA_SHA224;
  10. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:661 return RSA_SHA256;
  11. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:679 return RSA_SHA384;
  12. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:697 return RSA_SHA512;
  13. src/main/java/org/apache/xml/security/resource/config.xml:81 <SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
  14. src/main/java/org/apache/xml/security/resource/config.xml:90 <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha224"
  15. src/main/java/org/apache/xml/security/resource/config.xml:92 <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
  16. src/main/java/org/apache/xml/security/resource/config.xml:94 <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
  17. src/main/java/org/apache/xml/security/resource/config.xml:96 <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
  18. src/main/java/org/apache/xml/security/resource/config.xml:249 <Algorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
  19. src/main/java/org/apache/xml/security/resource/config.xml:256 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha224"
  20. src/main/java/org/apache/xml/security/resource/config.xml:264 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
  21. src/main/java/org/apache/xml/security/resource/config.xml:272 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
  22. src/main/java/org/apache/xml/security/resource/config.xml:280 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
  23. src/main/java/org/apache/xml/security/stax/ext/XMLSec.java:149 securityProperties.setSignatureAlgorithm("http://www.w3.org/2000/09/xmldsig#rsa-sha1");
  24. src/main/resources/security-config.xml:198 <Algorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
  25. src/main/resources/security-config.xml:205 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha224"
  26. src/main/resources/security-config.xml:213 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
  27. src/main/resources/security-config.xml:221 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
  28. src/main/resources/security-config.xml:229 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
  29. src/test/java/org/apache/xml/security/test/dom/c14n/implementations/Santuario273Test.java:52 test path + " <SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\" />\n"
  30. src/test/java/org/apache/xml/security/test/dom/c14n/implementations/Santuario273Test.java:71 test path + " <SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\"></SignatureMethod>\n"
  31. src/test/java/org/apache/xml/security/test/dom/transforms/implementations/Xpath2TransformationTest.java:92 test path "<ds:SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\"></ds:SignatureMethod>\r\n" +
  32. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/CreateInteropXMLDSig11Test.java:149 test path ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", null);
  33. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/CreateInteropXMLDSig11Test.java:151 test path ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha384", null);
  34. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/CreateInteropXMLDSig11Test.java:153 test path ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha512", null);
  35. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/PKSignatureAlgorithmTest.java:135 test path rsaSha1 = fac.newSignatureMethod("http://www.w3.org/2000/09/xmldsig#rsa-sha1", null);
  36. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/PKSignatureAlgorithmTest.java:136 test path rsaSha224 = fac.newSignatureMethod("http://www.w3.org/2001/04/xmldsig-more#rsa-sha224", null);
  37. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/PKSignatureAlgorithmTest.java:137 test path rsaSha256 = fac.newSignatureMethod("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", null);
  38. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/PKSignatureAlgorithmTest.java:138 test path rsaSha384 = fac.newSignatureMethod("http://www.w3.org/2001/04/xmldsig-more#rsa-sha384", null);
  39. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/PKSignatureAlgorithmTest.java:139 test path rsaSha512 = fac.newSignatureMethod("http://www.w3.org/2001/04/xmldsig-more#rsa-sha512", null);
  40. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/SignatureDigestMethodTest.java:93 test path ("http://www.w3.org/2000/09/xmldsig#rsa-sha1", null);
  41. src/test/java/org/apache/xml/security/test/stax/STAXSecureDefaultsTest.java:68 test path assertEquals("http://www.w3.org/2000/09/xmldsig#rsa-sha1", sigAlgo,
  42. src/test/java/org/apache/xml/security/test/stax/signature/AbstractSignatureVerificationTest.java:311 test path String signatureMethod = "http://www.w3.org/2000/09/xmldsig#rsa-sha1";
  43. src/test/java/org/apache/xml/security/test/stax/signature/AbstractSignatureVerificationTest.java:319 test path String signatureMethod
  44. src/test/java/org/apache/xml/security/test/stax/signature/AbstractSignatureVerificationTest.java:352 test path assertEquals(signatureMethod, algorithmEvent.getAlgorithmURI());
  45. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:69 test path String signatureAlgorithm = "http://www.w3.org/2000/09/xmldsig#rsa-sha1";
  46. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:101 test path String signatureAlgorithm = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256";
  47. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:133 test path String signatureAlgorithm = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha384";
  48. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:165 test path String signatureAlgorithm = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512";
  49. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureVerificationTest.java:70 test path String signatureAlgorithm = "http://www.w3.org/2000/09/xmldsig#rsa-sha1";
  50. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureVerificationTest.java:108 test path String signatureAlgorithm = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256";
  51. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureVerificationTest.java:146 test path String signatureAlgorithm = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha384";
  52. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureVerificationTest.java:184 test path String signatureAlgorithm = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512";
  53. src/test/java/org/apache/xml/security/test/stax/signature/SignatureCreationTest.java:608 test path properties.setSignatureAlgorithm("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256");
  54. src/test/java/org/apache/xml/security/test/stax/signature/SignatureCreationTest.java:1050 test path properties.setSignatureAlgorithm("http://www.w3.org/2000/09/xmldsig#rsa-sha1");
  55. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestVerificationTest.java:73 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  56. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestVerificationTest.java:118 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  57. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestVerificationTest.java:163 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  58. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestVerificationTest.java:208 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  59. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestVerificationTest.java:253 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  60. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestVerificationTest.java:300 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  61. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestVerificationTest.java:347 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  62. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestVerificationTest.java:394 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  63. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestVerificationTest.java:441 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  64. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestVerificationTest.java:488 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  65. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestVerificationTest.java:535 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  66. src/test/java/org/apache/xml/security/test/stax/signature/SignatureFormattingTest.java:148 test path properties.setSignatureAlgorithm("http://www.w3.org/2001/04/xmldsig-more#rsa-sha512");
  67. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationMaxRefTest.java:89 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key
  68. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationMaxTransTest.java:86 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key
  69. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationReferenceURIResolverRemoteReferenceTest.java:102 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1",
  70. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationReferenceURIResolverRemoteReferenceTest.java:160 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1",
  71. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationReferenceURIResolverRemoteReferenceTest.java:226 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1",
  72. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationReferenceURIResolverTest.java:95 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1",
  73. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationReferenceURIResolverTest.java:162 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1",
  74. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationReferenceURIResolverTest.java:219 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1",
  75. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:99 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key
  76. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:172 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key
  77. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:251 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key
  78. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:259 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key
  79. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:319 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key, referenceInfos
  80. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:375 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key, referenceInfos
  81. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:638 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  82. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:670 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1");
  83. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:714 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  84. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:746 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1");
  85. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:790 test path "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", document, localNames, key,
  86. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:822 test path "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256");
  87. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:866 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key
  88. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:944 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key
  89. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:1032 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key
  90. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:1108 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key
  91. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:1181 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1",
  92. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:1309 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key,
  93. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:1352 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key
  94. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:1403 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key
  95. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:1474 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key, referenceInfos
  96. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:1538 test path "http://www.w3.org/2000/09/xmldsig#rsa-sha1", document, localNames, key, referenceInfos
  97. src/test/resources/com/rsasecurity/bdournaee/certj201_enveloped.xml:7 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
  98. src/test/resources/com/rsasecurity/bdournaee/certj201_enveloping.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
  99. src/test/resources/config-xalan.xml:81 test path <SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
  100. src/test/resources/config-xalan.xml:90 test path <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha224"
  101. src/test/resources/config-xalan.xml:92 test path <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
  102. src/test/resources/config-xalan.xml:94 test path <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
  103. src/test/resources/config-xalan.xml:96 test path <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
  104. src/test/resources/config-xalan.xml:244 test path <Algorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
  105. src/test/resources/config-xalan.xml:251 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha224"
  106. src/test/resources/config-xalan.xml:259 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
  107. src/test/resources/config-xalan.xml:267 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
  108. src/test/resources/config-xalan.xml:275 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
  109. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signature-keyname.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
  110. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signature-retrievalmethod-rawx509crt.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
  111. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signature-x509-crt-crl.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
  112. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signature-x509-crt.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
  113. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signature-x509-is.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
  114. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signature-x509-ski.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
  115. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/signature-x509-sn.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
  116. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloping-rsa-c14n-1.txt:3 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></SignatureMethod>
  117. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloping-rsa.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
  118. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-rsa-c14n-1.txt:3 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></SignatureMethod>
  119. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-rsa.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
  120. src/test/resources/org/apache/xml/security/temp/key/retrieval-from-same-doc.xml:35 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
  121. src/test/resources/org/apache/xml/security/temp/key/signature-retrievalmethod-x509data.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
  122. src/test/resources/org/apache/xml/security/test/javax/xml/crypto/dsig/demo.signed.xml:6 test path <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
  123. src/test/resources/org/apache/xml/security/test/javax/xml/crypto/dsig/invalid-signature.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
  124. src/test/resources/org/apache/xml/security/test/javax/xml/crypto/dsig/signature1.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
  125. src/test/resources/org/apache/xml/security/test/javax/xml/crypto/dsig/signature2.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
  126. src/test/resources/org/apache/xml/security/test/javax/xml/crypto/dsig/signature3.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
  127. src/test/resources/org/apache/xml/security/testcases/SAML2ArtifactResponse.xml:4 test path <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
  128. src/test/resources/security-config-allow-same-doc.xml:198 test path <Algorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
  129. src/test/resources/security-config-allow-same-doc.xml:205 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha224"
  130. src/test/resources/security-config-allow-same-doc.xml:213 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
  131. src/test/resources/security-config-allow-same-doc.xml:221 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
  132. src/test/resources/security-config-allow-same-doc.xml:229 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
  133. src/test/resources/security-config-ex-manifests.xml:198 test path <Algorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
  134. src/test/resources/security-config-ex-manifests.xml:205 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha224"
  135. src/test/resources/security-config-ex-manifests.xml:213 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
  136. src/test/resources/security-config-ex-manifests.xml:221 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
  137. src/test/resources/security-config-ex-manifests.xml:229 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
  138. src/test/resources/security-config-max-ref-per.xml:198 test path <Algorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
  139. src/test/resources/security-config-max-ref-per.xml:205 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha224"
  140. src/test/resources/security-config-max-ref-per.xml:213 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
  141. src/test/resources/security-config-max-ref-per.xml:221 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
  142. src/test/resources/security-config-max-ref-per.xml:229 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
  143. src/test/resources/security-config-max-trans-per.xml:198 test path <Algorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
  144. src/test/resources/security-config-max-trans-per.xml:205 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha224"
  145. src/test/resources/security-config-max-trans-per.xml:213 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
  146. src/test/resources/security-config-max-trans-per.xml:221 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
  147. src/test/resources/security-config-max-trans-per.xml:229 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
xmldsig.algorithm · CWE-327
ECDSA Quantum-vulnerable 81 places See details

XML signature or encryption algorithm

An XML Signature or XML Encryption algorithm URI - SAML, XAdES or WS-Security. The URI names the algorithm exactly, and a signature URI names its digest as well, so `#rsa-sha1` reports both the key and the broken digest.

Federated login and signed XML documents name their cryptography in a web address. Some of those addresses name algorithms that are already broken.

What to do. Move off `#rsa-sha1` first: that signature is forgeable today, with no quantum computer involved. The key algorithm changes with the wider migration.

  1. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:80 "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1";
  2. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:84 "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256";
  3. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:86 "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384";
  4. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:88 "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512";
  5. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:236 } else if (alg.equals(ECDSA_SHA1)) {
  6. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:240 } else if (alg.equals(ECDSA_SHA256)) {
  7. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:242 } else if (alg.equals(ECDSA_SHA384)) {
  8. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:244 } else if (alg.equals(ECDSA_SHA512)) {
  9. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:1042 return ECDSA_SHA1;
  10. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:1086 return ECDSA_SHA256;
  11. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:1108 return ECDSA_SHA384;
  12. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:1130 return ECDSA_SHA512;
  13. src/main/java/org/apache/xml/security/resource/config.xml:119 <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"
  14. src/main/java/org/apache/xml/security/resource/config.xml:123 <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"
  15. src/main/java/org/apache/xml/security/resource/config.xml:125 <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384"
  16. src/main/java/org/apache/xml/security/resource/config.xml:127 <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512"
  17. src/main/java/org/apache/xml/security/resource/config.xml:327 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"
  18. src/main/java/org/apache/xml/security/resource/config.xml:343 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"
  19. src/main/java/org/apache/xml/security/resource/config.xml:351 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384"
  20. src/main/java/org/apache/xml/security/resource/config.xml:359 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512"
  21. src/main/java/org/apache/xml/security/signature/XMLSignature.java:184 "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1";
  22. src/main/java/org/apache/xml/security/signature/XMLSignature.java:192 "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256";
  23. src/main/java/org/apache/xml/security/signature/XMLSignature.java:196 "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384";
  24. src/main/java/org/apache/xml/security/signature/XMLSignature.java:200 "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512";
  25. src/main/resources/security-config.xml:276 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"
  26. src/main/resources/security-config.xml:292 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"
  27. src/main/resources/security-config.xml:300 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384"
  28. src/main/resources/security-config.xml:308 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512"
  29. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/CreateInteropXMLDSig11Test.java:135 test path ("http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1", null);
  30. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/CreateInteropXMLDSig11Test.java:137 test path ("http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256", null);
  31. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/CreateInteropXMLDSig11Test.java:139 test path ("http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384", null);
  32. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/CreateInteropXMLDSig11Test.java:141 test path ("http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512", null);
  33. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/PKSignatureAlgorithmTest.java:158 test path ecdsaSha1 = fac.newSignatureMethod("http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1", null);
  34. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/PKSignatureAlgorithmTest.java:160 test path ecdsaSha256 = fac.newSignatureMethod("http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256", null);
  35. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/PKSignatureAlgorithmTest.java:161 test path ecdsaSha384 = fac.newSignatureMethod("http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384", null);
  36. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/PKSignatureAlgorithmTest.java:162 test path ecdsaSha512 = fac.newSignatureMethod("http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512", null);
  37. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/XMLSignatureBrainpoolTest.java:85 test path @CsvSource({"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256, brainpoolP256r1",
  38. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/XMLSignatureBrainpoolTest.java:86 test path "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256, brainpoolP384r1",
  39. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/XMLSignatureBrainpoolTest.java:87 test path "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256, brainpoolP512r1"
  40. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/XMLSignatureECDSATest.java:90 test path "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1, secp256r1",
  41. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/XMLSignatureECDSATest.java:92 test path "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256, secp256r1",
  42. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/XMLSignatureECDSATest.java:93 test path "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384, secp256r1",
  43. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/XMLSignatureECDSATest.java:94 test path "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512, secp256r1",
  44. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:436 test path String signatureAlgorithm = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1";
  45. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:500 test path String signatureAlgorithm = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256";
  46. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:532 test path String signatureAlgorithm = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384";
  47. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:564 test path String signatureAlgorithm = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512";
  48. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureVerificationTest.java:507 test path String signatureAlgorithm = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1";
  49. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureVerificationTest.java:583 test path String signatureAlgorithm = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256";
  50. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureVerificationTest.java:621 test path String signatureAlgorithm = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384";
  51. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureVerificationTest.java:659 test path String signatureAlgorithm = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512";
  52. src/test/java/org/apache/xml/security/test/stax/signature/SignatureCreationTest.java:692 test path properties.setSignatureAlgorithm("http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1");
  53. src/test/java/org/apache/xml/security/test/stax/signature/SignatureCreationTest.java:733 test path properties.setSignatureAlgorithm("http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256");
  54. src/test/java/org/apache/xml/security/test/stax/signature/SignatureCreationTest.java:1017 test path properties.setSignatureAlgorithm("http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1");
  55. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:563 test path "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1", document, localNames, key
  56. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:594 test path "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1");
  57. src/test/resources/config-xalan.xml:119 test path <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"
  58. src/test/resources/config-xalan.xml:123 test path <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"
  59. src/test/resources/config-xalan.xml:125 test path <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384"
  60. src/test/resources/config-xalan.xml:127 test path <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512"
  61. src/test/resources/config-xalan.xml:322 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"
  62. src/test/resources/config-xalan.xml:338 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"
  63. src/test/resources/config-xalan.xml:346 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384"
  64. src/test/resources/config-xalan.xml:354 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512"
  65. src/test/resources/org/apache/xml/security/samples/input/ecdsaSignature.xml:7 test path <ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"></ds:SignatureMethod>
  66. src/test/resources/security-config-allow-same-doc.xml:276 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"
  67. src/test/resources/security-config-allow-same-doc.xml:292 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"
  68. src/test/resources/security-config-allow-same-doc.xml:300 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384"
  69. src/test/resources/security-config-allow-same-doc.xml:308 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512"
  70. src/test/resources/security-config-ex-manifests.xml:276 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"
  71. src/test/resources/security-config-ex-manifests.xml:292 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"
  72. src/test/resources/security-config-ex-manifests.xml:300 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384"
  73. src/test/resources/security-config-ex-manifests.xml:308 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512"
  74. src/test/resources/security-config-max-ref-per.xml:276 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"
  75. src/test/resources/security-config-max-ref-per.xml:292 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"
  76. src/test/resources/security-config-max-ref-per.xml:300 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384"
  77. src/test/resources/security-config-max-ref-per.xml:308 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512"
  78. src/test/resources/security-config-max-trans-per.xml:276 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"
  79. src/test/resources/security-config-max-trans-per.xml:292 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"
  80. src/test/resources/security-config-max-trans-per.xml:300 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384"
  81. src/test/resources/security-config-max-trans-per.xml:308 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512"
xmldsig.algorithm · CWE-327
DSA Quantum-vulnerable 79 places See details

XML signature or encryption algorithm

An XML Signature or XML Encryption algorithm URI - SAML, XAdES or WS-Security. The URI names the algorithm exactly, and a signature URI names its digest as well, so `#rsa-sha1` reports both the key and the broken digest.

Federated login and signed XML documents name their cryptography in a web address. Some of those addresses name algorithms that are already broken.

What to do. Move off `#rsa-sha1` first: that signature is forgeable today, with no quantum computer involved. The key algorithm changes with the wider migration.

  1. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:90 "http://www.w3.org/2009/xmldsig11#dsa-sha256";
  2. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:234 } else if (alg.equals(DSA_SHA256)) {
  3. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:1020 return DSA_SHA256;
  4. src/main/java/org/apache/xml/security/resource/config.xml:79 <SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
  5. src/main/java/org/apache/xml/security/resource/config.xml:226 <Algorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
  6. src/main/java/org/apache/xml/security/stax/ext/XMLSec.java:151 securityProperties.setSignatureAlgorithm("http://www.w3.org/2000/09/xmldsig#dsa-sha1");
  7. src/main/resources/security-config.xml:175 <Algorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
  8. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/XMLSignatureTest.java:86 test path private static final String DSA_SHA256 = "http://www.w3.org/2009/xmldsig11#dsa-sha256";
  9. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/XMLSignatureTest.java:415 test path SignatureMethod sm = fac.newSignatureMethod(DSA_SHA256, null);
  10. src/test/java/org/apache/xml/security/test/stax/STAXSecureDefaultsTest.java:85 test path assertEquals("http://www.w3.org/2000/09/xmldsig#dsa-sha1", sigAlgo,
  11. src/test/resources/config-xalan.xml:79 test path <SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
  12. src/test/resources/config-xalan.xml:221 test path <Algorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
  13. src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/c14n-8.txt:3 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>
  14. src/test/resources/ie/baltimore/merlin-examples/ec-merlin-iaikTests-two/signature.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  15. src/test/resources/ie/baltimore/merlin-examples/merlin-exc-c14n-one/c14n-4.txt:3 test path <dsig:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></dsig:SignatureMethod>
  16. src/test/resources/ie/baltimore/merlin-examples/merlin-exc-c14n-one/exc-signature.xml:6 test path <dsig:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  17. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloped-dsa-c14n-1.txt:3 test path <SigngnatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethodethod>
  18. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloped-dsa.xml:6 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  19. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloping-b64-dsa-c14n-0.txt:3 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethodethod>
  20. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloping-b64-dsa.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  21. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloping-dsa-c14n-1.txt:3 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethodethod>
  22. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-enveloping-dsa.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  23. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-external-b64-dsa-c14n-0.txt:3 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>
  24. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-external-b64-dsa.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  25. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-external-dsa-c14n-0.txt:3 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>
  26. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-fifteen/signature-external-dsa.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  27. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-filter2-one/sign-xfdl.xml:3942 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  28. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-filter2-one/signature.xml:22 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  29. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/bad-signature.xml:17 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  30. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c14n-17.txt:3 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>
  31. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/c14n-18.txt:3 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>
  32. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-sixteen/signature.xml:17 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  33. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-c14n-16.txt:3 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>
  34. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-c14n-17.txt:3 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>
  35. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloped-dsa-c14n-1.txt:3 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>
  36. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloped-dsa.xml:6 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  37. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-b64-dsa-c14n-0.txt:3 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>
  38. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-b64-dsa.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  39. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-dsa-c14n-1.txt:3 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>
  40. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-dsa.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  41. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-external-b64-dsa-c14n-0.txt:3 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>
  42. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-external-b64-dsa.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  43. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-external-dsa-c14n-0.txt:3 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>
  44. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-external-dsa.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  45. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-keyname.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  46. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-retrievalmethod-rawx509crt.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  47. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-x509-crt-crl.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  48. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-x509-crt.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  49. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-x509-is.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  50. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-x509-ski.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  51. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-x509-sn.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  52. src/test/resources/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature.xml:17 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  53. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/decryption-transform-except.xml:43 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  54. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/decryption-transform.xml:35 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  55. src/test/resources/interop/c14n/Y1/c14n-4.txt:3 test path <dsig:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></dsig:SignatureMethod>
  56. src/test/resources/interop/c14n/Y1/exc-signature.xml:6 test path <dsig:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  57. src/test/resources/interop/c14n/Y2/signature-joseph-exc.xml:19 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  58. src/test/resources/interop/c14n/Y3/c14n-8.txt:3 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>
  59. src/test/resources/interop/c14n/Y3/signature.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  60. src/test/resources/interop/c14n/Y4/c14n-27.txt:3 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>
  61. src/test/resources/interop/c14n/Y4/signature-manifest.xml:15 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  62. src/test/resources/interop/c14n/Y4/signature.xml:15 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  63. src/test/resources/interop/c14n/Y4/signatureStripped.xml:15 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  64. src/test/resources/interop/c14n/Y5/c14n-27.txt:3 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></SignatureMethod>
  65. src/test/resources/interop/c14n/Y5/signature.xml:21 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  66. src/test/resources/interop/c14n/Y5/signatureCommented.xml:21 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  67. src/test/resources/interop/xfilter2/merlin-xpath-filter2-three/sign-spec-c14n-2.txt:3 test path <dsig:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></dsig:SignatureMethod>
  68. src/test/resources/interop/xfilter2/merlin-xpath-filter2-three/sign-spec.xml:22 test path <dsig:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  69. src/test/resources/interop/xfilter2/merlin-xpath-filter2-three/sign-xfdl.xml:3942 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  70. src/test/resources/org/apache/xml/security/samples/input/signatureWithExternalReference.xml:4 test path <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></ds:SignatureMethod>
  71. src/test/resources/org/apache/xml/security/temp/key/signature-retrievalmethod-dsavalue.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  72. src/test/resources/org/apache/xml/security/temp/signature/signature-bad-c14n-algo.xml:4 test path <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></ds:SignatureMethod>
  73. src/test/resources/org/apache/xml/security/temp/signature/signature-bad-transform-algo.xml:4 test path <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></ds:SignatureMethod>
  74. src/test/resources/org/apache/xml/security/temp/signature/signature-good.xml:4 test path <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"></ds:SignatureMethod>
  75. src/test/resources/org/apache/xml/security/test/javax/xml/crypto/dsig/signature-enveloping-rsa-template.xml:5 test path <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
  76. src/test/resources/security-config-allow-same-doc.xml:175 test path <Algorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
  77. src/test/resources/security-config-ex-manifests.xml:175 test path <Algorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
  78. src/test/resources/security-config-max-ref-per.xml:175 test path <Algorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
  79. src/test/resources/security-config-max-trans-per.xml:175 test path <Algorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
xmldsig.algorithm · CWE-327
RSA-OAEP Quantum-vulnerable 57 places See details

XML signature or encryption algorithm

An XML Signature or XML Encryption algorithm URI - SAML, XAdES or WS-Security. The URI names the algorithm exactly, and a signature URI names its digest as well, so `#rsa-sha1` reports both the key and the broken digest.

Federated login and signed XML documents name their cryptography in a web address. Some of those addresses name algorithms that are already broken.

What to do. Move off `#rsa-sha1` first: that signature is forgeable today, with no quantum computer involved. The key algorithm changes with the wider migration.

  1. src/main/java/org/apache/xml/security/encryption/XMLCipherParameters.java:39 "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p";
  2. src/main/java/org/apache/xml/security/resource/config.xml:545 <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
  3. src/main/java/org/apache/xml/security/resource/config.xml:552 <Algorithm URI="http://www.w3.org/2009/xmlenc11#rsa-oaep"
  4. src/main/java/org/apache/xml/security/stax/ext/XMLSec.java:170 securityProperties.setEncryptionKeyTransportAlgorithm("http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p");
  5. src/main/resources/security-config.xml:494 <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
  6. src/main/resources/security-config.xml:501 <Algorithm URI="http://www.w3.org/2009/xmlenc11#rsa-oaep"
  7. src/test/java/org/apache/xml/security/test/dom/encryption/EncryptionFormattingTest.java:121 test path XMLCipher keyCipher = XMLCipher.getInstance("http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p",
  8. src/test/java/org/apache/xml/security/test/dom/encryption/EncryptionFormattingTest.java:145 test path XMLCipher keyCipher = XMLCipher.getInstance("http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p",
  9. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:508 test path "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p,,0",
  10. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:509 test path "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p,'',0",
  11. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:510 test path "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p, http://www.w3.org/2009/xmlenc11#mgf1sha1,0",
  12. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:511 test path "http://www.w3.org/2009/xmlenc11#rsa-oaep, http://www.w3.org/2009/xmlenc11#mgf1sha1,1",
  13. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:512 test path "http://www.w3.org/2009/xmlenc11#rsa-oaep, http://www.w3.org/2009/xmlenc11#mgf1sha256,1",
  14. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:513 test path "http://www.w3.org/2009/xmlenc11#rsa-oaep, http://www.w3.org/2009/xmlenc11#mgf1sha224,1",
  15. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:514 test path "http://www.w3.org/2009/xmlenc11#rsa-oaep, http://www.w3.org/2009/xmlenc11#mgf1sha384,1",
  16. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:515 test path "http://www.w3.org/2009/xmlenc11#rsa-oaep, http://www.w3.org/2009/xmlenc11#mgf1sha512,1",
  17. src/test/java/org/apache/xml/security/test/dom/encryption/XMLEncryption11Test.java:115 test path "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p",
  18. src/test/java/org/apache/xml/security/test/dom/encryption/XMLEncryption11Test.java:164 test path "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p",
  19. src/test/java/org/apache/xml/security/test/dom/encryption/XMLEncryption11Test.java:242 test path "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p",
  20. src/test/java/org/apache/xml/security/test/dom/encryption/XMLEncryption11Test.java:317 test path "http://www.w3.org/2009/xmlenc11#rsa-oaep",
  21. src/test/java/org/apache/xml/security/test/dom/encryption/XMLEncryption11Test.java:392 test path "http://www.w3.org/2009/xmlenc11#rsa-oaep",
  22. src/test/java/org/apache/xml/security/test/dom/encryption/XMLEncryption11Test.java:438 test path "http://www.w3.org/2009/xmlenc11#rsa-oaep",
  23. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionCreationTest.java:405 test path String wrappingAlgorithm = "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p";
  24. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionCreationTest.java:459 test path String wrappingAlgorithm = "http://www.w3.org/2009/xmlenc11#rsa-oaep";
  25. src/test/java/org/apache/xml/security/test/stax/encryption/XMLEncryption11Test.java:153 test path "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p", null, null,
  26. src/test/java/org/apache/xml/security/test/stax/encryption/XMLEncryption11Test.java:174 test path "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p,,0",
  27. src/test/java/org/apache/xml/security/test/stax/encryption/XMLEncryption11Test.java:175 test path "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p,'',0",
  28. src/test/java/org/apache/xml/security/test/stax/encryption/XMLEncryption11Test.java:176 test path "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p, http://www.w3.org/2009/xmlenc11#mgf1sha1,0",
  29. src/test/java/org/apache/xml/security/test/stax/encryption/XMLEncryption11Test.java:177 test path "http://www.w3.org/2009/xmlenc11#rsa-oaep, http://www.w3.org/2009/xmlenc11#mgf1sha1,1",
  30. src/test/java/org/apache/xml/security/test/stax/encryption/XMLEncryption11Test.java:178 test path "http://www.w3.org/2009/xmlenc11#rsa-oaep, http://www.w3.org/2009/xmlenc11#mgf1sha256,1",
  31. src/test/java/org/apache/xml/security/test/stax/encryption/XMLEncryption11Test.java:179 test path "http://www.w3.org/2009/xmlenc11#rsa-oaep, http://www.w3.org/2009/xmlenc11#mgf1sha224,1",
  32. src/test/java/org/apache/xml/security/test/stax/encryption/XMLEncryption11Test.java:180 test path "http://www.w3.org/2009/xmlenc11#rsa-oaep, http://www.w3.org/2009/xmlenc11#mgf1sha384,1",
  33. src/test/java/org/apache/xml/security/test/stax/encryption/XMLEncryption11Test.java:181 test path "http://www.w3.org/2009/xmlenc11#rsa-oaep, http://www.w3.org/2009/xmlenc11#mgf1sha512,1",
  34. src/test/java/org/apache/xml/security/test/stax/encryption/XMLEncryption11Test.java:263 test path x509Certificate.getPublicKey(), "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p",
  35. src/test/java/org/apache/xml/security/test/stax/encryption/XMLEncryption11Test.java:321 test path x509Certificate.getPublicKey(), "http://www.w3.org/2009/xmlenc11#rsa-oaep",
  36. src/test/java/org/apache/xml/security/test/stax/encryption/XMLEncryption11Test.java:379 test path x509Certificate.getPublicKey(), "http://www.w3.org/2009/xmlenc11#rsa-oaep",
  37. src/test/java/org/apache/xml/security/test/stax/encryption/XMLEncryption11Test.java:417 test path x509Certificate.getPublicKey(), "http://www.w3.org/2009/xmlenc11#rsa-oaep",
  38. src/test/java/org/apache/xml/security/test/stax/encryption/XMLEncryption11Test.java:455 test path x509Certificate.getPublicKey(), "http://www.w3.org/2009/xmlenc11#rsa-oaep",
  39. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-3des-kt-rsa_oaep_sha1.xml:8 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p">
  40. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-3des-kt-rsa_oaep_sha256.xml:8 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p">
  41. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-3des-kt-rsa_oaep_sha512.xml:8 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p">
  42. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes128-kt-rsa_oaep_sha1.xml:8 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p">
  43. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes192-kt-rsa_oaep_sha1.xml:8 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p">
  44. src/test/resources/com/phaos/phaos-xmlenc-3/enc-text-aes256-kt-rsa_oaep_sha1.xml:9 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p">
  45. src/test/resources/config-xalan.xml:540 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
  46. src/test/resources/config-xalan.xml:547 test path <Algorithm URI="http://www.w3.org/2009/xmlenc11#rsa-oaep"
  47. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-data-tripledes-cbc-rsa-oaep-mgf1p-sha256.xml:6 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p">
  48. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-data-tripledes-cbc-rsa-oaep-mgf1p.xml:6 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p">
  49. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encsig-hmac-sha256-rsa-oaep-mgf1p.xml:16 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p">
  50. src/test/resources/security-config-allow-same-doc.xml:494 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
  51. src/test/resources/security-config-allow-same-doc.xml:501 test path <Algorithm URI="http://www.w3.org/2009/xmlenc11#rsa-oaep"
  52. src/test/resources/security-config-ex-manifests.xml:494 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
  53. src/test/resources/security-config-ex-manifests.xml:501 test path <Algorithm URI="http://www.w3.org/2009/xmlenc11#rsa-oaep"
  54. src/test/resources/security-config-max-ref-per.xml:494 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
  55. src/test/resources/security-config-max-ref-per.xml:501 test path <Algorithm URI="http://www.w3.org/2009/xmlenc11#rsa-oaep"
  56. src/test/resources/security-config-max-trans-per.xml:494 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
  57. src/test/resources/security-config-max-trans-per.xml:501 test path <Algorithm URI="http://www.w3.org/2009/xmlenc11#rsa-oaep"
xmldsig.algorithm · CWE-327
RSA Quantum-vulnerable Recorded traffic 25 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.

  1. src/test/java/org/apache/xml/security/test/dom/algorithms/CryptographicEdgeCasesTest.java:56 test path KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
  2. src/test/java/org/apache/xml/security/test/dom/algorithms/CryptographicEdgeCasesTest.java:77 test path KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
  3. src/test/java/org/apache/xml/security/test/dom/algorithms/CryptographicEdgeCasesTest.java:104 test path KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
  4. src/test/java/org/apache/xml/security/test/dom/algorithms/CryptographicEdgeCasesTest.java:132 test path KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
  5. src/test/java/org/apache/xml/security/test/dom/algorithms/CryptographicEdgeCasesTest.java:180 test path KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
  6. src/test/java/org/apache/xml/security/test/dom/algorithms/CryptographicEdgeCasesTest.java:209 test path KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
  7. src/test/java/org/apache/xml/security/test/dom/algorithms/CryptographicEdgeCasesTest.java:238 test path KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
  8. src/test/java/org/apache/xml/security/test/dom/algorithms/CryptographicEdgeCasesTest.java:265 test path KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
  9. src/test/java/org/apache/xml/security/test/dom/algorithms/KeyWrapEncryptionAlgorithmTest.java:88 test path rsaKeyPair = KeyPairGenerator.getInstance("RSA").genKeyPair();
  10. src/test/java/org/apache/xml/security/test/dom/algorithms/SignatureAlgorithmTest.java:73 test path KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
  11. src/test/java/org/apache/xml/security/test/dom/encryption/SignedEncryptedTest.java:110 test path KeyPairGenerator rsaKeygen = KeyPairGenerator.getInstance("RSA");
  12. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:243 test path KeyPairGenerator rsaKeygen = KeyPairGenerator.getInstance("RSA");
  13. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:528 test path KeyPairGenerator rsaKeygen = KeyPairGenerator.getInstance("RSA");
  14. src/test/java/org/apache/xml/security/test/dom/parser/XMLParserTest.java:68 test path rsaKeyPair = KeyPairGenerator.getInstance("RSA").genKeyPair();
  15. src/test/java/org/apache/xml/security/test/dom/signature/CreateSignatureTest.java:75 test path kp = KeyPairGenerator.getInstance("RSA").genKeyPair();
  16. src/test/java/org/apache/xml/security/test/dom/utils/JDKXPathFactoryTest.java:78 test path kp = KeyPairGenerator.getInstance("RSA").genKeyPair();
  17. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:415 test path KeyPairGenerator rsaKeygen = KeyPairGenerator.getInstance("RSA");
  18. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:480 test path KeyPairGenerator rsaKeygen = KeyPairGenerator.getInstance("RSA");
  19. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:1303 test path KeyPairGenerator rsaKeygen = KeyPairGenerator.getInstance("RSA");
  20. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:423 test path KeyPairGenerator rsaKeygen = KeyPairGenerator.getInstance("RSA");
  21. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:480 test path KeyPairGenerator rsaKeygen = KeyPairGenerator.getInstance("RSA");
  22. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:538 test path KeyPairGenerator rsaKeygen = KeyPairGenerator.getInstance("RSA");
  23. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:597 test path KeyPairGenerator rsaKeygen = KeyPairGenerator.getInstance("RSA");
  24. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionCreationTest.java:93 test path rsaKeyPair = KeyPairGenerator.getInstance("RSA").genKeyPair();
  25. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionVerificationTest.java:104 test path rsaKeyPair = KeyPairGenerator.getInstance("RSA").genKeyPair();
java.keypairgenerator · CWE-327
RSA2048-bit Quantum-vulnerable Recorded traffic 12 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.

  1. src/test/java/org/apache/xml/security/extension/SignatureProcessorTest.java:51 test path KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA");
  2. src/test/java/org/apache/xml/security/test/dom/algorithms/PKSignatureAlgorithmTest.java:95 test path KeyPairGenerator rsaKpg = KeyPairGenerator.getInstance("RSA");
  3. src/test/java/org/apache/xml/security/test/dom/secure_val/TransformLimitTest.java:179 test path KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA");
  4. src/test/java/org/apache/xml/security/test/dom/signature/InvalidKeyTest.java:130 test path KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
  5. src/test/java/org/apache/xml/security/test/dom/signature/InvalidKeyTest.java:158 test path KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
  6. src/test/java/org/apache/xml/security/test/dom/signature/NoKeyInfoTest.java:143 test path KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
  7. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/CreateInteropXMLDSig11Test.java:113 test path KeyPairGenerator rsakpg = KeyPairGenerator.getInstance("RSA");
  8. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/EnvelopingSignatureTest.java:71 test path KeyPairGenerator rsaKpg = KeyPairGenerator.getInstance("RSA");
  9. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/PKSignatureAlgorithmTest.java:167 test path KeyPairGenerator rsaKpg = KeyPairGenerator.getInstance("RSA");
  10. src/test/java/org/apache/xml/security/test/stax/STAXSecureDefaultsTest.java:314 test path KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
  11. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:53 test path KeyPairGenerator rsaKpg = KeyPairGenerator.getInstance("RSA");
  12. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureVerificationTest.java:57 test path KeyPairGenerator rsaKpg = KeyPairGenerator.getInstance("RSA");
java.keypairgenerator · CWE-327
RSA-OAEP Quantum-vulnerable Recorded traffic 10 places See details

Classical public-key cipher through the JCA

`Cipher.getInstance()` with a transformation whose algorithm component is a public-key or legacy symmetric cipher. The transformation string is parsed into algorithm, mode and padding, so `RSA/ECB/PKCS1Padding` is separated from `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`.

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. For RSA encryption, move to ML-KEM-768 and keep RSA-OAEP only as the classical half of a hybrid during transition.

  1. src/main/java/org/apache/xml/security/encryption/XMLCipher.java:1683 return Cipher.getInstance("RSA/ECB/OAEPWithSHA1AndMGF1Padding");
  2. src/main/java/org/apache/xml/security/encryption/XMLCipher.java:1685 return Cipher.getInstance("RSA/ECB/OAEPWithSHA1AndMGF1Padding", requestedJCEProvider);
  3. src/main/java/org/apache/xml/security/encryption/XMLCipher.java:1693 return Cipher.getInstance("RSA/ECB/OAEPWithSHA-224andMGF1Padding");
  4. src/main/java/org/apache/xml/security/encryption/XMLCipher.java:1695 return Cipher.getInstance("RSA/ECB/OAEPWithSHA-224andMGF1Padding", requestedJCEProvider);
  5. src/main/java/org/apache/xml/security/encryption/XMLCipher.java:1703 return Cipher.getInstance("RSA/ECB/OAEPWithSHA-256AndMGF1Padding");
  6. src/main/java/org/apache/xml/security/encryption/XMLCipher.java:1705 return Cipher.getInstance("RSA/ECB/OAEPWithSHA-256AndMGF1Padding", requestedJCEProvider);
  7. src/main/java/org/apache/xml/security/encryption/XMLCipher.java:1713 return Cipher.getInstance("RSA/ECB/OAEPWithSHA-384AndMGF1Padding");
  8. src/main/java/org/apache/xml/security/encryption/XMLCipher.java:1715 return Cipher.getInstance("RSA/ECB/OAEPWithSHA-384AndMGF1Padding", requestedJCEProvider);
  9. src/main/java/org/apache/xml/security/encryption/XMLCipher.java:1723 return Cipher.getInstance("RSA/ECB/OAEPWithSHA-512AndMGF1Padding");
  10. src/main/java/org/apache/xml/security/encryption/XMLCipher.java:1725 return Cipher.getInstance("RSA/ECB/OAEPWithSHA-512AndMGF1Padding", requestedJCEProvider);
java.cipher · CWE-327
Ed25519255-bitother/Ed25519 Quantum-vulnerable 8 places See details

JOSE algorithm declared in configuration

An `alg` value in JSON or YAML. `none` is reported as a critical defect; HS* is an HMAC and is not quantum-vulnerable; RS*, PS*, ES* and EdDSA are.

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. No standardised post-quantum JOSE algorithm exists yet. Keep token lifetimes short.

  1. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:1270 return "Ed25519";
  2. src/main/java/org/apache/xml/security/algorithms/JCEMapper.java:230 new Algorithm("Ed25519", "Ed25519", "Signature")
  3. src/main/java/org/apache/xml/security/keys/content/DEREncodedKeyValue.java:42 "EdDSA", "Ed25519", "Ed448",
  4. src/main/java/org/apache/xml/security/utils/KeyUtils.java:56 EdDSA("EdDSA", null);
  5. src/test/java/org/apache/xml/security/test/dom/keys/DEREncodedKeyValueTest.java:58 test path edecKeyControl = loadPublicKey("ed25519.key", "EdDSA");
  6. src/test/java/org/apache/xml/security/test/dom/signature/EDDSASignatureTest.java:69 test path (PrivateKey) keyStore.getKey("Ed25519", EDDSA_KS_PASSWORD.toCharArray());
  7. src/test/java/org/apache/xml/security/test/dom/signature/EDDSASignatureTest.java:71 test path doVerify(doSign(privateKey, (X509Certificate) keyStore.getCertificate("Ed25519"), null, XMLSignature.ALGO_ID_SIGNATURE_EDDSA_ED25519));
  8. src/test/java/org/apache/xml/security/testutils/KeyTestUtils.java:54 test path ED25519("ed25519.key", "EdDSA", "1.3.101.112");
jose.algorithm · CWE-327
RSA-PSS Quantum-vulnerable 7 places See details

XML signature or encryption algorithm

An XML Signature or XML Encryption algorithm URI - SAML, XAdES or WS-Security. The URI names the algorithm exactly, and a signature URI names its digest as well, so `#rsa-sha1` reports both the key and the broken digest.

Federated login and signed XML documents name their cryptography in a web address. Some of those addresses name algorithms that are already broken.

What to do. Move off `#rsa-sha1` first: that signature is forgeable today, with no quantum computer involved. The key algorithm changes with the wider migration.

  1. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMRSAPSSSignatureMethod.java:73 "http://www.w3.org/2007/05/xmldsig-more#rsa-pss";
  2. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMRSAPSSSignatureMethod.java:327 return RSA_PSS;
  3. src/main/java/org/apache/xml/security/resource/xmlsecurity_en.properties:32 algorithms.MissingRSAPSSParams = RSAPSSParams is a required Element for http://www.w3.org/2007/05/xmldsig-more#rsa-pss
  4. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/PKSignatureAlgorithmTest.java:151 test path rsaPss = fac.newSignatureMethod("http://www.w3.org/2007/05/xmldsig-more#rsa-pss", null);
  5. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/PKSignatureAlgorithmTest.java:156 test path rsaPssSha512 = fac.newSignatureMethod("http://www.w3.org/2007/05/xmldsig-more#rsa-pss", params);
  6. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:403 test path String signatureAlgorithm = "http://www.w3.org/2007/05/xmldsig-more#rsa-pss";
  7. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureVerificationTest.java:465 test path String signatureAlgorithm = "http://www.w3.org/2007/05/xmldsig-more#rsa-pss";
xmldsig.algorithm · CWE-327
RSA Quantum-vulnerable Recorded traffic 6 places 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. Broken by Shor's algorithm on a cryptographically relevant quantum computer.

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/apache/jcp/xml/dsig/internal/dom/DOMKeyValue.java:223 rsakf = KeyFactory.getInstance("RSA");
  2. src/main/java/org/apache/xml/security/keys/content/keyvalues/RSAKeyValue.java:95 KeyFactory rsaFactory = KeyFactory.getInstance("RSA");
  3. src/main/java/org/apache/xml/security/stax/impl/securityToken/RsaKeyValueSecurityToken.java:49 KeyFactory keyFactory = KeyFactory.getInstance("RSA");
  4. src/test/java/org/apache/xml/security/test/dom/encryption/BaltimoreEncTest.java:123 test path KeyFactory keyFactory = KeyFactory.getInstance("RSA");
  5. src/test/java/org/apache/xml/security/test/dom/keys/keyresolver/KeyResolverTest.java:231 test path KeyFactory keyFactory = KeyFactory.getInstance("RSA");
  6. src/test/java/org/apache/xml/security/test/stax/encryption/BaltimoreEncTest.java:101 test path KeyFactory keyFactory = KeyFactory.getInstance("RSA");
java.keyfactory · CWE-327
EC Quantum-vulnerable 5 places 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/apache/jcp/xml/dsig/internal/dom/DOMKeyValue.java:586 eckf = KeyFactory.getInstance("EC");
  2. src/main/java/org/apache/xml/security/keys/content/keyvalues/ECKeyValue.java:241 return KeyFactory.getInstance("EC").generatePublic(spec);
  3. src/main/java/org/apache/xml/security/stax/impl/securityToken/ECKeyValueSecurityToken.java:92 KeyFactory keyFactory = KeyFactory.getInstance("EC");
  4. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/InteropXMLDSig11Test.java:55 test path KeyFactory.getInstance("EC");
  5. src/test/java/org/apache/xml/security/utils/DERDecoderUtilsTest.java:83 test path KeyFactory kf = KeyFactory.getInstance("EC"); // or "EC" or whatever
java.keyfactory · CWE-327
EdDSA Quantum-vulnerable 5 places See details

JOSE algorithm declared in configuration

An `alg` value in JSON or YAML. `none` is reported as a critical defect; HS* is an HMAC and is not quantum-vulnerable; RS*, PS*, ES* and EdDSA are.

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. No standardised post-quantum JOSE algorithm exists yet. Keep token lifetimes short.

  1. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:1291 return "Ed448";
  2. src/main/java/org/apache/xml/security/algorithms/JCEMapper.java:234 new Algorithm("Ed448", "Ed448", "Signature")
  3. src/main/java/org/apache/xml/security/keys/content/DEREncodedKeyValue.java:42 "EdDSA", "Ed25519", "Ed448",
  4. src/test/java/org/apache/xml/security/test/dom/signature/EDDSASignatureTest.java:99 test path (PrivateKey) keyStore.getKey("Ed448", EDDSA_KS_PASSWORD.toCharArray());
  5. src/test/java/org/apache/xml/security/test/dom/signature/EDDSASignatureTest.java:101 test path doVerify(doSign(privateKey, (X509Certificate) keyStore.getCertificate("Ed448"), null, XMLSignature.ALGO_ID_SIGNATURE_EDDSA_ED448));
jose.algorithm · CWE-327
RSA-PSS Quantum-vulnerable 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.

java.signature · CWE-327
DSA Quantum-vulnerable 4 places 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. Broken by Shor's algorithm on a cryptographically relevant quantum computer.

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

java.keyfactory · CWE-327
EC Quantum-vulnerable 4 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. 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. Generate the classical key alongside an ML-KEM or ML-DSA key and carry both until relying parties accept the post-quantum one.

  1. src/test/java/org/apache/xml/security/test/dom/algorithms/PKSignatureAlgorithmTest.java:99 test path ecKeyPair = KeyPairGenerator.getInstance("EC").genKeyPair();
  2. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/CreateInteropXMLDSig11Test.java:99 test path KeyPairGenerator kpg = KeyPairGenerator.getInstance("EC");
  3. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:57 test path ecKeyPair = KeyPairGenerator.getInstance("EC").genKeyPair();
  4. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureVerificationTest.java:61 test path ecKeyPair = KeyPairGenerator.getInstance("EC").genKeyPair();
java.keypairgenerator · CWE-327
EC256-bit Quantum-vulnerable 3 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. 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. Generate the classical key alongside an ML-KEM or ML-DSA key and carry both until relying parties accept the post-quantum one.

  1. src/test/java/org/apache/xml/security/test/dom/signature/ECDSASignatureTest.java:165 test path KeyPairGenerator ecKpg = KeyPairGenerator.getInstance("EC");
  2. src/test/java/org/apache/xml/security/test/dom/signature/InvalidKeyTest.java:109 test path KeyPairGenerator keyGen = KeyPairGenerator.getInstance("EC");
  3. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/PKSignatureAlgorithmTest.java:175 test path KeyPairGenerator ecKpg = KeyPairGenerator.getInstance("EC");
java.keypairgenerator · CWE-327
DSA1024-bit 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.

  1. src/test/java/org/apache/xml/security/test/dom/signature/XmlSecTest.java:91 test path KeyPairGenerator kpg = KeyPairGenerator.getInstance("DSA");
  2. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/DetachedTest.java:127 test path KeyPairGenerator kpg = KeyPairGenerator.getInstance("DSA");
java.keypairgenerator · CWE-327
RSA2048-bit Quantum-vulnerable 2 places See details

X.509 certificate

A PEM certificate. The subject public-key algorithm and key size are read from the SubjectPublicKeyInfo structure, and the not-after date is reported so certificates that outlive the migration window are visible.

This is a digital identity document. Its expiry date matters: one valid for many years locks in today's algorithms for that long.

What to do. Shorten certificate lifetimes so re-issuing with a post-quantum key is routine.

pem.certificate
RSA-OAEP Quantum-vulnerable Recorded traffic 2 places 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/apache/xml/security/algorithms/JCEMapper.java:315 new Algorithm("RSA", "RSA/ECB/OAEPPadding", "KeyTransport")
  2. src/main/java/org/apache/xml/security/algorithms/JCEMapper.java:319 new Algorithm("RSA", "RSA/ECB/OAEPPadding", "KeyTransport")
java.transformation · CWE-327
DSA Quantum-vulnerable 1 place 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.

  1. src/test/java/org/apache/xml/security/stax/impl/securityToken/SecurityTokenFactoryImplTest.java:123 test path KeyPairGenerator keyGen = KeyPairGenerator.getInstance("DSA");
java.keypairgenerator · CWE-327
DSA Quantum-vulnerable 1 place 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
DSA2048-bit Quantum-vulnerable 1 place 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.

  1. src/test/java/org/apache/xml/security/test/stax/STAXSecureDefaultsTest.java:320 test path KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("DSA");
java.keypairgenerator · CWE-327
ECDH Quantum-vulnerable Recorded traffic 1 place See details

JOSE algorithm declared in configuration

An `alg` value in JSON or YAML. `none` is reported as a critical defect; HS* is an HMAC and is not quantum-vulnerable; RS*, PS*, ES* and EdDSA are.

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. No standardised post-quantum JOSE algorithm exists yet. Keep token lifetimes short.

  1. src/main/java/org/apache/xml/security/utils/EncryptionConstants.java:229 EncryptionConstants.EncryptionSpec11NS + "ECDH-ES";
jose.algorithm · CWE-327
RSA-PSS2048-bit Quantum-vulnerable 1 place 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.

  1. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/PKSignatureAlgorithmTest.java:171 test path KeyPairGenerator rsaPssKpg = KeyPairGenerator.getInstance("RSASSA-PSS");
java.keypairgenerator · CWE-327
SHA-256 Reduced margin Renamed import 86 places See details

XML signature or encryption algorithm

An XML Signature or XML Encryption algorithm URI - SAML, XAdES or WS-Security. The URI names the algorithm exactly, and a signature URI names its digest as well, so `#rsa-sha1` reports both the key and the broken digest.

Federated login and signed XML documents name their cryptography in a web address. Some of those addresses name algorithms that are already broken.

What to do. Move off `#rsa-sha1` first: that signature is forgeable today, with no quantum computer involved. The key algorithm changes with the wider migration.

  1. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:72 "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256";
  2. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:84 "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256";
  3. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:90 "http://www.w3.org/2009/xmldsig11#dsa-sha256";
  4. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:202 } else if (alg.equals(RSA_SHA256)) {
  5. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:234 } else if (alg.equals(DSA_SHA256)) {
  6. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:240 } else if (alg.equals(ECDSA_SHA256)) {
  7. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:661 return RSA_SHA256;
  8. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:1020 return DSA_SHA256;
  9. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:1086 return ECDSA_SHA256;
  10. src/main/java/org/apache/xml/security/algorithms/implementations/SignatureBaseRSA.java:724 SHA256("SHA-256", "http://www.w3.org/2001/04/xmlenc#sha256", 32),
  11. src/main/java/org/apache/xml/security/encryption/XMLCipherParameters.java:60 "http://www.w3.org/2001/04/xmlenc#sha256";
  12. src/main/java/org/apache/xml/security/resource/config.xml:92 <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
  13. src/main/java/org/apache/xml/security/resource/config.xml:123 <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"
  14. src/main/java/org/apache/xml/security/resource/config.xml:176 <Algorithm URI="http://www.w3.org/2001/04/xmlenc#sha256"
  15. src/main/java/org/apache/xml/security/resource/config.xml:264 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
  16. src/main/java/org/apache/xml/security/resource/config.xml:343 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"
  17. src/main/java/org/apache/xml/security/signature/XMLSignature.java:192 "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256";
  18. src/main/resources/security-config.xml:95 <Algorithm URI="http://www.w3.org/2001/04/xmlenc#sha256"
  19. src/main/resources/security-config.xml:213 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
  20. src/main/resources/security-config.xml:292 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"
  21. src/test/java/org/apache/xml/security/encryption/keys/content/derivedKey/HKDFTest.java:46 test path "'Rfc5869: Test Case 1','http://www.w3.org/2001/04/xmlenc#sha256'," +
  22. src/test/java/org/apache/xml/security/encryption/keys/content/derivedKey/HKDFTest.java:51 test path "'Rfc5869: Test Case 2','http://www.w3.org/2001/04/xmlenc#sha256', " +
  23. src/test/java/org/apache/xml/security/encryption/keys/content/derivedKey/HKDFTest.java:58 test path "'Rfc5869: Test Case 3','http://www.w3.org/2001/04/xmlenc#sha256', " +
  24. src/test/java/org/apache/xml/security/test/dom/encryption/XMLEncryption11BrainpoolTest.java:88 test path " http://www.w3.org/2001/04/xmlenc#sha256",
  25. src/test/java/org/apache/xml/security/test/dom/encryption/XMLEncryption11BrainpoolTest.java:91 test path " http://www.w3.org/2001/04/xmlenc#sha256",
  26. src/test/java/org/apache/xml/security/test/dom/encryption/XMLEncryption11BrainpoolTest.java:94 test path " http://www.w3.org/2001/04/xmlenc#sha256",
  27. src/test/java/org/apache/xml/security/test/dom/encryption/XMLEncryption11Test.java:243 test path "http://www.w3.org/2001/04/xmlenc#sha256",
  28. src/test/java/org/apache/xml/security/test/dom/keys/content/x509/XMLX509DigestTest.java:43 test path private static final String ALG_URI_CONTROL = "http://www.w3.org/2001/04/xmlenc#sha256";
  29. src/test/java/org/apache/xml/security/test/dom/keys/content/x509/XMLX509DigestTest.java:61 test path XMLX509Digest x509Digest = new XMLX509Digest(TestUtils.newDocument(), digestControl, ALG_URI_CONTROL);
  30. src/test/java/org/apache/xml/security/test/dom/keys/content/x509/XMLX509DigestTest.java:75 test path assertEquals(ALG_URI_CONTROL, x509Digest.getAlgorithm());
  31. src/test/java/org/apache/xml/security/test/dom/keys/content/x509/XMLX509DigestTest.java:81 test path XMLX509Digest x509Digest = new XMLX509Digest(TestUtils.newDocument(), certControl, ALG_URI_CONTROL);
  32. src/test/java/org/apache/xml/security/test/dom/keys/content/x509/XMLX509DigestTest.java:82 test path assertEquals(ALG_URI_CONTROL, x509Digest.getAlgorithm());
  33. src/test/java/org/apache/xml/security/test/dom/keys/content/x509/XMLX509DigestTest.java:88 test path XMLX509Digest x509Digest = new XMLX509Digest(TestUtils.newDocument(), digestControl, ALG_URI_CONTROL);
  34. src/test/java/org/apache/xml/security/test/dom/keys/content/x509/XMLX509DigestTest.java:89 test path assertEquals(ALG_URI_CONTROL, x509Digest.getAlgorithm());
  35. src/test/java/org/apache/xml/security/test/dom/keys/content/x509/XMLX509DigestTest.java:95 test path assertArrayEquals(digestControl, XMLX509Digest.getDigestBytesFromCert(certControl, ALG_URI_CONTROL));
  36. src/test/java/org/apache/xml/security/test/dom/signature/PreCalculatedDigestSignatureTest.java:117 test path signature.addDocument(EXTERNAL_DOCUMENT_URI, null, "http://www.w3.org/2001/04/xmlenc#sha256");
  37. src/test/java/org/apache/xml/security/test/dom/signature/PreCalculatedDigestSignatureTest.java:152 test path signature.addDocument("", transforms, "http://www.w3.org/2001/04/xmlenc#sha256");
  38. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/CreateInteropXMLDSig11Test.java:137 test path ("http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256", null);
  39. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/CreateInteropXMLDSig11Test.java:149 test path ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", null);
  40. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/PKSignatureAlgorithmTest.java:137 test path rsaSha256 = fac.newSignatureMethod("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", null);
  41. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/PKSignatureAlgorithmTest.java:160 test path ecdsaSha256 = fac.newSignatureMethod("http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256", null);
  42. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/XMLSignatureBrainpoolTest.java:85 test path @CsvSource({"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256, brainpoolP256r1",
  43. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/XMLSignatureBrainpoolTest.java:86 test path "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256, brainpoolP384r1",
  44. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/XMLSignatureBrainpoolTest.java:87 test path "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256, brainpoolP512r1"
  45. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/XMLSignatureECDSATest.java:92 test path "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256, secp256r1",
  46. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/XMLSignatureTest.java:86 test path private static final String DSA_SHA256 = "http://www.w3.org/2009/xmldsig11#dsa-sha256";
  47. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/XMLSignatureTest.java:415 test path SignatureMethod sm = fac.newSignatureMethod(DSA_SHA256, null);
  48. src/test/java/org/apache/xml/security/test/stax/encryption/XMLEncryption11Test.java:264 test path "http://www.w3.org/2001/04/xmlenc#sha256",
  49. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:101 test path String signatureAlgorithm = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256";
  50. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:500 test path String signatureAlgorithm = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256";
  51. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureVerificationTest.java:108 test path String signatureAlgorithm = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256";
  52. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureVerificationTest.java:583 test path String signatureAlgorithm = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256";
  53. src/test/java/org/apache/xml/security/test/stax/signature/SignatureCreationTest.java:608 test path properties.setSignatureAlgorithm("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256");
  54. src/test/java/org/apache/xml/security/test/stax/signature/SignatureCreationTest.java:609 test path properties.setSignatureDigestAlgorithm("http://www.w3.org/2001/04/xmlenc#sha256");
  55. src/test/java/org/apache/xml/security/test/stax/signature/SignatureCreationTest.java:733 test path properties.setSignatureAlgorithm("http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256");
  56. src/test/java/org/apache/xml/security/test/stax/signature/SignatureCreationTest.java:735 test path properties.setSignatureDigestAlgorithm("http://www.w3.org/2001/04/xmlenc#sha256");
  57. src/test/java/org/apache/xml/security/test/stax/signature/SignatureCreationTest.java:856 test path "http://www.w3.org/2001/04/xmlenc#sha256");
  58. src/test/java/org/apache/xml/security/test/stax/signature/SignatureCreationTest.java:884 test path assertEquals("http://www.w3.org/2001/04/xmlenc#sha256", element.getAttribute(XMLSecurityConstants.ATT_NULL_Algorithm.getLocalPart()));
  59. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestCreationTest.java:145 test path String digestAlgorithm = "http://www.w3.org/2001/04/xmlenc#sha256";
  60. src/test/java/org/apache/xml/security/test/stax/signature/SignatureDigestVerificationTest.java:160 test path String digestAlgorithm = "http://www.w3.org/2001/04/xmlenc#sha256";
  61. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:790 test path "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", document, localNames, key,
  62. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:821 test path "http://www.w3.org/2001/04/xmlenc#sha256",
  63. src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java:822 test path "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256");
  64. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-3des-kt-rsa_oaep_sha256.xml:9 test path <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>
  65. src/test/resources/config-xalan.xml:92 test path <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
  66. src/test/resources/config-xalan.xml:123 test path <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"
  67. src/test/resources/config-xalan.xml:171 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#sha256"
  68. src/test/resources/config-xalan.xml:259 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
  69. src/test/resources/config-xalan.xml:338 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"
  70. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/decryption-transform-except.xml:51 test path <DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
  71. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/decryption-transform.xml:41 test path <DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
  72. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encsig-sha256-hmac-sha256-kw-aes128.xml:7 test path <DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
  73. src/test/resources/org/apache/xml/security/samples/input/signatureWithExternalReference.xml:10 test path <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></ds:DigestMethod>
  74. src/test/resources/org/apache/xml/security/samples/input/signatureWithExternalReference.xml:14 test path <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></ds:DigestMethod>
  75. src/test/resources/security-config-allow-same-doc.xml:95 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#sha256"
  76. src/test/resources/security-config-allow-same-doc.xml:213 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
  77. src/test/resources/security-config-allow-same-doc.xml:292 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"
  78. src/test/resources/security-config-ex-manifests.xml:95 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#sha256"
  79. src/test/resources/security-config-ex-manifests.xml:213 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
  80. src/test/resources/security-config-ex-manifests.xml:292 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"
  81. src/test/resources/security-config-max-ref-per.xml:95 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#sha256"
  82. src/test/resources/security-config-max-ref-per.xml:213 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
  83. src/test/resources/security-config-max-ref-per.xml:292 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"
  84. src/test/resources/security-config-max-trans-per.xml:95 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#sha256"
  85. src/test/resources/security-config-max-trans-per.xml:213 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
  86. src/test/resources/security-config-max-trans-per.xml:292 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"
xmldsig.algorithm · CWE-327
AES-128 Reduced margin 69 places See details

XML signature or encryption algorithm

An XML Signature or XML Encryption algorithm URI - SAML, XAdES or WS-Security. The URI names the algorithm exactly, and a signature URI names its digest as well, so `#rsa-sha1` reports both the key and the broken digest.

Federated login and signed XML documents name their cryptography in a web address. Some of those addresses name algorithms that are already broken.

What to do. Move off `#rsa-sha1` first: that signature is forgeable today, with no quantum computer involved. The key algorithm changes with the wider migration.

  1. src/main/java/org/apache/xml/security/encryption/XMLCipherParameters.java:27 "http://www.w3.org/2001/04/xmlenc#aes128-cbc";
  2. src/main/java/org/apache/xml/security/encryption/XMLCipherParameters.java:48 "http://www.w3.org/2001/04/xmlenc#kw-aes128";
  3. src/main/java/org/apache/xml/security/resource/config.xml:448 <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes128-cbc"
  4. src/main/java/org/apache/xml/security/resource/config.xml:475 <Algorithm URI="http://www.w3.org/2009/xmlenc11#aes128-gcm"
  5. src/main/java/org/apache/xml/security/resource/config.xml:574 <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes128"
  6. src/main/java/org/apache/xml/security/utils/EncryptionConstants.java:185 "http://www.w3.org/2009/xmlenc11#aes128-gcm";
  7. src/main/resources/security-config.xml:397 <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes128-cbc"
  8. src/main/resources/security-config.xml:424 <Algorithm URI="http://www.w3.org/2009/xmlenc11#aes128-gcm"
  9. src/main/resources/security-config.xml:523 <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes128"
  10. src/test/java/org/apache/xml/security/test/dom/encryption/XMLEncryption11BrainpoolTest.java:87 test path " http://www.w3.org/2001/04/xmlenc#kw-aes128, http://www.w3.org/2009/xmlenc11#aes128-gcm," +
  11. src/test/java/org/apache/xml/security/test/dom/encryption/XMLEncryption11BrainpoolTest.java:90 test path " http://www.w3.org/2001/04/xmlenc#kw-aes128, http://www.w3.org/2009/xmlenc11#aes128-gcm," +
  12. src/test/java/org/apache/xml/security/test/dom/encryption/XMLEncryption11BrainpoolTest.java:93 test path " http://www.w3.org/2001/04/xmlenc#kw-aes128, http://www.w3.org/2009/xmlenc11#aes128-gcm," +
  13. src/test/java/org/apache/xml/security/test/dom/encryption/XMLEncryption11Test.java:109 test path Key sessionKey = getSessionKey("http://www.w3.org/2009/xmlenc11#aes128-gcm");
  14. src/test/java/org/apache/xml/security/test/dom/encryption/XMLEncryption11Test.java:126 test path "http://www.w3.org/2009/xmlenc11#aes128-gcm"
  15. src/test/java/org/apache/xml/security/test/dom/encryption/XMLEncryption11Test.java:158 test path Key sessionKey = getSessionKey("http://www.w3.org/2009/xmlenc11#aes128-gcm");
  16. src/test/java/org/apache/xml/security/test/dom/encryption/XMLEncryption11Test.java:176 test path "http://www.w3.org/2009/xmlenc11#aes128-gcm"
  17. src/test/java/org/apache/xml/security/test/dom/encryption/XMLEncryption11Test.java:472 test path "AGRMNT.1, plaintext.xml, EC-P256_SHA256WithECDSA-v02.p12, PKCS12, passwd, test-certificate, http://www.w3.org/2001/04/xmlenc#kw-aes128, http://www.w3.org/2009/xmlenc11#aes128-gcm, http://www.w3.org/2001/04/xmlenc#sha256",
  18. src/test/java/org/apache/xml/security/test/dom/encryption/XMLEncryption11Test.java:580 test path "AGRMNT.4, binary-data.hex, EC-P256.pfx, PKCS12, 1234, certreq-5b4623c8-5790-4b32-b59f-540c8bcfda4a, http://www.w3.org/2001/04/xmlenc#kw-aes128, http://www.w3.org/2009/xmlenc11#aes128-gcm, http://www.w3.org/2001/04/xmlenc#sha256",
  19. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:360 test path "http://www.w3.org/2001/04/xmlenc#aes128-cbc", secretKey,
  20. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:398 test path "http://www.w3.org/2001/04/xmlenc#aes128-cbc");
  21. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:400 test path securityEventListener, "http://www.w3.org/2001/04/xmlenc#aes128-cbc",
  22. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:685 test path "http://www.w3.org/2001/04/xmlenc#aes128-cbc", secretKey,
  23. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:724 test path securityEventListener, "http://www.w3.org/2001/04/xmlenc#aes128-cbc", "");
  24. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:376 test path properties.setEncryptionSymAlgorithm("http://www.w3.org/2001/04/xmlenc#aes128-cbc");
  25. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:405 test path decryptUsingDOM("http://www.w3.org/2001/04/xmlenc#aes128-cbc", null, transportKey, document);
  26. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1053 test path properties.setEncryptionSymAlgorithm("http://www.w3.org/2001/04/xmlenc#aes128-cbc");
  27. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1082 test path decryptUsingDOM("http://www.w3.org/2001/04/xmlenc#aes128-cbc", key, null, document);
  28. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1385 test path properties.setEncryptionSymAlgorithm("http://www.w3.org/2001/04/xmlenc#aes128-cbc");
  29. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1414 test path decryptUsingDOM("http://www.w3.org/2001/04/xmlenc#aes128-cbc", null, transportKey, document);
  30. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1459 test path properties.setEncryptionSymAlgorithm("http://www.w3.org/2001/04/xmlenc#aes128-cbc");
  31. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1493 test path properties.setEncryptionSymAlgorithm("http://www.w3.org/2001/04/xmlenc#aes128-cbc");
  32. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionCreationTest.java:121 test path String algorithm = "http://www.w3.org/2001/04/xmlenc#aes128-cbc";
  33. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionCreationTest.java:128 test path String wrappingAlgorithm = "http://www.w3.org/2001/04/xmlenc#kw-aes128";
  34. src/test/java/org/apache/xml/security/test/stax/encryption/SymmetricEncryptionCreationTest.java:114 test path String algorithm = "http://www.w3.org/2001/04/xmlenc#aes128-cbc";
  35. src/test/java/org/apache/xml/security/test/stax/encryption/SymmetricEncryptionCreationTest.java:163 test path String algorithm = "http://www.w3.org/2009/xmlenc11#aes128-gcm";
  36. src/test/java/org/apache/xml/security/test/stax/encryption/SymmetricEncryptionVerificationTest.java:129 test path String algorithm = "http://www.w3.org/2001/04/xmlenc#aes128-cbc";
  37. src/test/java/org/apache/xml/security/test/stax/encryption/SymmetricEncryptionVerificationTest.java:181 test path String algorithm = "http://www.w3.org/2009/xmlenc11#aes128-gcm";
  38. src/test/java/org/apache/xml/security/test/stax/encryption/XMLEncryption11Test.java:154 test path sessionKey, "http://www.w3.org/2009/xmlenc11#aes128-gcm",
  39. src/test/java/org/apache/xml/security/test/stax/encryption/XMLEncryption11Test.java:204 test path sessionKey, "http://www.w3.org/2009/xmlenc11#aes128-gcm",
  40. src/test/resources/com/phaos/phaos-xmlenc-3/bad-alg-enc-element-aes128-kw-3des.xml:5 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
  41. src/test/resources/com/phaos/phaos-xmlenc-3/enc-content-aes128-kw-3des.xml:6 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
  42. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes128-ka-dh.xml:5 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
  43. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes128-kt-rsa1_5.xml:5 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
  44. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes128-kt-rsa_oaep_sha1.xml:5 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
  45. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes128-kw-aes128.xml:5 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
  46. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes128-kw-aes128.xml:8 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#kw-aes128"/>
  47. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes128-kw-aes256.xml:5 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
  48. src/test/resources/com/phaos/phaos-xmlenc-3/enc-text-aes128-kw-aes192.xml:6 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
  49. src/test/resources/config-xalan.xml:443 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes128-cbc"
  50. src/test/resources/config-xalan.xml:470 test path <Algorithm URI="http://www.w3.org/2009/xmlenc11#aes128-gcm"
  51. src/test/resources/config-xalan.xml:569 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes128"
  52. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/bad-encrypt-content-aes128-cbc-kw-aes192.xml:16 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc" />
  53. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-content-aes128-cbc-kw-aes192.xml:16 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc" />
  54. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-data-aes128-cbc.xml:3 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc" />
  55. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-element-aes128-cbc-rsa-1_5.xml:15 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc" />
  56. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-element-tripledes-cbc-kw-aes128.xml:18 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#kw-aes128" />
  57. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encsig-sha256-hmac-sha256-kw-aes128.xml:16 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#kw-aes128" />
  58. src/test/resources/security-config-allow-same-doc.xml:397 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes128-cbc"
  59. src/test/resources/security-config-allow-same-doc.xml:424 test path <Algorithm URI="http://www.w3.org/2009/xmlenc11#aes128-gcm"
  60. src/test/resources/security-config-allow-same-doc.xml:523 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes128"
  61. src/test/resources/security-config-ex-manifests.xml:397 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes128-cbc"
  62. src/test/resources/security-config-ex-manifests.xml:424 test path <Algorithm URI="http://www.w3.org/2009/xmlenc11#aes128-gcm"
  63. src/test/resources/security-config-ex-manifests.xml:523 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes128"
  64. src/test/resources/security-config-max-ref-per.xml:397 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes128-cbc"
  65. src/test/resources/security-config-max-ref-per.xml:424 test path <Algorithm URI="http://www.w3.org/2009/xmlenc11#aes128-gcm"
  66. src/test/resources/security-config-max-ref-per.xml:523 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes128"
  67. src/test/resources/security-config-max-trans-per.xml:397 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes128-cbc"
  68. src/test/resources/security-config-max-trans-per.xml:424 test path <Algorithm URI="http://www.w3.org/2009/xmlenc11#aes128-gcm"
  69. src/test/resources/security-config-max-trans-per.xml:523 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes128"
xmldsig.algorithm · CWE-327
AES-128128-bit Reduced margin 36 places See details

Classical public-key cipher through the JCA

`Cipher.getInstance()` with a transformation whose algorithm component is a public-key or legacy symmetric cipher. The transformation string is parsed into algorithm, mode and padding, so `RSA/ECB/PKCS1Padding` is separated from `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`.

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. For RSA encryption, move to ML-KEM-768 and keep RSA-OAEP only as the classical half of a hybrid during transition.

  1. src/test/java/org/apache/xml/security/test/dom/algorithms/KeyWrapEncryptionAlgorithmTest.java:103 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  2. src/test/java/org/apache/xml/security/test/dom/algorithms/KeyWrapEncryptionAlgorithmTest.java:109 test path keygen = KeyGenerator.getInstance("AES");
  3. src/test/java/org/apache/xml/security/test/dom/algorithms/SymmetricEncryptionAlgorithmTest.java:95 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  4. src/test/java/org/apache/xml/security/test/dom/algorithms/SymmetricEncryptionAlgorithmTest.java:125 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  5. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:180 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  6. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:1244 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  7. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:1279 test path KeyGenerator generator = KeyGenerator.getInstance("AES", "BC");
  8. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:1327 test path keygen = KeyGenerator.getInstance("AES");
  9. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:1426 test path KeyGenerator trafficKeyGenerator = KeyGenerator.getInstance("AES");
  10. src/test/java/org/apache/xml/security/test/dom/encryption/XMLEncryption11TestAbstract.java:424 test path KeyGenerator keyGen = KeyGenerator.getInstance("AES");
  11. src/test/java/org/apache/xml/security/test/stax/IVSplittingOutputStreamTest.java:46 test path KeyGenerator keyGenerator = KeyGenerator.getInstance("AES");
  12. src/test/java/org/apache/xml/security/test/stax/IVSplittingOutputStreamTest.java:49 test path Cipher cipher = Cipher.getInstance("AES/CBC/ISO10126Padding");
  13. src/test/java/org/apache/xml/security/test/stax/IVSplittingOutputStreamTest.java:72 test path KeyGenerator keyGenerator = KeyGenerator.getInstance("AES");
  14. src/test/java/org/apache/xml/security/test/stax/IVSplittingOutputStreamTest.java:75 test path Cipher cipher = Cipher.getInstance("AES/CBC/ISO10126Padding");
  15. src/test/java/org/apache/xml/security/test/stax/IVSplittingOutputStreamTest.java:95 test path KeyGenerator keyGenerator = KeyGenerator.getInstance("AES");
  16. src/test/java/org/apache/xml/security/test/stax/IVSplittingOutputStreamTest.java:98 test path Cipher cipher = Cipher.getInstance("AES/CBC/ISO10126Padding");
  17. src/test/java/org/apache/xml/security/test/stax/IVSplittingOutputStreamTest.java:125 test path KeyGenerator keyGenerator = KeyGenerator.getInstance("AES");
  18. src/test/java/org/apache/xml/security/test/stax/IVSplittingOutputStreamTest.java:128 test path Cipher cipher = Cipher.getInstance("AES/CBC/ISO10126Padding");
  19. src/test/java/org/apache/xml/security/test/stax/IVSplittingOutputStreamTest.java:152 test path KeyGenerator keyGenerator = KeyGenerator.getInstance("AES");
  20. src/test/java/org/apache/xml/security/test/stax/IVSplittingOutputStreamTest.java:155 test path Cipher cipher = Cipher.getInstance("AES/CBC/ISO10126Padding");
  21. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:352 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  22. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:1379 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  23. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:1434 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  24. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:1499 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  25. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:1564 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  26. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:1637 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  27. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:1705 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  28. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:372 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  29. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionCreationTest.java:117 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  30. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionCreationTest.java:125 test path keygen = KeyGenerator.getInstance("AES");
  31. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionVerificationTest.java:126 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  32. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionVerificationTest.java:132 test path keygen = KeyGenerator.getInstance("AES");
  33. src/test/java/org/apache/xml/security/test/stax/encryption/SymmetricEncryptionCreationTest.java:109 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  34. src/test/java/org/apache/xml/security/test/stax/encryption/SymmetricEncryptionCreationTest.java:158 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  35. src/test/java/org/apache/xml/security/test/stax/encryption/SymmetricEncryptionVerificationTest.java:122 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  36. src/test/java/org/apache/xml/security/test/stax/encryption/SymmetricEncryptionVerificationTest.java:174 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
java.cipher · CWE-327
AES Reduced margin 30 places See details

Key material constructed for a named algorithm

`new SecretKeySpec(bytes, "AES")` and the other key-spec constructors name the algorithm as an argument rather than through `getInstance()`. Code that wraps raw bytes into a key this way often never calls `getInstance()` at all, so the algorithm is invisible to a scan that only looks at the factories.

This wraps raw bytes into a key for a named algorithm. It is part of the same migration as whatever uses that key.

What to do. Wherever this key is used, the same migration applies as to the call that consumes it. Trace it to the operation and treat the two together.

  1. src/main/java/org/apache/xml/security/utils/KeyUtils.java:217 return new SecretKeySpec(kek, "AES");
  2. src/test/java/org/apache/xml/security/test/dom/encryption/BaltimoreEncTest.java:448 test path SecretKey key = new SecretKeySpec(jobBytes, "AES");
  3. src/test/java/org/apache/xml/security/test/dom/encryption/BaltimoreEncTest.java:453 test path SecretKey key = new SecretKeySpec(jebBytes, "AES");
  4. src/test/java/org/apache/xml/security/test/dom/encryption/BaltimoreEncTest.java:458 test path SecretKey key = new SecretKeySpec(jedBytes, "AES");
  5. src/test/java/org/apache/xml/security/test/dom/encryption/EncryptionFormattingTest.java:137 test path return new SecretKeySpec(keyBytes, "AES");
  6. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:177 test path Key kek = new SecretKeySpec(bits192, "AES");
  7. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:760 test path Key key = new SecretKeySpec(bits128, "AES");
  8. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:806 test path Key key = new SecretKeySpec(bits192, "AES");
  9. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:852 test path Key key = new SecretKeySpec(bits256, "AES");
  10. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:1046 test path Key key = new SecretKeySpec("abcdefghijklmnop".getBytes(StandardCharsets.US_ASCII), "AES");
  11. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:1179 test path Key key = new SecretKeySpec(bits128, "AES");
  12. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:1388 test path Key serverKey = new SecretKeySpec(bits256, "AES");
  13. src/test/java/org/apache/xml/security/test/dom/keys/keyresolver/KeyResolverTest.java:228 test path SecretKeySpec dataEncryptKey = new SecretKeySpec(keyBytes, "AES");
  14. src/test/java/org/apache/xml/security/test/stax/encryption/BaltimoreEncTest.java:152 test path SecretKey secretKey = new SecretKeySpec(keyBytes, "AES");
  15. src/test/java/org/apache/xml/security/test/stax/encryption/BaltimoreEncTest.java:188 test path SecretKey secretKey = new SecretKeySpec(keyBytes, "AES");
  16. src/test/java/org/apache/xml/security/test/stax/encryption/BaltimoreEncTest.java:224 test path SecretKey secretKey = new SecretKeySpec(keyBytes, "AES");
  17. src/test/java/org/apache/xml/security/test/stax/encryption/BaltimoreEncTest.java:292 test path SecretKey secretKey = new SecretKeySpec(keyBytes, "AES");
  18. src/test/java/org/apache/xml/security/test/stax/encryption/BaltimoreEncTest.java:362 test path SecretKey secretKey = new SecretKeySpec(keyBytes, "AES");
  19. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:349 test path SecretKey kek = new SecretKeySpec(bits192, "AES");
  20. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:679 test path SecretKey secretKey = new SecretKeySpec(bits128, "AES");
  21. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:741 test path SecretKey secretKey = new SecretKeySpec(bits192, "AES");
  22. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:805 test path SecretKey secretKey = new SecretKeySpec(bits256, "AES");
  23. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:368 test path SecretKey transportKey = new SecretKeySpec(bits192, "AES");
  24. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1051 test path SecretKey key = new SecretKeySpec(bits128, "AES");
  25. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1105 test path SecretKey key = new SecretKeySpec(bits192, "AES");
  26. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1161 test path SecretKey key = new SecretKeySpec(bits256, "AES");
  27. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1382 test path SecretKey transportKey = new SecretKeySpec(bits192, "AES");
  28. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1456 test path SecretKey transportKey = new SecretKeySpec(bits192, "AES");
  29. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1490 test path SecretKey transportKey = new SecretKeySpec(bits192, "AES");
  30. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionFormattingTest.java:154 test path return new SecretKeySpec(keyBytes, "AES");
java.keyspec · CWE-327
AES-192 Reduced margin 28 places See details

XML signature or encryption algorithm

An XML Signature or XML Encryption algorithm URI - SAML, XAdES or WS-Security. The URI names the algorithm exactly, and a signature URI names its digest as well, so `#rsa-sha1` reports both the key and the broken digest.

Federated login and signed XML documents name their cryptography in a web address. Some of those addresses name algorithms that are already broken.

What to do. Move off `#rsa-sha1` first: that signature is forgeable today, with no quantum computer involved. The key algorithm changes with the wider migration.

  1. src/main/java/org/apache/xml/security/encryption/XMLCipherParameters.java:33 "http://www.w3.org/2001/04/xmlenc#aes192-cbc";
  2. src/main/java/org/apache/xml/security/resource/config.xml:457 <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes192-cbc"
  3. src/main/resources/security-config.xml:406 <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes192-cbc"
  4. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:565 test path "http://www.w3.org/2001/04/xmlenc#aes192-cbc", secretKey,
  5. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:603 test path "http://www.w3.org/2001/04/xmlenc#aes192-cbc");
  6. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:605 test path securityEventListener, "http://www.w3.org/2001/04/xmlenc#aes192-cbc",
  7. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:747 test path "http://www.w3.org/2001/04/xmlenc#aes192-cbc", secretKey,
  8. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:786 test path securityEventListener, "http://www.w3.org/2001/04/xmlenc#aes192-cbc", "");
  9. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:951 test path properties.setEncryptionSymAlgorithm("http://www.w3.org/2001/04/xmlenc#aes192-cbc");
  10. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:980 test path decryptUsingDOM("http://www.w3.org/2001/04/xmlenc#aes192-cbc", null, transportKey, document);
  11. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1107 test path properties.setEncryptionSymAlgorithm("http://www.w3.org/2001/04/xmlenc#aes192-cbc");
  12. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:1136 test path decryptUsingDOM("http://www.w3.org/2001/04/xmlenc#aes192-cbc", key, null, document);
  13. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionCreationTest.java:178 test path String algorithm = "http://www.w3.org/2001/04/xmlenc#aes192-cbc";
  14. src/test/java/org/apache/xml/security/test/stax/encryption/SymmetricEncryptionCreationTest.java:212 test path String algorithm = "http://www.w3.org/2001/04/xmlenc#aes192-cbc";
  15. src/test/java/org/apache/xml/security/test/stax/encryption/SymmetricEncryptionVerificationTest.java:233 test path String algorithm = "http://www.w3.org/2001/04/xmlenc#aes192-cbc";
  16. src/test/resources/com/phaos/phaos-xmlenc-3/enc-content-aes192-kw-aes256.xml:6 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes192-cbc"/>
  17. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes192-ka-dh.xml:5 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes192-cbc"/>
  18. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes192-kt-rsa_oaep_sha1.xml:5 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes192-cbc"/>
  19. src/test/resources/com/phaos/phaos-xmlenc-3/enc-element-aes192-kw-aes192.xml:5 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes192-cbc"/>
  20. src/test/resources/com/phaos/phaos-xmlenc-3/enc-text-aes192-kt-rsa1_5.xml:6 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes192-cbc"/>
  21. src/test/resources/config-xalan.xml:452 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes192-cbc"
  22. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-content-aes192-cbc-dh-sha512.xml:16 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes192-cbc" />
  23. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-data-aes192-cbc-kw-aes256.xml:3 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes192-cbc" />
  24. src/test/resources/ie/baltimore/merlin-examples/merlin-xmlenc-five/encrypt-element-aes192-cbc-ref.xml:15 test path <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes192-cbc" />
  25. src/test/resources/security-config-allow-same-doc.xml:406 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes192-cbc"
  26. src/test/resources/security-config-ex-manifests.xml:406 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes192-cbc"
  27. src/test/resources/security-config-max-ref-per.xml:406 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes192-cbc"
  28. src/test/resources/security-config-max-trans-per.xml:406 test path <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes192-cbc"
xmldsig.algorithm · CWE-327
AES-192192-bit Reduced margin 17 places See details

Classical public-key cipher through the JCA

`Cipher.getInstance()` with a transformation whose algorithm component is a public-key or legacy symmetric cipher. The transformation string is parsed into algorithm, mode and padding, so `RSA/ECB/PKCS1Padding` is separated from `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`.

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. For RSA encryption, move to ML-KEM-768 and keep RSA-OAEP only as the classical half of a hybrid during transition.

  1. src/test/java/org/apache/xml/security/test/dom/algorithms/KeyWrapEncryptionAlgorithmTest.java:141 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  2. src/test/java/org/apache/xml/security/test/dom/algorithms/KeyWrapEncryptionAlgorithmTest.java:147 test path keygen = KeyGenerator.getInstance("AES");
  3. src/test/java/org/apache/xml/security/test/dom/algorithms/SymmetricEncryptionAlgorithmTest.java:155 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  4. src/test/java/org/apache/xml/security/test/dom/algorithms/SymmetricEncryptionAlgorithmTest.java:185 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  5. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:650 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  6. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:1319 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  7. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:1422 test path KeyGenerator wrapKeyGenerator = KeyGenerator.getInstance("AES");
  8. src/test/java/org/apache/xml/security/test/stax/encryption/DecryptionTest.java:557 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  9. src/test/java/org/apache/xml/security/test/stax/encryption/EncryptionCreationTest.java:947 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  10. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionCreationTest.java:174 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  11. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionCreationTest.java:182 test path keygen = KeyGenerator.getInstance("AES");
  12. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionVerificationTest.java:182 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  13. src/test/java/org/apache/xml/security/test/stax/encryption/KeyWrapEncryptionVerificationTest.java:188 test path keygen = KeyGenerator.getInstance("AES");
  14. src/test/java/org/apache/xml/security/test/stax/encryption/SymmetricEncryptionCreationTest.java:207 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  15. src/test/java/org/apache/xml/security/test/stax/encryption/SymmetricEncryptionCreationTest.java:256 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  16. src/test/java/org/apache/xml/security/test/stax/encryption/SymmetricEncryptionVerificationTest.java:226 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  17. src/test/java/org/apache/xml/security/test/stax/encryption/SymmetricEncryptionVerificationTest.java:278 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
java.cipher · CWE-327
SHA-256 Reduced margin From a constant 9 places See details

Mask-generation digest named for RSA padding

`MGF1ParameterSpec.SHA256` names the digest inside RSA-OAEP and RSA-PSS padding. It is a separate choice from the digest the signature or the cipher uses, it is frequently left at SHA-1 by default, and a static import of it - `import static java.security.spec.MGF1ParameterSpec.SHA512` - is the only place the choice appears in the file that makes it.

This picks the hash used inside RSA padding. It matters because the default is often SHA-1, which is broken today without any quantum computer.

What to do. The mask-generation digest travels with the RSA key it pads. When that key moves to ML-KEM or ML-DSA the padding goes with it; until then, SHA-256 or better.

  1. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMRSAPSSSignatureMethod.java:247 signature.setParameter(new PSSParameterSpec(digestName, "MGF1", new MGF1ParameterSpec(digestName), saltLength, trailerField));
  2. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMRSAPSSSignatureMethod.java:288 signature.setParameter(new PSSParameterSpec(digestName, "MGF1", new MGF1ParameterSpec(digestName), saltLength, trailerField));
  3. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:780 = new PSSParameterSpec("SHA-256", "MGF1", MGF1ParameterSpec.SHA256,
  4. src/main/java/org/apache/xml/security/algorithms/implementations/SignatureBaseRSA.java:484 = new PSSParameterSpec("SHA-256", "MGF1", MGF1ParameterSpec.SHA256,
  5. src/main/java/org/apache/xml/security/encryption/XMLCipherUtil.java:152 return new MGF1ParameterSpec("SHA-256");
  6. src/test/java/org/apache/xml/security/test/dom/algorithms/PKSignatureAlgorithmTest.java:351 test path new PSSParameterSpec("SHA-256", "MGF1", MGF1ParameterSpec.SHA256, 32, 1));
  7. src/test/java/org/apache/xml/security/test/dom/algorithms/SignatureAlgorithmTest.java:120 test path ? new PSSParameterSpec("SHA-256", "MGF1", MGF1ParameterSpec.SHA256, 32, 1)
  8. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureCreationTest.java:42 test path import static java.security.spec.MGF1ParameterSpec.SHA256;
  9. src/test/java/org/apache/xml/security/test/stax/signature/PKSignatureVerificationTest.java:46 test path import static java.security.spec.MGF1ParameterSpec.SHA256;
java.mgf1 · CWE-327
AES Reduced margin 7 places 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/apache/xml/security/algorithms/JCEMapper.java:271 new Algorithm("AES", "AES/CBC/ISO10126Padding", "BlockEncryption", 128, 128)
  2. src/main/java/org/apache/xml/security/algorithms/JCEMapper.java:275 new Algorithm("AES", "AES/CBC/ISO10126Padding", "BlockEncryption", 192, 128)
  3. src/main/java/org/apache/xml/security/algorithms/JCEMapper.java:279 new Algorithm("AES", "AES/CBC/ISO10126Padding", "BlockEncryption", 256, 128)
  4. src/main/java/org/apache/xml/security/algorithms/JCEMapper.java:283 new Algorithm("AES", "AES/GCM/NoPadding", "BlockEncryption", 128, 96)
  5. src/main/java/org/apache/xml/security/algorithms/JCEMapper.java:287 new Algorithm("AES", "AES/GCM/NoPadding", "BlockEncryption", 192, 96)
  6. src/main/java/org/apache/xml/security/algorithms/JCEMapper.java:291 new Algorithm("AES", "AES/GCM/NoPadding", "BlockEncryption", 256, 96)
  7. src/main/java/org/apache/xml/security/encryption/XMLCipherUtil.java:74 return constructBlockCipherParametersForGCMAlgorithm("AES/GCM/NoPadding", iv);
java.transformation · CWE-327
AES Reduced margin 5 places See details

Classical public-key cipher through the JCA

`Cipher.getInstance()` with a transformation whose algorithm component is a public-key or legacy symmetric cipher. The transformation string is parsed into algorithm, mode and padding, so `RSA/ECB/PKCS1Padding` is separated from `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`.

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. The key size was not visible at this call site, so the weaker case is assumed.

What to do. For RSA encryption, move to ML-KEM-768 and keep RSA-OAEP only as the classical half of a hybrid during transition.

  1. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherBrainpoolTest.java:175 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  2. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:345 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  3. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:441 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  4. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:533 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
  5. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:575 test path KeyGenerator keygen = KeyGenerator.getInstance("AES");
java.cipher · CWE-327
SHA-256 Reduced margin 4 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/test/java/org/apache/xml/security/test/dom/algorithms/DigestAlgorithmTest.java:128 test path MessageDigest md = MessageDigest.getInstance("SHA-256");
  2. src/test/java/org/apache/xml/security/test/dom/c14n/implementations/Santuario561Test.java:45 test path MessageDigest md = MessageDigest.getInstance("SHA-256");
  3. src/test/java/org/apache/xml/security/test/dom/signature/XMLSignatureInputTest.java:117 test path MessageDigest md = MessageDigest.getInstance("SHA-256");
  4. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/XMLSignatureTest.java:410 test path Signature.getInstance("SHA256withDSA");
java.messagedigest · CWE-328
SHA-224 Reduced margin 3 places See details

Mask-generation digest named for RSA padding

`MGF1ParameterSpec.SHA256` names the digest inside RSA-OAEP and RSA-PSS padding. It is a separate choice from the digest the signature or the cipher uses, it is frequently left at SHA-1 by default, and a static import of it - `import static java.security.spec.MGF1ParameterSpec.SHA512` - is the only place the choice appears in the file that makes it.

This picks the hash used inside RSA padding. It matters because the default is often SHA-1, which is broken today without any quantum computer.

What to do. The mask-generation digest travels with the RSA key it pads. When that key moves to ML-KEM or ML-DSA the padding goes with it; until then, SHA-256 or better.

  1. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:753 = new PSSParameterSpec("SHA-224", "MGF1", MGF1ParameterSpec.SHA224,
  2. src/main/java/org/apache/xml/security/algorithms/implementations/SignatureBaseRSA.java:450 = new PSSParameterSpec("SHA-224", "MGF1", MGF1ParameterSpec.SHA224,
  3. src/main/java/org/apache/xml/security/encryption/XMLCipherUtil.java:150 return new MGF1ParameterSpec("SHA-224");
java.mgf1 · CWE-327
SHA3-256 Reduced margin 2 places See details

Mask-generation digest named for RSA padding

`MGF1ParameterSpec.SHA256` names the digest inside RSA-OAEP and RSA-PSS padding. It is a separate choice from the digest the signature or the cipher uses, it is frequently left at SHA-1 by default, and a static import of it - `import static java.security.spec.MGF1ParameterSpec.SHA512` - is the only place the choice appears in the file that makes it.

This picks the hash used inside RSA padding. It matters because the default is often SHA-1, which is broken today without any quantum computer.

What to do. The mask-generation digest travels with the RSA key it pads. When that key moves to ML-KEM or ML-DSA the padding goes with it; until then, SHA-256 or better.

java.mgf1 · CWE-327
RIPEMD-160 Reduced margin 1 place 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. A 160-bit digest, used in Bitcoin address derivation. Grover halves the pre-image margin; the 80-bit collision margin is the nearer concern.

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

  1. src/test/java/org/apache/xml/security/test/dom/algorithms/DigestAlgorithmTest.java:201 test path MessageDigest md = MessageDigest.getInstance("RIPEMD160");
java.messagedigest · CWE-328
SHA-224 Reduced margin 1 place 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. 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 that must remain verifiable for decades.

  1. src/test/java/org/apache/xml/security/test/dom/algorithms/DigestAlgorithmTest.java:110 test path MessageDigest md = MessageDigest.getInstance("SHA-224");
java.messagedigest · CWE-328
SHA-256 Reduced margin From a constant 1 place 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/apache/jcp/xml/dsig/internal/dom/DOMRSAPSSSignatureMethod.java:164 digestMethodElement.setAttributeNS(null, Constants._ATT_ALGORITHM, DigestAlgorithm.fromDigestAlgorithm(digestName).getXmlDigestAlgorithm());
config.algorithm-setting · CWE-327
SHA3-256 Reduced margin 1 place 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. 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 that must remain verifiable for decades.

  1. src/test/java/org/apache/xml/security/test/dom/algorithms/DigestAlgorithmTest.java:258 test path MessageDigest md = MessageDigest.getInstance("SHA3-256");
java.messagedigest · CWE-328
SHA-224 Reduced margin 13 places See details

XML signature or encryption algorithm

An XML Signature or XML Encryption algorithm URI - SAML, XAdES or WS-Security. The URI names the algorithm exactly, and a signature URI names its digest as well, so `#rsa-sha1` reports both the key and the broken digest.

Federated login and signed XML documents name their cryptography in a web address. Some of those addresses name algorithms that are already broken.

What to do. Move off `#rsa-sha1` first: that signature is forgeable today, with no quantum computer involved. The key algorithm changes with the wider migration.

  1. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:70 "http://www.w3.org/2001/04/xmldsig-more#rsa-sha224";
  2. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:200 } else if (alg.equals(RSA_SHA224)) {
  3. src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:643 return RSA_SHA224;
  4. src/main/java/org/apache/xml/security/resource/config.xml:90 <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha224"
  5. src/main/java/org/apache/xml/security/resource/config.xml:256 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha224"
  6. src/main/resources/security-config.xml:205 <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha224"
  7. src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/PKSignatureAlgorithmTest.java:136 test path rsaSha224 = fac.newSignatureMethod("http://www.w3.org/2001/04/xmldsig-more#rsa-sha224", null);
  8. src/test/resources/config-xalan.xml:90 test path <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha224"
  9. src/test/resources/config-xalan.xml:251 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha224"
  10. src/test/resources/security-config-allow-same-doc.xml:205 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha224"
  11. src/test/resources/security-config-ex-manifests.xml:205 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha224"
  12. src/test/resources/security-config-max-ref-per.xml:205 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha224"
  13. src/test/resources/security-config-max-trans-per.xml:205 test path <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha224"
xmldsig.algorithm · CWE-327
unknown Could not be determined 36 places See details

Key pair algorithm chosen at runtime

`KeyPairGenerator.getInstance(x)` where the argument is an identifier. The algorithm cannot be resolved without running the program, so this is reported as an unknown rather than assumed to be classical.

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/apache/xml/security/algorithms/implementations/SignatureBaseRSA.java:73 return Signature.getInstance(algorithmID);
  2. src/main/java/org/apache/xml/security/algorithms/implementations/SignatureBaseRSA.java:76 return Signature.getInstance(algorithmID, providerId);
  3. src/main/java/org/apache/xml/security/algorithms/implementations/SignatureBaseRSA.java:80 return Signature.getInstance(algorithmID, provider);
  4. src/main/java/org/apache/xml/security/algorithms/implementations/SignatureDSA.java:82 this.signatureAlgorithm = Signature.getInstance(algorithmID);
  5. src/main/java/org/apache/xml/security/algorithms/implementations/SignatureDSA.java:85 this.signatureAlgorithm = Signature.getInstance(algorithmID, providerId);
  6. src/main/java/org/apache/xml/security/algorithms/implementations/SignatureDSA.java:89 this.signatureAlgorithm = Signature.getInstance(algorithmID, provider);
  7. src/main/java/org/apache/xml/security/algorithms/implementations/SignatureECDSA.java:105 this.signatureAlgorithm = Signature.getInstance(algorithmID);
  8. src/main/java/org/apache/xml/security/algorithms/implementations/SignatureECDSA.java:108 this.signatureAlgorithm = Signature.getInstance(algorithmID, providerId);
  9. src/main/java/org/apache/xml/security/algorithms/implementations/SignatureECDSA.java:112 this.signatureAlgorithm = Signature.getInstance(algorithmID, provider);
  10. src/main/java/org/apache/xml/security/algorithms/implementations/SignatureEDDSA.java:66 this.signatureAlgorithm = Signature.getInstance(algorithmID);
  11. src/main/java/org/apache/xml/security/algorithms/implementations/SignatureEDDSA.java:69 this.signatureAlgorithm = Signature.getInstance(algorithmID, providerId);
  12. src/main/java/org/apache/xml/security/algorithms/implementations/SignatureEDDSA.java:73 this.signatureAlgorithm = Signature.getInstance(algorithmID, provider);
  13. src/main/java/org/apache/xml/security/encryption/XMLCipher.java:1659 c = Cipher.getInstance(jceAlgorithm);
  14. src/main/java/org/apache/xml/security/encryption/XMLCipher.java:1661 c = Cipher.getInstance(jceAlgorithm, requestedJCEProvider);
  15. src/main/java/org/apache/xml/security/encryption/XMLCipher.java:1885 c = Cipher.getInstance(jceAlgorithm);
  16. src/main/java/org/apache/xml/security/encryption/XMLCipher.java:1887 c = Cipher.getInstance(jceAlgorithm, requestedJCEProvider);
  17. src/main/java/org/apache/xml/security/keys/content/DEREncodedKeyValue.java:117 KeyFactory keyFactory = KeyFactory.getInstance(keyType);
  18. src/main/java/org/apache/xml/security/stax/ext/OutboundXMLSec.java:256 keyGen = KeyGenerator.getInstance(keyAlgorithm);
  19. src/main/java/org/apache/xml/security/stax/impl/algorithms/PKISignatureAlgorithm.java:52 signature = Signature.getInstance(this.jceName, jceProvider);
  20. src/main/java/org/apache/xml/security/stax/impl/algorithms/PKISignatureAlgorithm.java:54 signature = Signature.getInstance(this.jceName);
  21. src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractDecryptInputProcessor.java:446 symCipher = Cipher.getInstance(jceName, jceProvider);
  22. src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractDecryptInputProcessor.java:448 symCipher = Cipher.getInstance(jceName);
  23. src/main/java/org/apache/xml/security/stax/impl/processor/input/XMLEncryptedKeyInputHandler.java:192 cipher = Cipher.getInstance(jceName);
  24. src/main/java/org/apache/xml/security/stax/impl/processor/input/XMLEncryptedKeyInputHandler.java:194 cipher = Cipher.getInstance(jceName, jceProvider);
  25. src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractEncryptOutputProcessor.java:168 Cipher symmetricCipher = Cipher.getInstance(jceAlgorithm);
  26. src/main/java/org/apache/xml/security/stax/impl/processor/output/XMLEncryptOutputProcessor.java:201 Cipher cipher = Cipher.getInstance(jceid);
  27. src/main/java/org/apache/xml/security/utils/KeyUtils.java:192 return provider == null ? KeyPairGenerator.getInstance(algorithm)
  28. src/main/java/org/apache/xml/security/utils/KeyUtils.java:193 : KeyPairGenerator.getInstance(algorithm, provider);
  29. src/main/java/org/apache/xml/security/utils/KeyUtils.java:212 KeyAgreement keyAgreement = KeyAgreement.getInstance(keyAgreementAlgorithm);
  30. src/test/java/org/apache/xml/security/test/dom/encryption/BaltimoreEncTest.java:140 test path if (Cipher.getInstance(algorithmId) != null) {
  31. src/test/java/org/apache/xml/security/test/dom/encryption/EncryptContentTest.java:101 test path if (Cipher.getInstance(algorithmId) != null) {
  32. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherBrainpoolTest.java:101 test path if (Cipher.getInstance(algorithmId) != null) {
  33. src/test/java/org/apache/xml/security/test/dom/encryption/XMLCipherTest.java:135 test path if (Cipher.getInstance(algorithmId) != null) {
  34. src/test/java/org/apache/xml/security/test/dom/encryption/XMLEncryption11TestAbstract.java:112 test path if (Cipher.getInstance(algorithmId) != null) {
  35. src/test/java/org/apache/xml/security/test/dom/keys/DEREncodedKeyValueTest.java:255 test path KeyFactory.getInstance(algorithm) : KeyFactory.getInstance(algorithm, provider);
  36. src/test/java/org/apache/xml/security/test/dom/keys/keyresolver/KeyInfoReferenceResolverTest.java:155 test path KeyFactory kf = KeyFactory.getInstance(algorithm);
java.keypairgenerator.variable · CWE-327
unknown Could not be determined 4 places See details

Mask-generation digest named for RSA padding

`MGF1ParameterSpec.SHA256` names the digest inside RSA-OAEP and RSA-PSS padding. It is a separate choice from the digest the signature or the cipher uses, it is frequently left at SHA-1 by default, and a static import of it - `import static java.security.spec.MGF1ParameterSpec.SHA512` - is the only place the choice appears in the file that makes it.

This picks the hash used inside RSA padding. It matters because the default is often SHA-1, which is broken today without any quantum computer.

What to do. The mask-generation digest travels with the RSA key it pads. When that key moves to ML-KEM or ML-DSA the padding goes with it; until then, SHA-256 or better.

java.mgf1 · CWE-327
unknown Could not be determined 2 places See details

Key store holding classical key material

`KeyStore.getInstance("JKS"|"PKCS12"|"BCFKS")`. The store format itself is not the issue; it is the inventory point where the classical private keys of this application live.

This is the application's key cupboard. It is worth knowing what is in it before planning any replacement.

What to do. Record which keys this store holds. A key store is where a migration either happens or silently does not.

  1. src/test/java/org/apache/xml/security/test/XmlSecTestEnvironment.java:53 test path KeyStore ks = KeyStore.getInstance("JKS");
  2. src/test/java/org/apache/xml/security/test/dom/encryption/EncryptionFormattingTest.java:72 test path keyStore = KeyStore.getInstance("PKCS12");
java.keystore
unknown Could not be determined 1 place See details

Non-cryptographic randomness near key material

`new Random()` or `Math.random()` in a file that also imports `java.security`, `javax.crypto` or BouncyCastle. `java.util.Random` is a linear congruential generator and its output is predictable from a handful of samples. The import check is what keeps this from firing on every retry jitter and test fixture in the tree.

Part of this code uses a predictable source of random numbers. If any key comes from it, that key can be guessed today, with no quantum computer needed.

What to do. `java.security.SecureRandom`. This is a classical defect, not a quantum one, and it is worth fixing first.

java.random.insecure · CWE-338
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:744 <artifactId>bcprov-jdk18on</artifactId>
dep.crypto-library

Cryptographic assets

Algorithm Assessment What it means Occurrences
SHA-1 Already broken SHAttered and subsequent work produced practical collisions; NIST withdrew SHA-1 in 2030 guidance and it is already unacceptable for signatures. 782
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. 400
3DES Already broken Triple DES is withdrawn by NIST and limited by its 64-bit block, independent of quantum. 149
RSASSA-PKCS1v15 Quantum-vulnerable Broken by Shor's algorithm on a cryptographically relevant quantum computer. The v1.5 signature scheme of RFC 8017 section 8.2 has no classical break of its own; RSA-PSS is preferred for new work, but the quantum exposure is the same for both. 147
AES-256 Quantum-safe No known quantum algorithm changes the security margin. 143
AES-128 Reduced margin Grover's algorithm halves the effective strength; the parameter, not the design, is the problem. 105
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. 100
DSA Quantum-vulnerable Broken by Shor's algorithm on a cryptographically relevant quantum computer. 88
ECDSA Quantum-vulnerable Broken by Shor's algorithm on a cryptographically relevant quantum computer. 81
RSA-OAEP Quantum-vulnerable Broken by Shor's algorithm on a cryptographically relevant quantum computer. 69
SHA-384 Quantum-safe No known quantum algorithm changes the security margin. 60
SHA-512 Quantum-safe No known quantum algorithm changes the security margin. 58
HMAC Quantum-safe A keyed MAC is not affected by Shor and only marginally by Grover. 46
RSA Quantum-vulnerable Broken by Shor's algorithm on a cryptographically relevant quantum computer. 45
AES-192 Reduced margin Grover's algorithm halves the effective strength; the parameter, not the design, is the problem. 45
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. 42
RSAES-PKCS1v15 Already broken PKCS#1 v1.5 encryption padding is vulnerable to Bleichenbacher oracles today, and the underlying RSA is broken by Shor. 31
SHA-224 Reduced margin Grover's algorithm halves the effective strength; the parameter, not the design, is the problem. 17
RSA-PSS Quantum-vulnerable Broken by Shor's algorithm on a cryptographically relevant quantum computer. 13
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. 12
MD5 Already broken Practical chosen-prefix collisions exist; MD5 has no remaining security as a digest. 12
Ed25519 Quantum-vulnerable Broken by Shor's algorithm on a cryptographically relevant quantum computer. 8
EdDSA Quantum-vulnerable Broken by Shor's algorithm on a cryptographically relevant quantum computer. 5
CSPRNG Quantum-safe A cryptographically secure random number generator provided by the platform. Not weakened by a quantum computer. 5
SHA3-256 Reduced margin Grover's algorithm halves the effective strength; the parameter, not the design, is the problem. 3
SHA3-512 Quantum-safe No known quantum algorithm changes the security margin. 3
DES Already broken A 56-bit key is brute-forced classically in hours. 2
ECDH Quantum-vulnerable Broken by Shor's algorithm on a cryptographically relevant quantum computer. 1
RIPEMD-160 Reduced margin A 160-bit digest, used in Bitcoin address derivation. Grover halves the pre-image margin; the 80-bit collision margin is the nearer concern. 1

Imported cryptographic libraries

Library Files
java.security the JCA 158