Top Description Methods
org.bouncycastle.tls.crypto

public Interface TlsAgreement

Known Direct Implementers
org.bouncycastle.tls.crypto.impl.jcajce.JceTlsDH, org.bouncycastle.tls.crypto.impl.jcajce.JceTlsECDH, org.bouncycastle.tls.crypto.impl.jcajce.JceX25519, org.bouncycastle.tls.crypto.impl.jcajce.JceX448
Imports
java.io.IOException

Base interface for ephemeral key agreement calculator.

Method Summary

Modifier and TypeMethod and Description
public TlsSecret

Returns:

the calculated secret.
calculateSecret
()

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

public byte[]

Returns:

a byte encoding of the public key.
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
)

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

Method Detail

calculateSecretback to summary
public TlsSecret calculateSecret() throws IOException

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

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

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.