BasicAgreement (Bouncy Castle Library 1.52 API Specification)
Date: 2015-03-01

org.bouncycastle.crypto

## Interface BasicAgreement

- All Known Implementing Classes:
    DHBasicAgreement, ECDHBasicAgreement, ECDHCBasicAgreement, ECMQVBasicAgreement

      public interface BasicAgreement

  The basic interface that basic Diffie-Hellman implementations conforms to.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.math.BigInteger` | `calculateAgreement(CipherParameters pubKey)` given a public key from a given party calculate the next message in the agreement sequence.
    `int` | `getFieldSize()` return the field size for the agreement algorithm in bytes.
    `void` | `init(CipherParameters param)` initialise the agreement engine.

- - ### Method Detail

    - #### init

          void init(CipherParameters param)

      initialise the agreement engine.

    - #### getFieldSize

          int getFieldSize()

      return the field size for the agreement algorithm in bytes.

    - #### calculateAgreement

          java.math.BigInteger calculateAgreement(CipherParameters pubKey)

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