Top Description Constructors Methods
org.bouncycastle.pqc.crypto.util

public Class PrivateKeyInfoFactory

extends Object
Class Inheritance
Imports
java.io.IOException, org.bouncycastle.asn1.ASN1EncodableVector, .ASN1Set, .DEROctetString, .DERSequence, org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers, .PrivateKeyInfo, org.bouncycastle.asn1.x509.AlgorithmIdentifier, org.bouncycastle.crypto.params.AsymmetricKeyParameter, org.bouncycastle.pqc.asn1.CMCEPrivateKey, .CMCEPublicKey, .FalconPrivateKey, .FalconPublicKey, .McElieceCCA2PrivateKey, .PQCObjectIdentifiers, .SPHINCS256KeyParams, .XMSSKeyParams, .XMSSMTKeyParams, .XMSSMTPrivateKey, .XMSSPrivateKey, org.bouncycastle.pqc.crypto.bike.BIKEPrivateKeyParameters, org.bouncycastle.pqc.crypto.cmce.CMCEPrivateKeyParameters, org.bouncycastle.pqc.crypto.crystals.dilithium.DilithiumPrivateKeyParameters, .DilithiumPublicKeyParameters, org.bouncycastle.pqc.crypto.crystals.kyber.KyberPrivateKeyParameters, org.bouncycastle.pqc.crypto.falcon.FalconPrivateKeyParameters, org.bouncycastle.pqc.crypto.frodo.FrodoPrivateKeyParameters, org.bouncycastle.pqc.crypto.hqc.HQCPrivateKeyParameters, org.bouncycastle.pqc.crypto.lms.Composer, .HSSPrivateKeyParameters, .LMSPrivateKeyParameters, org.bouncycastle.pqc.crypto.newhope.NHPrivateKeyParameters, org.bouncycastle.pqc.crypto.ntru.NTRUPrivateKeyParameters, org.bouncycastle.pqc.crypto.ntruprime.NTRULPRimePrivateKeyParameters, .SNTRUPrimePrivateKeyParameters, org.bouncycastle.pqc.crypto.picnic.PicnicPrivateKeyParameters, org.bouncycastle.pqc.crypto.rainbow.RainbowPrivateKeyParameters, org.bouncycastle.pqc.crypto.saber.SABERPrivateKeyParameters, org.bouncycastle.pqc.crypto.sphincs.SPHINCSPrivateKeyParameters, org.bouncycastle.pqc.crypto.sphincsplus.SPHINCSPlusPrivateKeyParameters, org.bouncycastle.pqc.crypto.xmss.BDS, .BDSStateMap, .XMSSMTPrivateKeyParameters, .XMSSPrivateKeyParameters, .XMSSUtil, org.bouncycastle.pqc.legacy.crypto.mceliece.McElieceCCA2PrivateKeyParameters, org.bouncycastle.pqc.legacy.crypto.qtesla.QTESLAPrivateKeyParameters, org.bouncycastle.util.Pack

Factory to create ASN.1 private key info objects from lightweight private keys.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static PrivateKeyInfo

Returns:

the appropriate PrivateKeyInfo
createPrivateKeyInfo
(AsymmetricKeyParameter
the key to be encoded into the info object.
privateKey
)

Create a PrivateKeyInfo representation of a private key.

public static PrivateKeyInfo

Returns:

the appropriate PrivateKeyInfo
createPrivateKeyInfo
(AsymmetricKeyParameter
the key to be encoded into the info object.
privateKey
,
ASN1Set
the set of attributes to be included.
attributes
)

Create a PrivateKeyInfo representation of a private key with attributes.

private static XMSSPrivateKey
xmssCreateKeyStructure(XMSSPrivateKeyParameters keyParams)

Deprecated as a consequence of XMSSPrivateKeyParameters being deprecated.
private static XMSSMTPrivateKey
xmssmtCreateKeyStructure(XMSSMTPrivateKeyParameters keyParams)

Deprecated as a consequence of XMSSMTPrivateKeyParameters being deprecated.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

PrivateKeyInfoFactoryback to summary
private PrivateKeyInfoFactory()

Method Detail

createPrivateKeyInfoback to summary
public static PrivateKeyInfo createPrivateKeyInfo(AsymmetricKeyParameter privateKey) throws IOException

Create a PrivateKeyInfo representation of a private key.

Parameters
privateKey:AsymmetricKeyParameter

the key to be encoded into the info object.

Returns:PrivateKeyInfo

the appropriate PrivateKeyInfo

Exceptions
IOException:
on an error encoding the key
createPrivateKeyInfoback to summary
public static PrivateKeyInfo createPrivateKeyInfo(AsymmetricKeyParameter privateKey, ASN1Set attributes) throws IOException

Create a PrivateKeyInfo representation of a private key with attributes.

Parameters
privateKey:AsymmetricKeyParameter

the key to be encoded into the info object.

attributes:ASN1Set

the set of attributes to be included.

Returns:PrivateKeyInfo

the appropriate PrivateKeyInfo

Exceptions
IOException:
on an error encoding the key
xmssCreateKeyStructureback to summary
private static XMSSPrivateKey xmssCreateKeyStructure(XMSSPrivateKeyParameters keyParams) throws IOException

Deprecated

as a consequence of XMSSPrivateKeyParameters being deprecated. See corresponding docs for further information.

xmssmtCreateKeyStructureback to summary
private static XMSSMTPrivateKey xmssmtCreateKeyStructure(XMSSMTPrivateKeyParameters keyParams) throws IOException

Deprecated

as a consequence of XMSSMTPrivateKeyParameters being deprecated. See corresponding docs for further information.