Class BcTlsECDomain
java.lang.Object
org.bouncycastle.tls.crypto.impl.bc.BcTlsECDomain
- All Implemented Interfaces:
TlsECDomain
EC domain class for generating key pairs and performing key agreement.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final TlsECConfig
protected final BcTlsCrypto
protected final org.bouncycastle.crypto.params.ECDomainParameters
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncalculateECDHAgreement
(org.bouncycastle.crypto.params.ECPrivateKeyParameters privateKey, org.bouncycastle.crypto.params.ECPublicKeyParameters publicKey) static BcTlsSecret
calculateECDHAgreement
(BcTlsCrypto crypto, org.bouncycastle.crypto.params.ECPrivateKeyParameters privateKey, org.bouncycastle.crypto.params.ECPublicKeyParameters publicKey) Return an agreement operator suitable for ephemeral EC Diffie-Hellman.org.bouncycastle.math.ec.ECPoint
decodePoint
(byte[] encoding) org.bouncycastle.crypto.params.ECPublicKeyParameters
decodePublicKey
(byte[] encoding) byte[]
encodePoint
(org.bouncycastle.math.ec.ECPoint point) byte[]
encodePublicKey
(org.bouncycastle.crypto.params.ECPublicKeyParameters publicKey) org.bouncycastle.crypto.AsymmetricCipherKeyPair
static org.bouncycastle.crypto.params.ECDomainParameters
getDomainParameters
(int namedGroup) static org.bouncycastle.crypto.params.ECDomainParameters
getDomainParameters
(TlsECConfig ecConfig)
-
Field Details
-
crypto
-
config
-
domainParameters
protected final org.bouncycastle.crypto.params.ECDomainParameters domainParameters
-
-
Constructor Details
-
BcTlsECDomain
-
-
Method Details
-
calculateECDHAgreement
public static BcTlsSecret calculateECDHAgreement(BcTlsCrypto crypto, org.bouncycastle.crypto.params.ECPrivateKeyParameters privateKey, org.bouncycastle.crypto.params.ECPublicKeyParameters publicKey) -
getDomainParameters
public static org.bouncycastle.crypto.params.ECDomainParameters getDomainParameters(TlsECConfig ecConfig) -
getDomainParameters
public static org.bouncycastle.crypto.params.ECDomainParameters getDomainParameters(int namedGroup) -
calculateECDHAgreement
public BcTlsSecret calculateECDHAgreement(org.bouncycastle.crypto.params.ECPrivateKeyParameters privateKey, org.bouncycastle.crypto.params.ECPublicKeyParameters publicKey) -
createECDH
Description copied from interface:TlsECDomain
Return an agreement operator suitable for ephemeral EC Diffie-Hellman.- Specified by:
createECDH
in interfaceTlsECDomain
- Returns:
- a key agreement operator.
-
decodePoint
public org.bouncycastle.math.ec.ECPoint decodePoint(byte[] encoding) -
decodePublicKey
public org.bouncycastle.crypto.params.ECPublicKeyParameters decodePublicKey(byte[] encoding) throws IOException - Throws:
IOException
-
encodePoint
public byte[] encodePoint(org.bouncycastle.math.ec.ECPoint point) -
encodePublicKey
public byte[] encodePublicKey(org.bouncycastle.crypto.params.ECPublicKeyParameters publicKey) -
generateKeyPair
public org.bouncycastle.crypto.AsymmetricCipherKeyPair generateKeyPair()
-