Top Fields Constructors Methods
org.bouncycastle.tls.crypto.impl.bc

public Class BcTlsMLKem

extends Object
implements TlsAgreement
Class Inheritance
All Implemented Interfaces
org.bouncycastle.tls.crypto.TlsAgreement
Imports
java.io.IOException, org.bouncycastle.crypto.AsymmetricCipherKeyPair, .SecretWithEncapsulation, org.bouncycastle.pqc.crypto.mlkem.MLKEMPrivateKeyParameters, .MLKEMPublicKeyParameters, org.bouncycastle.tls.crypto.TlsAgreement, .TlsSecret

Field Summary

Modifier and TypeField and Description
protected final BcTlsMLKemDomain
protected MLKEMPrivateKeyParameters
protected MLKEMPublicKeyParameters
protected TlsSecret

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public TlsSecret
calculateSecret()

Implements org.bouncycastle.tls.crypto.TlsAgreement.calculateSecret.

Calculate the agreed secret based on the calculator's current state.

public byte[]
generateEphemeral()

Implements org.bouncycastle.tls.crypto.TlsAgreement.generateEphemeral.

Generate an ephemeral key pair, returning the encoding of the public key.

public void
receivePeerValue(byte[]
a byte encoding of the peer public key.
peerValue
)

Implements org.bouncycastle.tls.crypto.TlsAgreement.receivePeerValue.

Pass in the public key for the peer to the agreement calculator.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

domainback to summary
protected final BcTlsMLKemDomain domain
privateKeyback to summary
protected MLKEMPrivateKeyParameters privateKey
publicKeyback to summary
protected MLKEMPublicKeyParameters publicKey
secretback to summary
protected TlsSecret secret

Constructor Detail

BcTlsMLKemback to summary
public BcTlsMLKem(BcTlsMLKemDomain domain)

Method Detail

calculateSecretback to summary
public TlsSecret calculateSecret() throws IOException

Implements org.bouncycastle.tls.crypto.TlsAgreement.calculateSecret.

Doc from org.bouncycastle.tls.crypto.TlsAgreement.calculateSecret.

Calculate the agreed secret based on the calculator's current state.

Returns:TlsSecret

the calculated secret.

Exceptions
IOException:
in case of error.
generateEphemeralback to summary
public byte[] generateEphemeral() throws IOException

Implements org.bouncycastle.tls.crypto.TlsAgreement.generateEphemeral.

Doc from org.bouncycastle.tls.crypto.TlsAgreement.generateEphemeral.

Generate an ephemeral key pair, returning the encoding of the public key.

Returns:byte[]

a byte encoding of the public key.

Exceptions
IOException:
in case of error.
receivePeerValueback to summary
public void receivePeerValue(byte[] peerValue) throws IOException

Implements org.bouncycastle.tls.crypto.TlsAgreement.receivePeerValue.

Doc from org.bouncycastle.tls.crypto.TlsAgreement.receivePeerValue.

Pass in the public key for the peer to the agreement calculator.

Parameters
peerValue:byte[]

a byte encoding of the peer public key.

Exceptions
IOException:
in case of error.