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.spec.ECGenParameterSpec |
ecGenSpec |
protected java.security.spec.ECParameterSpec |
ecParameterSpec |
Constructor and Description |
---|
JceTlsECDomain(JcaTlsCrypto crypto,
TlsECConfig ecConfig) |
Modifier and Type | Method and Description |
---|---|
JceTlsSecret |
calculateECDHAgreement(java.security.interfaces.ECPrivateKey privateKey,
java.security.interfaces.ECPublicKey publicKey) |
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() |
protected final JcaTlsCrypto crypto
protected final TlsECConfig ecConfig
protected java.security.spec.ECGenParameterSpec ecGenSpec
protected java.security.spec.ECParameterSpec ecParameterSpec
protected org.bouncycastle.math.ec.ECCurve ecCurve
public JceTlsECDomain(JcaTlsCrypto crypto, TlsECConfig ecConfig)
public JceTlsSecret calculateECDHAgreement(java.security.interfaces.ECPrivateKey privateKey, java.security.interfaces.ECPublicKey publicKey) throws java.io.IOException
java.io.IOException
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()