com.fitbur.bouncycastle.jcajce.provider.asymmetric.DSA Maven / Gradle / Ivy
package com.fitbur.bouncycastle.jcajce.provider.asymmetric;
import com.fitbur.bouncycastle.asn1.nist.NISTObjectIdentifiers;
import com.fitbur.bouncycastle.jcajce.provider.asymmetric.dsa.DSAUtil;
import com.fitbur.bouncycastle.jcajce.provider.asymmetric.dsa.KeyFactorySpi;
import com.fitbur.bouncycastle.jcajce.provider.config.ConfigurableProvider;
import com.fitbur.bouncycastle.jcajce.provider.util.AsymmetricAlgorithmProvider;
import com.fitbur.bouncycastle.jcajce.provider.util.AsymmetricKeyInfoConverter;
public class DSA
{
private static final String PREFIX = "com.fitbur.bouncycastle.jcajce.provider.asymmetric" + ".dsa.";
public static class Mappings
extends AsymmetricAlgorithmProvider
{
public Mappings()
{
}
public void configure(ConfigurableProvider provider)
{
provider.addAlgorithm("AlgorithmParameters.DSA", PREFIX + "AlgorithmParametersSpi");
provider.addAlgorithm("AlgorithmParameterGenerator.DSA", PREFIX + "AlgorithmParameterGeneratorSpi");
provider.addAlgorithm("KeyPairGenerator.DSA", PREFIX + "KeyPairGeneratorSpi");
provider.addAlgorithm("KeyFactory.DSA", PREFIX + "KeyFactorySpi");
provider.addAlgorithm("Signature.DSA", PREFIX + "DSASigner$stdDSA");
provider.addAlgorithm("Signature.NONEWITHDSA", PREFIX + "DSASigner$noneDSA");
provider.addAlgorithm("Alg.Alias.Signature.RAWDSA", "NONEWITHDSA");
provider.addAlgorithm("Signature.DETDSA", PREFIX + "DSASigner$com.fitburtDSA");
provider.addAlgorithm("Signature.SHA1WITHDETDSA", PREFIX + "DSASigner$com.fitburtDSA");
provider.addAlgorithm("Signature.SHA224WITHDETDSA", PREFIX + "DSASigner$com.fitburtDSA224");
provider.addAlgorithm("Signature.SHA256WITHDETDSA", PREFIX + "DSASigner$com.fitburtDSA256");
provider.addAlgorithm("Signature.SHA384WITHDETDSA", PREFIX + "DSASigner$com.fitburtDSA384");
provider.addAlgorithm("Signature.SHA512WITHDETDSA", PREFIX + "DSASigner$com.fitburtDSA512");
addSignatureAlgorithm(provider, "SHA224", "DSA", PREFIX + "DSASigner$dsa224", NISTObjectIdentifiers.dsa_with_sha224);
addSignatureAlgorithm(provider, "SHA256", "DSA", PREFIX + "DSASigner$dsa256", NISTObjectIdentifiers.dsa_with_sha256);
addSignatureAlgorithm(provider, "SHA384", "DSA", PREFIX + "DSASigner$dsa384", NISTObjectIdentifiers.dsa_with_sha384);
addSignatureAlgorithm(provider, "SHA512", "DSA", PREFIX + "DSASigner$dsa512", NISTObjectIdentifiers.dsa_with_sha512);
provider.addAlgorithm("Alg.Alias.Signature.SHA/DSA", "DSA");
provider.addAlgorithm("Alg.Alias.Signature.SHA1withDSA", "DSA");
provider.addAlgorithm("Alg.Alias.Signature.SHA1WITHDSA", "DSA");
provider.addAlgorithm("Alg.Alias.Signature.1.3.14.3.2.26with1.2.840.10040.4.1", "DSA");
provider.addAlgorithm("Alg.Alias.Signature.1.3.14.3.2.26with1.2.840.10040.4.3", "DSA");
provider.addAlgorithm("Alg.Alias.Signature.DSAwithSHA1", "DSA");
provider.addAlgorithm("Alg.Alias.Signature.DSAWITHSHA1", "DSA");
provider.addAlgorithm("Alg.Alias.Signature.SHA1WithDSA", "DSA");
provider.addAlgorithm("Alg.Alias.Signature.DSAWithSHA1", "DSA");
provider.addAlgorithm("Alg.Alias.Signature.1.2.840.10040.4.3", "DSA");
AsymmetricKeyInfoConverter keyFact = new KeyFactorySpi();
for (int i = 0; i != DSAUtil.dsaOids.length; i++)
{
provider.addAlgorithm("Alg.Alias.Signature." + DSAUtil.dsaOids[i], "DSA");
registerOid(provider, DSAUtil.dsaOids[i], "DSA", keyFact);
registerOidAlgorithmParameters(provider, DSAUtil.dsaOids[i], "DSA");
}
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy