Class JceTlsECDomain
- java.lang.Object
-
- org.bouncycastle.tls.crypto.impl.jcajce.JceTlsECDomain
-
- All Implemented Interfaces:
TlsECDomain
public class JceTlsECDomain extends java.lang.Object implements TlsECDomain
EC domain class for generating key pairs and performing key agreement.
-
-
Field Summary
Fields Modifier and Type Field Description protected JcaTlsCryptocryptoprotected TlsECConfigecConfigprotected org.bouncycastle.math.ec.ECCurveecCurveprotected java.security.spec.ECParameterSpececSpec
-
Constructor Summary
Constructors Constructor Description JceTlsECDomain(JcaTlsCrypto crypto, TlsECConfig ecConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JceTlsSecretcalculateECDHAgreement(java.security.PrivateKey privateKey, java.security.PublicKey publicKey)TlsAgreementcreateECDH()Return an agreement operator suitable for ephemeral EC Diffie-Hellman.org.bouncycastle.math.ec.ECPointdecodePoint(byte[] encoding)java.security.PublicKeydecodePublicKey(byte[] encoding)byte[]encodePoint(org.bouncycastle.math.ec.ECPoint point)byte[]encodePublicKey(java.security.PublicKey publicKey)java.security.KeyPairgenerateKeyPair()
-
-
-
Field Detail
-
crypto
protected final JcaTlsCrypto crypto
-
ecConfig
protected final TlsECConfig ecConfig
-
ecSpec
protected final java.security.spec.ECParameterSpec ecSpec
-
ecCurve
protected final org.bouncycastle.math.ec.ECCurve ecCurve
-
-
Constructor Detail
-
JceTlsECDomain
public JceTlsECDomain(JcaTlsCrypto crypto, TlsECConfig ecConfig)
-
-
Method Detail
-
calculateECDHAgreement
public JceTlsSecret calculateECDHAgreement(java.security.PrivateKey privateKey, java.security.PublicKey publicKey) throws java.io.IOException
- Throws:
java.io.IOException
-
createECDH
public TlsAgreement createECDH()
Description copied from interface:TlsECDomainReturn an agreement operator suitable for ephemeral EC Diffie-Hellman.- Specified by:
createECDHin interfaceTlsECDomain- Returns:
- a key agreement operator.
-
decodePoint
public org.bouncycastle.math.ec.ECPoint decodePoint(byte[] encoding) throws java.io.IOException- Throws:
java.io.IOException
-
decodePublicKey
public java.security.PublicKey decodePublicKey(byte[] encoding) throws java.io.IOException- Throws:
java.io.IOException
-
encodePoint
public byte[] encodePoint(org.bouncycastle.math.ec.ECPoint point) throws java.io.IOException- Throws:
java.io.IOException
-
encodePublicKey
public byte[] encodePublicKey(java.security.PublicKey publicKey) throws java.io.IOException- Throws:
java.io.IOException
-
generateKeyPair
public java.security.KeyPair generateKeyPair()
-
-