Class XDHBasicAgreement
- java.lang.Object
-
- org.bouncycastle.crypto.agreement.XDHBasicAgreement
-
- All Implemented Interfaces:
BasicAgreement
public class XDHBasicAgreement extends java.lang.Object implements BasicAgreement
Key agreement using X25519 or X448. Same as Weierstrauss curve based ECDH, except this uses the U-coordinate while ECDH uses the X-coordinate.
-
-
Constructor Summary
Constructors Constructor Description XDHBasicAgreement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.math.BigIntegercalculateAgreement(CipherParameters pubKey)given a public key from a given party calculate the next message in the agreement sequence.intgetFieldSize()return the field size for the agreement algorithm in bytes.voidinit(CipherParameters key)initialise the agreement engine.
-
-
-
Method Detail
-
init
public void init(CipherParameters key)
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
public java.math.BigInteger calculateAgreement(CipherParameters pubKey)
Description copied from interface:BasicAgreementgiven a public key from a given party calculate the next message in the agreement sequence.- Specified by:
calculateAgreementin interfaceBasicAgreement
-
-