org.bouncycastle.jce.provider

Class JCEDHKeyAgreement


public class JCEDHKeyAgreement
extends KeyAgreementSpi

Diffie-Hellman key agreement. There's actually a better way of doing this if you are using long term public keys, see the light-weight version for details.

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)

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