Top Constructors Methods
org.bouncycastle.pqc.jcajce.provider.util

public Class KdfUtil

extends Object
Class Inheritance
Imports
org.bouncycastle.asn1.ASN1ObjectIdentifier, .ASN1OctetString, org.bouncycastle.asn1.nist.NISTObjectIdentifiers, org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers, org.bouncycastle.asn1.x509.AlgorithmIdentifier, org.bouncycastle.asn1.x9.X9ObjectIdentifiers, org.bouncycastle.crypto.DerivationFunction, .Digest, .Xof, org.bouncycastle.crypto.agreement.kdf.ConcatenationKDFGenerator, org.bouncycastle.crypto.digests.SHA256Digest, .SHA384Digest, .SHA512Digest, .SHAKEDigest, org.bouncycastle.crypto.generators.HKDFBytesGenerator, .KDF2BytesGenerator, org.bouncycastle.crypto.macs.KMAC, org.bouncycastle.crypto.params.HKDFParameters, .KDFParameters, .KeyParameter, org.bouncycastle.jcajce.spec.KEMKDFSpec, org.bouncycastle.util.Arrays

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv static Digest
public static byte[]

Returns:

a generated secret key.
makeKeyBytes
(KEMKDFSpec
definition of the KDF and the output size to produce.
kdfSpec
,
byte[]
the secret value to initialize the KDF with (erased after secret key generation).
secret
)

Generate a byte[] secret key from the passed in secret.

pack-priv static byte[]
makeKeyBytes(AlgorithmIdentifier kdfAlgorithm, byte[] secret, byte[] otherInfo, int keySize)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

KdfUtilback to summary
public KdfUtil()

Method Detail

getDigestback to summary
pack-priv static Digest getDigest(ASN1ObjectIdentifier oid)
makeKeyBytesback to summary
public static byte[] makeKeyBytes(KEMKDFSpec kdfSpec, byte[] secret)

Generate a byte[] secret key from the passed in secret.

Note

passed in secret will be erased after use.

Parameters
kdfSpec:KEMKDFSpec

definition of the KDF and the output size to produce.

secret:byte[]

the secret value to initialize the KDF with (erased after secret key generation).

Returns:byte[]

a generated secret key.

makeKeyBytesback to summary
pack-priv static byte[] makeKeyBytes(AlgorithmIdentifier kdfAlgorithm, byte[] secret, byte[] otherInfo, int keySize)