• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package org.bouncycastle.crypto;
2 
3 import java.math.BigInteger;
4 
5 /**
6  * The basic interface that basic Diffie-Hellman implementations
7  * conforms to.
8  */
9 public interface BasicAgreement
10 {
11     /**
12      * initialise the agreement engine.
13      */
init(CipherParameters param)14     void init(CipherParameters param);
15 
16     /**
17      * return the field size for the agreement algorithm in bytes.
18      */
getFieldSize()19     int getFieldSize();
20 
21     /**
22      * given a public key from a given party calculate the next
23      * message in the agreement sequence.
24      */
calculateAgreement(CipherParameters pubKey)25     BigInteger calculateAgreement(CipherParameters pubKey);
26 }
27