Top Fields Constructors Methods
org.bouncycastle.crypto.hpke

pack-priv Class DHKEM

extends KEM
Class Inheritance
Imports
java.math.BigInteger, java.security.SecureRandom, org.bouncycastle.crypto.AsymmetricCipherKeyPair, .AsymmetricCipherKeyPairGenerator, .BasicAgreement, org.bouncycastle.crypto.agreement.ECDHCBasicAgreement, .XDHBasicAgreement, org.bouncycastle.crypto.generators.ECKeyPairGenerator, .X25519KeyPairGenerator, .X448KeyPairGenerator, org.bouncycastle.crypto.params.AsymmetricKeyParameter, .ECDomainParameters, .ECKeyGenerationParameters, .ECPrivateKeyParameters, .ECPublicKeyParameters, .X25519KeyGenerationParameters, .X25519PrivateKeyParameters, .X25519PublicKeyParameters, .X448KeyGenerationParameters, .X448PrivateKeyParameters, .X448PublicKeyParameters, org.bouncycastle.math.ec.ECCurve, .ECPoint, .FixedPointCombMultiplier, .WNafUtil, org.bouncycastle.math.ec.custom.sec.SecP256R1Curve, .SecP384R1Curve, .SecP521R1Curve, org.bouncycastle.util.Arrays, .Pack, .Strings, org.bouncycastle.util.encoders.Hex

Field Summary

Modifier and TypeField and Description
private BasicAgreement
private byte
pack-priv ECDomainParameters
private HKDF
private final short
private AsymmetricCipherKeyPairGenerator
private int
private int
private int

Constructor Summary

AccessConstructor and Description
protected
DHKEM(short kemid)

Method Summary

Modifier and TypeMethod and Description
protected byte[]
protected byte[][]
protected byte[]
public AsymmetricCipherKeyPair
public AsymmetricCipherKeyPair
DeserializePrivateKey(byte[] skEncoded, byte[] pkEncoded)

Implements abstract org.bouncycastle.crypto.hpke.KEM.DeserializePrivateKey.

public AsymmetricKeyParameter
protected byte[][]
protected byte[][]
private byte[]
ExtractAndExpand(byte[] dh, byte[] kemContext)

private byte[]
formatBigIntegerBytes(byte[] bigIntBytes, int outputSize)

public AsymmetricCipherKeyPair
pack-priv int
public byte[]
public byte[]
private boolean

Field Detail

agreementback to summary
private BasicAgreement agreement
bitmaskback to summary
private byte bitmask
domainParamsback to summary
pack-priv ECDomainParameters domainParams
hkdfback to summary
private HKDF hkdf
kemIdback to summary
private final short kemId
kpGenback to summary
private AsymmetricCipherKeyPairGenerator kpGen
Nencback to summary
private int Nenc
Nsecretback to summary
private int Nsecret
Nskback to summary
private int Nsk

Constructor Detail

DHKEMback to summary
protected DHKEM(short kemid)

Method Detail

AuthDecapback to summary
protected byte[] AuthDecap(byte[] enc, AsymmetricCipherKeyPair kpR, AsymmetricKeyParameter pkS)

Implements abstract org.bouncycastle.crypto.hpke.KEM.AuthDecap.

AuthEncapback to summary
protected byte[][] AuthEncap(AsymmetricKeyParameter pkR, AsymmetricCipherKeyPair kpS)

Implements abstract org.bouncycastle.crypto.hpke.KEM.AuthEncap.

Decapback to summary
protected byte[] Decap(byte[] enc, AsymmetricCipherKeyPair kpR)

Implements abstract org.bouncycastle.crypto.hpke.KEM.Decap.

DeriveKeyPairback to summary
public AsymmetricCipherKeyPair DeriveKeyPair(byte[] ikm)

Implements abstract org.bouncycastle.crypto.hpke.KEM.DeriveKeyPair.

DeserializePrivateKeyback to summary
public AsymmetricCipherKeyPair DeserializePrivateKey(byte[] skEncoded, byte[] pkEncoded)

Implements abstract org.bouncycastle.crypto.hpke.KEM.DeserializePrivateKey.

DeserializePublicKeyback to summary
public AsymmetricKeyParameter DeserializePublicKey(byte[] encoded)

Implements abstract org.bouncycastle.crypto.hpke.KEM.DeserializePublicKey.

Encapback to summary
protected byte[][] Encap(AsymmetricKeyParameter pkR)

Implements abstract org.bouncycastle.crypto.hpke.KEM.Encap.

Encapback to summary
protected byte[][] Encap(AsymmetricKeyParameter pkR, AsymmetricCipherKeyPair kpE)

Implements abstract org.bouncycastle.crypto.hpke.KEM.Encap.

ExtractAndExpandback to summary
private byte[] ExtractAndExpand(byte[] dh, byte[] kemContext)
formatBigIntegerBytesback to summary
private byte[] formatBigIntegerBytes(byte[] bigIntBytes, int outputSize)
GeneratePrivateKeyback to summary
public AsymmetricCipherKeyPair GeneratePrivateKey()

Implements abstract org.bouncycastle.crypto.hpke.KEM.GeneratePrivateKey.

getEncryptionSizeback to summary
pack-priv int getEncryptionSize()

Implements abstract org.bouncycastle.crypto.hpke.KEM.getEncryptionSize.

SerializePrivateKeyback to summary
public byte[] SerializePrivateKey(AsymmetricKeyParameter key)

Implements abstract org.bouncycastle.crypto.hpke.KEM.SerializePrivateKey.

SerializePublicKeyback to summary
public byte[] SerializePublicKey(AsymmetricKeyParameter key)

Implements abstract org.bouncycastle.crypto.hpke.KEM.SerializePublicKey.

ValidateSkback to summary
private boolean ValidateSk(BigInteger d)