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.ECParameterSpec |
ecSpec |
Constructor and Description |
---|
JceTlsECDomain(JcaTlsCrypto crypto,
TlsECConfig ecConfig) |
Modifier and Type | Method and Description |
---|---|
JceTlsSecret |
calculateECDHAgreement(java.security.PrivateKey privateKey,
java.security.PublicKey publicKey) |
TlsAgreement |
createECDH()
Return an agreement operator suitable for ephemeral EC Diffie-Hellman.
|
org.bouncycastle.math.ec.ECPoint |
decodePoint(byte[] encoding) |
java.security.PublicKey |
decodePublicKey(byte[] encoding) |
byte[] |
encodePoint(org.bouncycastle.math.ec.ECPoint point) |
byte[] |
encodePublicKey(java.security.PublicKey publicKey) |
java.security.KeyPair |
generateKeyPair() |
protected final JcaTlsCrypto crypto
protected final TlsECConfig ecConfig
protected final java.security.spec.ECParameterSpec ecSpec
protected final org.bouncycastle.math.ec.ECCurve ecCurve
public JceTlsECDomain(JcaTlsCrypto crypto, TlsECConfig ecConfig)
public JceTlsSecret calculateECDHAgreement(java.security.PrivateKey privateKey, java.security.PublicKey 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.PublicKey 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.PublicKey publicKey) throws java.io.IOException
java.io.IOException
public java.security.KeyPair generateKeyPair()