org.bouncycastle.jce.provider

Class JCEECDHKeyAgreement

Known Direct Subclasses:
JCEECDHKeyAgreement.DH, JCEECDHKeyAgreement.DHC, JCEECDHKeyAgreement.DHwithSHA1KDF

public class JCEECDHKeyAgreement
extends KeyAgreementSpi

Diffie-Hellman key agreement using elliptic curve keys, ala IEEE P1363 both the simple one, and the simple one with cofactors are supported.

Nested Class Summary

static class
JCEECDHKeyAgreement.DH
static class
JCEECDHKeyAgreement.DHC
static class
JCEECDHKeyAgreement.DHwithSHA1KDF

Constructor Summary

JCEECDHKeyAgreement(BasicAgreement agreement)
JCEECDHKeyAgreement(BasicAgreement agreement, DerivationFunction kdf)

Method Summary

protected Key
engineDoPhase(Key key, boolean lastPhase)
protected byte[]
engineGenerateSecret()
protected SecretKey
engineGenerateSecret(String algorithm)
protected int
engineGenerateSecret(byte[] sharedSecret, int offset)
protected void
engineInit(Key key, AlgorithmParameterSpec params, SecureRandom random)
protected void
engineInit(Key key, SecureRandom random)

Constructor Details

JCEECDHKeyAgreement

protected JCEECDHKeyAgreement(BasicAgreement agreement)

JCEECDHKeyAgreement

protected JCEECDHKeyAgreement(BasicAgreement agreement,
                              DerivationFunction kdf)

Method Details

engineDoPhase

protected Key engineDoPhase(Key key,
                            boolean lastPhase)
            throws InvalidKeyException,
                   IllegalStateException

engineGenerateSecret

protected byte[] engineGenerateSecret()
            throws IllegalStateException

engineGenerateSecret

protected SecretKey engineGenerateSecret(String algorithm)

engineGenerateSecret

protected int engineGenerateSecret(byte[] sharedSecret,
                                   int offset)
            throws IllegalStateException,
                   ShortBufferException

engineInit

protected void engineInit(Key key,
                          AlgorithmParameterSpec params,
                          SecureRandom random)
            throws InvalidKeyException,
                   InvalidAlgorithmParameterException

engineInit

protected void engineInit(Key key,
                          SecureRandom random)
            throws InvalidKeyException