Class DHBasicAgreement
java.lang.Object
org.bouncycastle.crypto.agreement.DHBasicAgreement
- All Implemented Interfaces:
BasicAgreement
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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalculateAgreement(CipherParameters pubKey) given a short term public key from a given party calculate the next message in the agreement sequence.intreturn the field size for the agreement algorithm in bytes.voidinit(CipherParameters param) initialise the agreement engine.
-
Constructor Details
-
DHBasicAgreement
public DHBasicAgreement()
-
-
Method Details
-
init
Description copied from interface:BasicAgreementinitialise the agreement engine.- Specified by:
initin interfaceBasicAgreement
-
getFieldSize
public int getFieldSize()Description copied from interface:BasicAgreementreturn the field size for the agreement algorithm in bytes.- Specified by:
getFieldSizein interfaceBasicAgreement
-
calculateAgreement
given a short term public key from a given party calculate the next message in the agreement sequence.- Specified by:
calculateAgreementin interfaceBasicAgreement
-