Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/humla-spongycastle.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/java/org/spongycastle/crypto/BasicAgreement.java')
-rw-r--r--core/src/main/java/org/spongycastle/crypto/BasicAgreement.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/core/src/main/java/org/spongycastle/crypto/BasicAgreement.java b/core/src/main/java/org/spongycastle/crypto/BasicAgreement.java
new file mode 100644
index 00000000..e6e003c6
--- /dev/null
+++ b/core/src/main/java/org/spongycastle/crypto/BasicAgreement.java
@@ -0,0 +1,26 @@
+package org.spongycastle.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);
+}