Top Description Fields Constructors Methods
org.bouncycastle.pqc.asn1

public Class KyberPrivateKey

extends ASN1Object
Class Inheritance
Imports
org.bouncycastle.asn1.ASN1EncodableVector, .ASN1Integer, .ASN1Object, .ASN1OctetString, .ASN1Primitive, .ASN1Sequence, .DEROctetString, .DERSequence, org.bouncycastle.util.Arrays

Crystal Kyber Private Key Format. See https://www.ietf.org/archive/id/draft-uni-qsckeys-kyber-01.html for details.
    KyberPrivateKey ::= SEQUENCE {
        version     INTEGER {v0(0)}   -- version (round 3)
        s           OCTET STRING,     -- sample s
        publicKey   [0] IMPLICIT KyberPublicKey OPTIONAL,
                                      -- see next section
        hpk         OCTET STRING      -- H(pk)
        nonce       OCTET STRING,     -- z
    }

Field Summary

Modifier and TypeField and Description
private byte[]
private byte[]
private KyberPublicKey
private byte[]
s

private int

Constructor Summary

AccessConstructor and Description
public
KyberPrivateKey(int version, byte[] s, byte[] hpk, byte[] nonce, KyberPublicKey publicKey)

public
KyberPrivateKey(int version, byte[] s, byte[] hpk, byte[] nonce)

private

Method Summary

Modifier and TypeMethod and Description
public byte[]
public static KyberPrivateKey
public byte[]
public KyberPublicKey
public byte[]
getS()

public int
public ASN1Primitive
toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Method providing a primitive representation of this object suitable for encoding.

Inherited from org.bouncycastle.asn1.ASN1Object:
encodeToencodeToequalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

hpkback to summary
private byte[] hpk
nonceback to summary
private byte[] nonce
publicKeyback to summary
private KyberPublicKey publicKey
sback to summary
private byte[] s
versionback to summary
private int version

Constructor Detail

KyberPrivateKeyback to summary
public KyberPrivateKey(int version, byte[] s, byte[] hpk, byte[] nonce, KyberPublicKey publicKey)
KyberPrivateKeyback to summary
public KyberPrivateKey(int version, byte[] s, byte[] hpk, byte[] nonce)
KyberPrivateKeyback to summary
private KyberPrivateKey(ASN1Sequence seq)

Method Detail

getHpkback to summary
public byte[] getHpk()
getInstanceback to summary
public static KyberPrivateKey getInstance(Object o)
getNonceback to summary
public byte[] getNonce()
getPublicKeyback to summary
public KyberPublicKey getPublicKey()
getSback to summary
public byte[] getS()
getVersionback to summary
public int getVersion()
toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Doc from org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Method providing a primitive representation of this object suitable for encoding.

Returns:ASN1Primitive

a primitive representation of this object.