aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/keypair/keypair.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pubkey/keypair/keypair.h')
-rw-r--r--src/pubkey/keypair/keypair.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/pubkey/keypair/keypair.h b/src/pubkey/keypair/keypair.h
index 22dcca0ea..c7b128e53 100644
--- a/src/pubkey/keypair/keypair.h
+++ b/src/pubkey/keypair/keypair.h
@@ -1,44 +1,44 @@
/*
* Keypair Checks
-* (C) 1999-2007 Jack Lloyd
+* (C) 1999-2010 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
-#ifndef BOTAN_KEYPAIR_H__
-#define BOTAN_KEYPAIR_H__
+#ifndef BOTAN_KEYPAIR_CHECKS_H__
+#define BOTAN_KEYPAIR_CHECKS_H__
-#include <botan/pubkey.h>
+#include <botan/pk_keys.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.
+* Tests whether the key is consistent for encryption; whether
+* encrypting and then decrypting gives 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
+* @param key the key to test
+* @param padding the encryption padding method to use
+* @return true if consistent otherwise false
*/
-BOTAN_DLL void check_key(RandomNumberGenerator& rng,
- PK_Encryptor& enc,
- PK_Decryptor& dec);
+BOTAN_DLL bool
+encryption_consistency_check(RandomNumberGenerator& rng,
+ const Private_Key& key,
+ const std::string& padding);
/**
-* 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.
+* Tests whether the key is consistent for signatures; whether a
+* signature can be created and then verified
* @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
+* @param key the key to test
+* @param padding the signature padding method to use
+* @return true if consistent otherwise false
*/
-BOTAN_DLL void check_key(RandomNumberGenerator& rng,
- PK_Signer& sig,
- PK_Verifier& ver);
+BOTAN_DLL bool
+signature_consistency_check(RandomNumberGenerator& rng,
+ const Private_Key& key,
+ const std::string& padding);
}