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

pack-priv Class DhBasicAgreement

extends Object
implements BasicAgreement
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.internal.BasicAgreement
Imports
java.math.BigInteger, org.bouncycastle.crypto.IllegalKeyException, org.bouncycastle.crypto.internal.BasicAgreement, .CipherParameters, org.bouncycastle.crypto.internal.params.DhParameters, .DhPrivateKeyParameters, .DhPublicKeyParameters

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

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

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

Implements org.bouncycastle.crypto.internal.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.internal.BasicAgreement.getFieldSize.

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

Implements org.bouncycastle.crypto.internal.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

Constructor Detail

DhBasicAgreementback to summary
pack-priv DhBasicAgreement()

Method Detail

calculateAgreementback to summary
public BigInteger calculateAgreement(CipherParameters pubKey)

Implements org.bouncycastle.crypto.internal.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.internal.BasicAgreement.getFieldSize.

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

return the field size for the agreement algorithm in bytes.

initback to summary
public void init(CipherParameters param)

Implements org.bouncycastle.crypto.internal.BasicAgreement.init.

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

initialise the agreement engine.