Class GOST3410PublicKeyAlgParameters
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.cryptopro.GOST3410PublicKeyAlgParameters
- All Implemented Interfaces:
ASN1Encodable, Encodable
The AlgorithmIdentifier parameters for GOST R 34.10-2001 and GOST R 34.10-2012 keys.
This type covers two structures:
GostR3410-2001-PublicKeyParameters ::= SEQUENCE { -- RFC 4491, Section 2.3.2
publicKeyParamSet OBJECT IDENTIFIER,
digestParamSet OBJECT IDENTIFIER,
encryptionParamSet OBJECT IDENTIFIER DEFAULT id-Gost28147-89-CryptoPro-A-ParamSet
}
GostR3410-2012-PublicKeyParameters ::= SEQUENCE { -- RFC 9215, Section 4.2
publicKeyParamSet OBJECT IDENTIFIER,
digestParamSet OBJECT IDENTIFIER OPTIONAL
}
digestParamSet and encryptionParamSet are consecutive, untagged, and of the same type, so a second
element cannot be distinguished by type alone. It is always digestParamSet: the 2001 structure requires
digestParamSet ahead of the DEFAULT encryptionParamSet, and the 2012 structure has no encryptionParamSet.
RFC 9215 requires digestParamSet to be omitted for id-tc26-gost-3410-12-256-paramSetB/C/D and says it should be omitted for paramSetA and the 512-bit parameter sets. A digestParamSet present alongside any of those is nevertheless accepted on decode, since older implementations emitted one.
-
Constructor Summary
ConstructorsConstructorDescriptionGOST3410PublicKeyAlgParameters(ASN1ObjectIdentifier publicKeyParamSet, ASN1ObjectIdentifier digestParamSet) GOST3410PublicKeyAlgParameters(ASN1ObjectIdentifier publicKeyParamSet, ASN1ObjectIdentifier digestParamSet, ASN1ObjectIdentifier encryptionParamSet) -
Method Summary
Modifier and TypeMethodDescriptiongetInstance(Object obj) getInstance(ASN1TaggedObject obj, boolean explicit) Method providing a primitive representation of this object suitable for encoding.Methods inherited from class ASN1Object
encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode
-
Constructor Details
-
GOST3410PublicKeyAlgParameters
public GOST3410PublicKeyAlgParameters(ASN1ObjectIdentifier publicKeyParamSet, ASN1ObjectIdentifier digestParamSet) -
GOST3410PublicKeyAlgParameters
public GOST3410PublicKeyAlgParameters(ASN1ObjectIdentifier publicKeyParamSet, ASN1ObjectIdentifier digestParamSet, ASN1ObjectIdentifier encryptionParamSet) - Parameters:
publicKeyParamSet- the public key parameter set; required.digestParamSet- the digest parameter set; may be null for GOST R 34.10-2012 keys (RFC 9215, Section 4.2), but is required for GOST R 34.10-2001 keys (RFC 4491, Section 2.3.2).encryptionParamSet- the encryption parameter set; may be null. Only meaningful with a non-null digestParamSet, since it can only be encoded as the third element.
-
-
Method Details
-
getInstance
-
getInstance
-
getPublicKeyParamSet
-
getDigestParamSet
-
getEncryptionParamSet
-
toASN1Primitive
Description copied from class:ASN1ObjectMethod providing a primitive representation of this object suitable for encoding.- Specified by:
toASN1Primitivein interfaceASN1Encodable- Specified by:
toASN1Primitivein classASN1Object- Returns:
- a primitive representation of this object.
-