org.bouncycastle.crypto.params.ECGOST3410Parameters Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bcprov-ext-debug-jdk15on Show documentation
Show all versions of bcprov-ext-debug-jdk15on Show documentation
The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms. This jar contains JCE provider and lightweight API for the Bouncy Castle Cryptography APIs for JDK 1.5 to JDK 1.8. Note: this package includes the NTRU encryption algorithms.
package org.bouncycastle.crypto.params;
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
public class ECGOST3410Parameters
extends ECNamedDomainParameters
{
private final ASN1ObjectIdentifier publicKeyParamSet;
private final ASN1ObjectIdentifier digestParamSet;
private final ASN1ObjectIdentifier encryptionParamSet;
public ECGOST3410Parameters(ECDomainParameters ecParameters, ASN1ObjectIdentifier publicKeyParamSet, ASN1ObjectIdentifier digestParamSet)
{
this(ecParameters, publicKeyParamSet, digestParamSet, null);
}
public ECGOST3410Parameters(ECDomainParameters ecParameters, ASN1ObjectIdentifier publicKeyParamSet, ASN1ObjectIdentifier digestParamSet, ASN1ObjectIdentifier encryptionParamSet)
{
super(publicKeyParamSet, ecParameters.getCurve(), ecParameters.getG(), ecParameters.getN(), ecParameters.getH(), ecParameters.getSeed());
if (ecParameters instanceof ECNamedDomainParameters)
{
if (!publicKeyParamSet.equals(((ECNamedDomainParameters)ecParameters).getName()))
{
throw new IllegalArgumentException("named parameters do not match publicKeyParamSet value");
}
}
this.publicKeyParamSet = publicKeyParamSet;
this.digestParamSet = digestParamSet;
this.encryptionParamSet = encryptionParamSet;
}
public ASN1ObjectIdentifier getPublicKeyParamSet()
{
return publicKeyParamSet;
}
public ASN1ObjectIdentifier getDigestParamSet()
{
return digestParamSet;
}
public ASN1ObjectIdentifier getEncryptionParamSet()
{
return encryptionParamSet;
}
}