org.bouncycastle.jce.provider

Class JCEECDHKeyAgreement


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

Constructor Summary

JCEECDHKeyAgreement(BasicAgreement agreement)

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)

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