public class JceTlsECDomain extends java.lang.Object implements TlsECDomain
Modifier and Type | Field and Description |
---|---|
protected JcaTlsCrypto |
crypto |
protected TlsECConfig |
ecConfig |
protected org.bouncycastle.math.ec.ECCurve |
ecCurve |
protected java.security.AlgorithmParameters |
ecDomain |
Constructor and Description |
---|
JceTlsECDomain(JcaTlsCrypto crypto,
TlsECConfig ecConfig) |
Modifier and Type | Method and Description |
---|---|
byte[] |
calculateECDHAgreement(java.security.interfaces.ECPublicKey publicKey,
java.security.interfaces.ECPrivateKey privateKey) |
TlsAgreement |
createECDH()
Return an agreement operator suitable for ephemeral EC Diffie-Hellman.
|
org.bouncycastle.math.ec.ECPoint |
decodePoint(byte[] encoding) |
java.security.interfaces.ECPublicKey |
decodePublicKey(byte[] encoding) |
byte[] |
encodePoint(org.bouncycastle.math.ec.ECPoint point) |
byte[] |
encodePublicKey(java.security.interfaces.ECPublicKey publicKey) |
java.security.KeyPair |
generateKeyPair() |
JcaTlsCrypto |
getCrypto() |
protected JcaTlsCrypto crypto
protected TlsECConfig ecConfig
protected java.security.AlgorithmParameters ecDomain
protected org.bouncycastle.math.ec.ECCurve ecCurve
public JceTlsECDomain(JcaTlsCrypto crypto, TlsECConfig ecConfig)
public byte[] calculateECDHAgreement(java.security.interfaces.ECPublicKey publicKey, java.security.interfaces.ECPrivateKey privateKey) throws java.security.GeneralSecurityException
java.security.GeneralSecurityException
public TlsAgreement createECDH()
TlsECDomain
createECDH
in interface TlsECDomain
public org.bouncycastle.math.ec.ECPoint decodePoint(byte[] encoding) throws java.io.IOException
java.io.IOException
public java.security.interfaces.ECPublicKey decodePublicKey(byte[] encoding) throws java.io.IOException
java.io.IOException
public byte[] encodePoint(org.bouncycastle.math.ec.ECPoint point) throws java.io.IOException
java.io.IOException
public byte[] encodePublicKey(java.security.interfaces.ECPublicKey publicKey) throws java.io.IOException
java.io.IOException
public java.security.KeyPair generateKeyPair()
public JcaTlsCrypto getCrypto()