Bouncy Castle Cryptography Library 1.87

org.bouncycastle.asn1.cryptopro
Class GOST3410PublicKeyAlgParameters

java.lang.Object
  extended byorg.bouncycastle.asn1.ASN1Object
      extended byorg.bouncycastle.asn1.cryptopro.GOST3410PublicKeyAlgParameters
All Implemented Interfaces:
ASN1Encodable, Encodable

public class GOST3410PublicKeyAlgParameters
extends ASN1Object

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
GOST3410PublicKeyAlgParameters(ASN1ObjectIdentifier publicKeyParamSet, ASN1ObjectIdentifier digestParamSet)
           
GOST3410PublicKeyAlgParameters(ASN1ObjectIdentifier publicKeyParamSet, ASN1ObjectIdentifier digestParamSet, ASN1ObjectIdentifier encryptionParamSet)
           
 
Method Summary
 ASN1ObjectIdentifier getDigestParamSet()
           
 ASN1ObjectIdentifier getEncryptionParamSet()
           
static GOST3410PublicKeyAlgParameters getInstance(ASN1TaggedObject obj, boolean explicit)
           
static GOST3410PublicKeyAlgParameters getInstance(java.lang.Object obj)
           
 ASN1ObjectIdentifier getPublicKeyParamSet()
           
 ASN1Primitive toASN1Primitive()
          Method providing a primitive representation of this object suitable for encoding.
 
Methods inherited from class org.bouncycastle.asn1.ASN1Object
encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

getInstance

public static GOST3410PublicKeyAlgParameters getInstance(ASN1TaggedObject obj,
                                                         boolean explicit)

getInstance

public static GOST3410PublicKeyAlgParameters getInstance(java.lang.Object obj)

getPublicKeyParamSet

public ASN1ObjectIdentifier getPublicKeyParamSet()

getDigestParamSet

public ASN1ObjectIdentifier getDigestParamSet()

getEncryptionParamSet

public ASN1ObjectIdentifier getEncryptionParamSet()

toASN1Primitive

public ASN1Primitive toASN1Primitive()
Description copied from class: ASN1Object
Method providing a primitive representation of this object suitable for encoding.

Specified by:
toASN1Primitive in interface ASN1Encodable
Specified by:
toASN1Primitive in class ASN1Object
Returns:
a primitive representation of this object.

Bouncy Castle Cryptography Library 1.87