summaryrefslogtreecommitdiffstats
path: root/botan/build/botan/keypair.h
diff options
context:
space:
mode:
Diffstat (limited to 'botan/build/botan/keypair.h')
-rw-r--r--botan/build/botan/keypair.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/botan/build/botan/keypair.h b/botan/build/botan/keypair.h
new file mode 100644
index 0000000..b1d5c2d
--- /dev/null
+++ b/botan/build/botan/keypair.h
@@ -0,0 +1,47 @@
+/*
+* Keypair Checks
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
+
+#ifndef BOTAN_KEYPAIR_H__
+#define BOTAN_KEYPAIR_H__
+
+#include <botan/pubkey.h>
+
+namespace Botan {
+
+namespace KeyPair {
+
+/**
+* Tests whether the specified encryptor and decryptor are related to each other,
+* i.e. whether encrypting with the encryptor and consecutive decryption leads to
+* the original plaintext.
+* @param rng the rng to use
+* @param enc the encryptor to test
+* @param dec the decryptor to test
+* @throw Self_Test_Failure if the arguments are not related to each other
+*/
+BOTAN_DLL void check_key(RandomNumberGenerator& rng,
+ PK_Encryptor* enc,
+ PK_Decryptor* dec);
+
+/**
+* Tests whether the specified signer and verifier are related to each other,
+* i.e. whether a signature created with the signer and can be
+* successfully verified with the verifier.
+* @param rng the rng to use
+* @param sig the signer to test
+* @param ver the verifier to test
+* @throw Self_Test_Failure if the arguments are not related to each other
+*/
+BOTAN_DLL void check_key(RandomNumberGenerator& rng,
+ PK_Signer* sig,
+ PK_Verifier* ver);
+
+}
+
+}
+
+#endif