Package org.bouncycastle.pqc.asn1
Class KyberPrivateKey
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.pqc.asn1.KyberPrivateKey
- All Implemented Interfaces:
ASN1Encodable,Encodable
Crystal Kyber Private Key Format.
See https://www.ietf.org/archive/id/draft-uni-qsckeys-kyber-00.html for details.
KyberPrivateKey ::= SEQUENCE {
version INTEGER {v0(0)} -- version (round 3)
s OCTET STRING, -- EMPTY
hpk OCTET STRING -- EMPTY
nonce OCTET STRING, -- d
publicKey [0] IMPLICIT KyberPublicKey OPTIONAL,
-- see next section
}
-
Constructor Summary
ConstructorsConstructorDescriptionKyberPrivateKey(int version, byte[] s, byte[] hpk, byte[] nonce) KyberPrivateKey(int version, byte[] s, byte[] hpk, byte[] nonce, KyberPublicKey publicKey) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getHpk()static KyberPrivateKeybyte[]getNonce()byte[]getS()intMethod 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
-
Constructor Details
-
KyberPrivateKey
-
KyberPrivateKey
public KyberPrivateKey(int version, byte[] s, byte[] hpk, byte[] nonce)
-
-
Method Details
-
getVersion
public int getVersion() -
getS
public byte[] getS() -
getPublicKey
-
getHpk
public byte[] getHpk() -
getNonce
public byte[] getNonce() -
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.
-
getInstance
-