public class BcTlsECDomain extends java.lang.Object implements TlsECDomain
Modifier and Type | Field and Description |
---|---|
protected TlsECConfig |
config |
protected BcTlsCrypto |
crypto |
protected org.bouncycastle.crypto.params.ECDomainParameters |
domainParameters |
Constructor and Description |
---|
BcTlsECDomain(BcTlsCrypto crypto,
TlsECConfig ecConfig) |
Modifier and Type | Method and Description |
---|---|
static BcTlsSecret |
calculateECDHAgreement(BcTlsCrypto crypto,
org.bouncycastle.crypto.params.ECPrivateKeyParameters privateKey,
org.bouncycastle.crypto.params.ECPublicKeyParameters publicKey) |
BcTlsSecret |
calculateECDHAgreement(org.bouncycastle.crypto.params.ECPrivateKeyParameters privateKey,
org.bouncycastle.crypto.params.ECPublicKeyParameters publicKey) |
TlsAgreement |
createECDH()
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 |
generateKeyPair() |
static org.bouncycastle.crypto.params.ECDomainParameters |
getDomainParameters(int namedGroup) |
static org.bouncycastle.crypto.params.ECDomainParameters |
getDomainParameters(TlsECConfig ecConfig) |
protected final BcTlsCrypto crypto
protected final TlsECConfig config
protected final org.bouncycastle.crypto.params.ECDomainParameters domainParameters
public BcTlsECDomain(BcTlsCrypto crypto, TlsECConfig ecConfig)
public static BcTlsSecret calculateECDHAgreement(BcTlsCrypto crypto, org.bouncycastle.crypto.params.ECPrivateKeyParameters privateKey, org.bouncycastle.crypto.params.ECPublicKeyParameters publicKey)
public static org.bouncycastle.crypto.params.ECDomainParameters getDomainParameters(TlsECConfig ecConfig)
public static org.bouncycastle.crypto.params.ECDomainParameters getDomainParameters(int namedGroup)
public BcTlsSecret calculateECDHAgreement(org.bouncycastle.crypto.params.ECPrivateKeyParameters privateKey, org.bouncycastle.crypto.params.ECPublicKeyParameters publicKey)
public TlsAgreement createECDH()
TlsECDomain
createECDH
in interface TlsECDomain
public org.bouncycastle.math.ec.ECPoint decodePoint(byte[] encoding)
public org.bouncycastle.crypto.params.ECPublicKeyParameters decodePublicKey(byte[] encoding) throws java.io.IOException
java.io.IOException
public byte[] encodePoint(org.bouncycastle.math.ec.ECPoint point)
public byte[] encodePublicKey(org.bouncycastle.crypto.params.ECPublicKeyParameters publicKey)
public org.bouncycastle.crypto.AsymmetricCipherKeyPair generateKeyPair()