public class BcX448 extends java.lang.Object implements TlsAgreement
Modifier and Type | Field and Description |
---|---|
protected BcTlsCrypto |
crypto |
protected byte[] |
peerPublicKey |
protected byte[] |
privateKey |
Constructor and Description |
---|
BcX448(BcTlsCrypto crypto) |
Modifier and Type | Method and Description |
---|---|
TlsSecret |
calculateSecret()
Calculate the agreed secret based on the calculator's current state.
|
byte[] |
generateEphemeral()
Generate an ephemeral key pair, returning the encoding of the public key.
|
void |
receivePeerValue(byte[] peerValue)
Pass in the public key for the peer to the agreement calculator.
|
protected final BcTlsCrypto crypto
protected final byte[] privateKey
protected final byte[] peerPublicKey
public BcX448(BcTlsCrypto crypto)
public byte[] generateEphemeral() throws java.io.IOException
TlsAgreement
generateEphemeral
in interface TlsAgreement
java.io.IOException
- in case of error.public void receivePeerValue(byte[] peerValue) throws java.io.IOException
TlsAgreement
receivePeerValue
in interface TlsAgreement
peerValue
- a byte encoding of the peer public key.java.io.IOException
- in case of error.public TlsSecret calculateSecret() throws java.io.IOException
TlsAgreement
calculateSecret
in interface TlsAgreement
java.io.IOException
- in case of error.