Top Description Fields Constructors Methods
org.bouncycastle.crypto.agreement

public Class DHBasicAgreement

extends Object
implements BasicAgreement
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.BasicAgreement
Imports
java.math.BigInteger, org.bouncycastle.crypto.BasicAgreement, .CipherParameters, .CryptoServicesRegistrar, org.bouncycastle.crypto.params.AsymmetricKeyParameter, .DHParameters, .DHPrivateKeyParameters, .DHPublicKeyParameters, .ParametersWithRandom

a Diffie-Hellman key agreement class.

Note

This is only the basic algorithm, it doesn't take advantage of long term public keys if they are available. See the DHAgreement class for a "better" implementation.

Field Summary

Modifier and TypeField and Description
private DHParameters
private DHPrivateKeyParameters
private static final BigInteger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public BigInteger
calculateAgreement(CipherParameters pubKey)

Implements org.bouncycastle.crypto.BasicAgreement.calculateAgreement.

given a short term public key from a given party calculate the next message in the agreement sequence.
public int
getFieldSize()

Implements org.bouncycastle.crypto.BasicAgreement.getFieldSize.

return the field size for the agreement algorithm in bytes.
public void
init(CipherParameters param)

Implements org.bouncycastle.crypto.BasicAgreement.init.

initialise the agreement engine.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dhParamsback to summary
private DHParameters dhParams
keyback to summary
private DHPrivateKeyParameters key
ONEback to summary
private static final BigInteger ONE

Constructor Detail

DHBasicAgreementback to summary
public DHBasicAgreement()

Method Detail

calculateAgreementback to summary
public BigInteger calculateAgreement(CipherParameters pubKey)

Implements org.bouncycastle.crypto.BasicAgreement.calculateAgreement.

given a short term public key from a given party calculate the next message in the agreement sequence.

getFieldSizeback to summary
public int getFieldSize()

Implements org.bouncycastle.crypto.BasicAgreement.getFieldSize.

Doc from org.bouncycastle.crypto.BasicAgreement.getFieldSize.

return the field size for the agreement algorithm in bytes.

initback to summary
public void init(CipherParameters param)

Implements org.bouncycastle.crypto.BasicAgreement.init.

Doc from org.bouncycastle.crypto.BasicAgreement.init.

initialise the agreement engine.