Re: [PR] Add ML-DSA (FIPS 204) post-quantum signature su pport [santuario-xml-security-java]
github-advanced-security[bot] (via GitHub) <[email protected]>
| Newsgroups | gmane.text.xml.security.devel |
|---|---|
| Message-ID | <PR_kwDOD7oF988AAAABAj2I7w-28a4feeb-94bf-4d2a-b671-1c5b1a3e512c@gitbox.apache.org> |
github-advanced-security[bot] commented on code in PR #651:
URL: https://github.com/apache/santuario-xml-security-java/pull/651#discussion_r3830953041
##########
src/main/java/org/apache/xml/security/algorithms/implementations/SignatureMLDSA.java:
##########
@@ -0,0 +1,208 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.xml.security.algorithms.implementations;
+
+import java.lang.System.Logger;
+import java.lang.System.Logger.Level;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.Key;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.Provider;
+import java.security.SecureRandom;
+import java.security.Signature;
+import java.security.SignatureException;
+import java.security.spec.AlgorithmParameterSpec;
+
+import org.apache.xml.security.algorithms.JCEMapper;
+import org.apache.xml.security.algorithms.SignatureAlgorithmSpi;
+import org.apache.xml.security.signature.XMLSignature;
+import org.apache.xml.security.signature.XMLSignatureException;
+import org.apache.xml.security.utils.XMLUtils;
+
+/**
+ * ML-DSA (FIPS 204) signature algorithm implementation for XML-Dsig.
+ * Supports ML-DSA-44 (NIST security level 2), ML-DSA-65 (level 3),
+ * and ML-DSA-87 (level 5). Requires BouncyCastle 1.81+ as the JCA provider.
+ */
+public abstract class SignatureMLDSA extends SignatureAlgorithmSpi {
+
+ private static final Logger LOG = System.getLogger(SignatureMLDSA.class.getName());
+
+ private final Signature signatureAlgorithm;
+
+ public SignatureMLDSA() throws XMLSignatureException {
+ this(null);
+ }
+
+ public SignatureMLDSA(Provider provider) throws XMLSignatureException {
+ String algorithmID = JCEMapper.translateURItoJCEID(this.engineGetURI());
+ LOG.log(Level.DEBUG, "Created SignatureMLDSA using {0}", algorithmID);
+
+ try {
+ if (provider == null) {
+ String providerId = JCEMapper.getProviderId();
+ if (providerId == null) {
+ this.signatureAlgorithm = Signature.getInstance(algorithmID);
+ } else {
+ this.signatureAlgorithm = Signature.getInstance(algorithmID, providerId);
Review Comment:
## CodeQL / Use of a broken or risky cryptographic algorithm
Cryptographic algorithm [DESede/CBC/ISO10126Padding](1) is insecure. It has a short key length of 56 bits, making it vulnerable to brute-force attacks. Consider using AES instead.
Cryptographic algorithm [DESedeWrap](2) is insecure. It has a short key length of 56 bits, making it vulnerable to brute-force attacks. Consider using AES instead.
[Show more details](https://github.com/apache/santuario-xml-security-java/security/code-scanning/1257)
##########
src/main/java/org/apache/xml/security/algorithms/implementations/SignatureMLDSA.java:
##########
@@ -0,0 +1,208 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.xml.security.algorithms.implementations;
+
+import java.lang.System.Logger;
+import java.lang.System.Logger.Level;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.Key;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.Provider;
+import java.security.SecureRandom;
+import java.security.Signature;
+import java.security.SignatureException;
+import java.security.spec.AlgorithmParameterSpec;
+
+import org.apache.xml.security.algorithms.JCEMapper;
+import org.apache.xml.security.algorithms.SignatureAlgorithmSpi;
+import org.apache.xml.security.signature.XMLSignature;
+import org.apache.xml.security.signature.XMLSignatureException;
+import org.apache.xml.security.utils.XMLUtils;
+
+/**
+ * ML-DSA (FIPS 204) signature algorithm implementation for XML-Dsig.
+ * Supports ML-DSA-44 (NIST security level 2), ML-DSA-65 (level 3),
+ * and ML-DSA-87 (level 5). Requires BouncyCastle 1.81+ as the JCA provider.
+ */
+public abstract class SignatureMLDSA extends SignatureAlgorithmSpi {
+
+ private static final Logger LOG = System.getLogger(SignatureMLDSA.class.getName());
+
+ private final Signature signatureAlgorithm;
+
+ public SignatureMLDSA() throws XMLSignatureException {
+ this(null);
+ }
+
+ public SignatureMLDSA(Provider provider) throws XMLSignatureException {
+ String algorithmID = JCEMapper.translateURItoJCEID(this.engineGetURI());
+ LOG.log(Level.DEBUG, "Created SignatureMLDSA using {0}", algorithmID);
+
+ try {
+ if (provider == null) {
+ String providerId = JCEMapper.getProviderId();
+ if (providerId == null) {
+ this.signatureAlgorithm = Signature.getInstance(algorithmID);
Review Comment:
## CodeQL / Use of a broken or risky cryptographic algorithm
Cryptographic algorithm [DESede/CBC/ISO10126Padding](1) is insecure. It has a short key length of 56 bits, making it vulnerable to brute-force attacks. Consider using AES instead.
Cryptographic algorithm [DESedeWrap](2) is insecure. It has a short key length of 56 bits, making it vulnerable to brute-force attacks. Consider using AES instead.
[Show more details](https://github.com/apache/santuario-xml-security-java/security/code-scanning/1256)
##########
src/main/java/org/apache/xml/security/algorithms/implementations/SignatureMLDSA.java:
##########
@@ -0,0 +1,208 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.xml.security.algorithms.implementations;
+
+import java.lang.System.Logger;
+import java.lang.System.Logger.Level;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.Key;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.Provider;
+import java.security.SecureRandom;
+import java.security.Signature;
+import java.security.SignatureException;
+import java.security.spec.AlgorithmParameterSpec;
+
+import org.apache.xml.security.algorithms.JCEMapper;
+import org.apache.xml.security.algorithms.SignatureAlgorithmSpi;
+import org.apache.xml.security.signature.XMLSignature;
+import org.apache.xml.security.signature.XMLSignatureException;
+import org.apache.xml.security.utils.XMLUtils;
+
+/**
+ * ML-DSA (FIPS 204) signature algorithm implementation for XML-Dsig.
+ * Supports ML-DSA-44 (NIST security level 2), ML-DSA-65 (level 3),
+ * and ML-DSA-87 (level 5). Requires BouncyCastle 1.81+ as the JCA provider.
+ */
+public abstract class SignatureMLDSA extends SignatureAlgorithmSpi {
+
+ private static final Logger LOG = System.getLogger(SignatureMLDSA.class.getName());
+
+ private final Signature signatureAlgorithm;
+
+ public SignatureMLDSA() throws XMLSignatureException {
+ this(null);
+ }
+
+ public SignatureMLDSA(Provider provider) throws XMLSignatureException {
+ String algorithmID = JCEMapper.translateURItoJCEID(this.engineGetURI());
+ LOG.log(Level.DEBUG, "Created SignatureMLDSA using {0}", algorithmID);
+
+ try {
+ if (provider == null) {
+ String providerId = JCEMapper.getProviderId();
+ if (providerId == null) {
+ this.signatureAlgorithm = Signature.getInstance(algorithmID);
+ } else {
+ this.signatureAlgorithm = Signature.getInstance(algorithmID, providerId);
Review Comment:
## CodeQL / Use of a potentially broken or risky cryptographic algorithm
Cryptographic algorithm [MD5](1) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [RIPEMD160](2) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [SHA-1](3) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [SHA-224](4) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [WHIRLPOOL](5) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [SHA3-224](6) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [SHA1withDSA](7) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [RSASSA-PSS](8) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [ML-DSA-44](9) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [ML-DSA-65](10) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [ML-DSA-87](11) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [HmacMD5](12) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [HMACRIPEMD160](13) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [HmacSHA224](14) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [SEED/CBC/ISO10126Padding](15) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [Camellia/CBC/ISO10126Padding](16) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [Camellia/CBC/ISO10126Padding](17) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [Camellia/CBC/ISO10126Padding](18) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [ML-KEM-512](19) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [ML-KEM-768](20) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [ML-KEM-1024](21) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [AESWrap](22) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [AESWrap](23) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [AESWrap](24) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [CamelliaWrap](25) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [CamelliaWrap](26) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [CamelliaWrap](27) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [SEEDWrap](28) may not be secure. Consider using a different algorithm.
[Show more details](https://github.com/apache/santuario-xml-security-java/security/code-scanning/1262)
##########
src/main/java/org/apache/xml/security/algorithms/implementations/SignatureMLDSA.java:
##########
@@ -0,0 +1,208 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.xml.security.algorithms.implementations;
+
+import java.lang.System.Logger;
+import java.lang.System.Logger.Level;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.Key;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.Provider;
+import java.security.SecureRandom;
+import java.security.Signature;
+import java.security.SignatureException;
+import java.security.spec.AlgorithmParameterSpec;
+
+import org.apache.xml.security.algorithms.JCEMapper;
+import org.apache.xml.security.algorithms.SignatureAlgorithmSpi;
+import org.apache.xml.security.signature.XMLSignature;
+import org.apache.xml.security.signature.XMLSignatureException;
+import org.apache.xml.security.utils.XMLUtils;
+
+/**
+ * ML-DSA (FIPS 204) signature algorithm implementation for XML-Dsig.
+ * Supports ML-DSA-44 (NIST security level 2), ML-DSA-65 (level 3),
+ * and ML-DSA-87 (level 5). Requires BouncyCastle 1.81+ as the JCA provider.
+ */
+public abstract class SignatureMLDSA extends SignatureAlgorithmSpi {
+
+ private static final Logger LOG = System.getLogger(SignatureMLDSA.class.getName());
+
+ private final Signature signatureAlgorithm;
+
+ public SignatureMLDSA() throws XMLSignatureException {
+ this(null);
+ }
+
+ public SignatureMLDSA(Provider provider) throws XMLSignatureException {
+ String algorithmID = JCEMapper.translateURItoJCEID(this.engineGetURI());
+ LOG.log(Level.DEBUG, "Created SignatureMLDSA using {0}", algorithmID);
+
+ try {
+ if (provider == null) {
+ String providerId = JCEMapper.getProviderId();
+ if (providerId == null) {
+ this.signatureAlgorithm = Signature.getInstance(algorithmID);
+ } else {
+ this.signatureAlgorithm = Signature.getInstance(algorithmID, providerId);
+ }
+ } else {
+ this.signatureAlgorithm = Signature.getInstance(algorithmID, provider);
Review Comment:
## CodeQL / Use of a broken or risky cryptographic algorithm
Cryptographic algorithm [DESede/CBC/ISO10126Padding](1) is insecure. It has a short key length of 56 bits, making it vulnerable to brute-force attacks. Consider using AES instead.
Cryptographic algorithm [DESedeWrap](2) is insecure. It has a short key length of 56 bits, making it vulnerable to brute-force attacks. Consider using AES instead.
[Show more details](https://github.com/apache/santuario-xml-security-java/security/code-scanning/1258)
##########
src/main/java/org/apache/xml/security/algorithms/implementations/SignatureMLDSA.java:
##########
@@ -0,0 +1,208 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.xml.security.algorithms.implementations;
+
+import java.lang.System.Logger;
+import java.lang.System.Logger.Level;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.Key;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.Provider;
+import java.security.SecureRandom;
+import java.security.Signature;
+import java.security.SignatureException;
+import java.security.spec.AlgorithmParameterSpec;
+
+import org.apache.xml.security.algorithms.JCEMapper;
+import org.apache.xml.security.algorithms.SignatureAlgorithmSpi;
+import org.apache.xml.security.signature.XMLSignature;
+import org.apache.xml.security.signature.XMLSignatureException;
+import org.apache.xml.security.utils.XMLUtils;
+
+/**
+ * ML-DSA (FIPS 204) signature algorithm implementation for XML-Dsig.
+ * Supports ML-DSA-44 (NIST security level 2), ML-DSA-65 (level 3),
+ * and ML-DSA-87 (level 5). Requires BouncyCastle 1.81+ as the JCA provider.
+ */
+public abstract class SignatureMLDSA extends SignatureAlgorithmSpi {
+
+ private static final Logger LOG = System.getLogger(SignatureMLDSA.class.getName());
+
+ private final Signature signatureAlgorithm;
+
+ public SignatureMLDSA() throws XMLSignatureException {
+ this(null);
+ }
+
+ public SignatureMLDSA(Provider provider) throws XMLSignatureException {
+ String algorithmID = JCEMapper.translateURItoJCEID(this.engineGetURI());
+ LOG.log(Level.DEBUG, "Created SignatureMLDSA using {0}", algorithmID);
+
+ try {
+ if (provider == null) {
+ String providerId = JCEMapper.getProviderId();
+ if (providerId == null) {
+ this.signatureAlgorithm = Signature.getInstance(algorithmID);
Review Comment:
## CodeQL / Use of a potentially broken or risky cryptographic algorithm
Cryptographic algorithm [MD5](1) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [RIPEMD160](2) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [SHA-1](3) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [SHA-224](4) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [WHIRLPOOL](5) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [SHA3-224](6) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [SHA1withDSA](7) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [RSASSA-PSS](8) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [ML-DSA-44](9) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [ML-DSA-65](10) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [ML-DSA-87](11) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [HmacMD5](12) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [HMACRIPEMD160](13) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [HmacSHA224](14) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [SEED/CBC/ISO10126Padding](15) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [Camellia/CBC/ISO10126Padding](16) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [Camellia/CBC/ISO10126Padding](17) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [Camellia/CBC/ISO10126Padding](18) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [ML-KEM-512](19) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [ML-KEM-768](20) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [ML-KEM-1024](21) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [AESWrap](22) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [AESWrap](23) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [AESWrap](24) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [CamelliaWrap](25) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [CamelliaWrap](26) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [CamelliaWrap](27) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [SEEDWrap](28) may not be secure. Consider using a different algorithm.
[Show more details](https://github.com/apache/santuario-xml-security-java/security/code-scanning/1261)
##########
src/main/java/org/apache/xml/security/algorithms/implementations/SignatureMLDSA.java:
##########
@@ -0,0 +1,208 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.xml.security.algorithms.implementations;
+
+import java.lang.System.Logger;
+import java.lang.System.Logger.Level;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.Key;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.Provider;
+import java.security.SecureRandom;
+import java.security.Signature;
+import java.security.SignatureException;
+import java.security.spec.AlgorithmParameterSpec;
+
+import org.apache.xml.security.algorithms.JCEMapper;
+import org.apache.xml.security.algorithms.SignatureAlgorithmSpi;
+import org.apache.xml.security.signature.XMLSignature;
+import org.apache.xml.security.signature.XMLSignatureException;
+import org.apache.xml.security.utils.XMLUtils;
+
+/**
+ * ML-DSA (FIPS 204) signature algorithm implementation for XML-Dsig.
+ * Supports ML-DSA-44 (NIST security level 2), ML-DSA-65 (level 3),
+ * and ML-DSA-87 (level 5). Requires BouncyCastle 1.81+ as the JCA provider.
+ */
+public abstract class SignatureMLDSA extends SignatureAlgorithmSpi {
+
+ private static final Logger LOG = System.getLogger(SignatureMLDSA.class.getName());
+
+ private final Signature signatureAlgorithm;
+
+ public SignatureMLDSA() throws XMLSignatureException {
+ this(null);
+ }
+
+ public SignatureMLDSA(Provider provider) throws XMLSignatureException {
+ String algorithmID = JCEMapper.translateURItoJCEID(this.engineGetURI());
+ LOG.log(Level.DEBUG, "Created SignatureMLDSA using {0}", algorithmID);
+
+ try {
+ if (provider == null) {
+ String providerId = JCEMapper.getProviderId();
+ if (providerId == null) {
+ this.signatureAlgorithm = Signature.getInstance(algorithmID);
+ } else {
+ this.signatureAlgorithm = Signature.getInstance(algorithmID, providerId);
+ }
+ } else {
+ this.signatureAlgorithm = Signature.getInstance(algorithmID, provider);
Review Comment:
## CodeQL / Use of a potentially broken or risky cryptographic algorithm
Cryptographic algorithm [MD5](1) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [RIPEMD160](2) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [SHA-1](3) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [SHA-224](4) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [WHIRLPOOL](5) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [SHA3-224](6) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [SHA1withDSA](7) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [RSASSA-PSS](8) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [ML-DSA-44](9) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [ML-DSA-65](10) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [ML-DSA-87](11) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [HmacMD5](12) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [HMACRIPEMD160](13) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [HmacSHA224](14) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [SEED/CBC/ISO10126Padding](15) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [Camellia/CBC/ISO10126Padding](16) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [Camellia/CBC/ISO10126Padding](17) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [Camellia/CBC/ISO10126Padding](18) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [ML-KEM-512](19) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [ML-KEM-768](20) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [ML-KEM-1024](21) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [AESWrap](22) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [AESWrap](23) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [AESWrap](24) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [CamelliaWrap](25) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [CamelliaWrap](26) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [CamelliaWrap](27) may not be secure. Consider using a different algorithm.
Cryptographic algorithm [SEEDWrap](28) may not be secure. Consider using a different algorithm.
[Show more details](https://github.com/apache/santuario-xml-security-java/security/code-scanning/1263)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]