Class JceTlsDHDomain
java.lang.Object
org.bouncycastle.tls.crypto.impl.jcajce.JceTlsDHDomain
- All Implemented Interfaces:
TlsDHDomain
JCE support class for Diffie-Hellman key pair generation and key agreement over a specified Diffie-Hellman configuration.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final JcaTlsCryptoprotected final TlsDHConfigprotected final DHParameterSpec -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalculateDHAgreement(DHPrivateKey privateKey, DHPublicKey publicKey) static JceTlsSecretcalculateDHAgreement(JcaTlsCrypto crypto, DHPrivateKey privateKey, DHPublicKey publicKey, boolean padded) createDH()Return an agreement operator suitable for ephemeral Diffie-Hellman.decodeParameter(byte[] encoding) decodePublicKey(byte[] encoding) byte[]byte[]encodePublicKey(DHPublicKey publicKey)
-
Field Details
-
crypto
-
dhConfig
-
dhSpec
-
-
Constructor Details
-
JceTlsDHDomain
-
-
Method Details
-
calculateDHAgreement
public static JceTlsSecret calculateDHAgreement(JcaTlsCrypto crypto, DHPrivateKey privateKey, DHPublicKey publicKey, boolean padded) throws IOException - Throws:
IOException
-
calculateDHAgreement
public JceTlsSecret calculateDHAgreement(DHPrivateKey privateKey, DHPublicKey publicKey) throws IOException - Throws:
IOException
-
createDH
Description copied from interface:TlsDHDomainReturn an agreement operator suitable for ephemeral Diffie-Hellman.- Specified by:
createDHin interfaceTlsDHDomain- Returns:
- a key agreement operator.
-
decodeParameter
- Throws:
IOException
-
decodePublicKey
- Throws:
IOException
-
encodeParameter
- Throws:
IOException
-
encodePublicKey
- Throws:
IOException
-
generateKeyPair
- Throws:
IOException
-