diff options
Diffstat (limited to 'core/src/main/java/org/bouncycastle/crypto/BasicAgreement.java')
-rw-r--r-- | core/src/main/java/org/bouncycastle/crypto/BasicAgreement.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/core/src/main/java/org/bouncycastle/crypto/BasicAgreement.java b/core/src/main/java/org/bouncycastle/crypto/BasicAgreement.java new file mode 100644 index 00000000..8e5ff0da --- /dev/null +++ b/core/src/main/java/org/bouncycastle/crypto/BasicAgreement.java @@ -0,0 +1,26 @@ +package org.bouncycastle.crypto; + +import java.math.BigInteger; + +/** + * The basic interface that basic Diffie-Hellman implementations + * conforms to. + */ +public interface BasicAgreement +{ + /** + * initialise the agreement engine. + */ + void init(CipherParameters param); + + /** + * return the field size for the agreement algorithm in bytes. + */ + int getFieldSize(); + + /** + * given a public key from a given party calculate the next + * message in the agreement sequence. + */ + BigInteger calculateAgreement(CipherParameters pubKey); +} |