Class JceTlsECDH
java.lang.Object
org.bouncycastle.tls.crypto.impl.jcajce.JceTlsECDH
- All Implemented Interfaces:
TlsAgreement
Support class for ephemeral Elliptic Curve Diffie-Hellman using the JCE.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final JceTlsECDomainprotected KeyPairprotected PublicKey -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCalculate the agreed secret based on the calculator's current state.byte[]Generate an ephemeral key pair, returning the encoding of the public key.voidreceivePeerValue(byte[] peerValue) Pass in the public key for the peer to the agreement calculator.
-
Field Details
-
domain
-
localKeyPair
-
peerPublicKey
-
-
Constructor Details
-
JceTlsECDH
-
-
Method Details
-
generateEphemeral
Description copied from interface:TlsAgreementGenerate an ephemeral key pair, returning the encoding of the public key.- Specified by:
generateEphemeralin interfaceTlsAgreement- Returns:
- a byte encoding of the public key.
- Throws:
IOException- in case of error.
-
receivePeerValue
Description copied from interface:TlsAgreementPass in the public key for the peer to the agreement calculator.- Specified by:
receivePeerValuein interfaceTlsAgreement- Parameters:
peerValue- a byte encoding of the peer public key.- Throws:
IOException- in case of error.
-
calculateSecret
Description copied from interface:TlsAgreementCalculate the agreed secret based on the calculator's current state.- Specified by:
calculateSecretin interfaceTlsAgreement- Returns:
- the calculated secret.
- Throws:
IOException- in case of error.
-