diff options
author | lloyd <[email protected]> | 2015-02-03 08:11:45 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2015-02-03 08:11:45 +0000 |
commit | f9a7c85b74be0f4a7273e8e0591703af83036e81 (patch) | |
tree | 075dbe119fc16863cad99b432ca6251778bd8fd1 /src/lib/pubkey/nr/nr.h | |
parent | 69d2cd919c698a6b138b2ccba0de5d5aa2a33a03 (diff) |
Convert PK operations to using Algo_Registry instead of Engine.
Remove global PRNG.
Diffstat (limited to 'src/lib/pubkey/nr/nr.h')
-rw-r--r-- | src/lib/pubkey/nr/nr.h | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/lib/pubkey/nr/nr.h b/src/lib/pubkey/nr/nr.h index 76f689079..51752f8ce 100644 --- a/src/lib/pubkey/nr/nr.h +++ b/src/lib/pubkey/nr/nr.h @@ -9,9 +9,6 @@ #define BOTAN_NYBERG_RUEPPEL_H__ #include <botan/dl_algo.h> -#include <botan/pk_ops.h> -#include <botan/numthry.h> -#include <botan/reducer.h> namespace Botan { @@ -55,50 +52,6 @@ class BOTAN_DLL NR_PrivateKey : public NR_PublicKey, const BigInt& x = 0); }; -/** -* Nyberg-Rueppel signature operation -*/ -class BOTAN_DLL NR_Signature_Operation : public PK_Ops::Signature - { - public: - NR_Signature_Operation(const NR_PrivateKey& nr); - - size_t message_parts() const { return 2; } - size_t message_part_size() const { return q.bytes(); } - size_t max_input_bits() const { return (q.bits() - 1); } - - secure_vector<byte> sign(const byte msg[], size_t msg_len, - RandomNumberGenerator& rng); - private: - const BigInt& q; - const BigInt& x; - Fixed_Base_Power_Mod powermod_g_p; - Modular_Reducer mod_q; - }; - -/** -* Nyberg-Rueppel verification operation -*/ -class BOTAN_DLL NR_Verification_Operation : public PK_Ops::Verification - { - public: - NR_Verification_Operation(const NR_PublicKey& nr); - - size_t message_parts() const { return 2; } - size_t message_part_size() const { return q.bytes(); } - size_t max_input_bits() const { return (q.bits() - 1); } - - bool with_recovery() const { return true; } - - secure_vector<byte> verify_mr(const byte msg[], size_t msg_len); - private: - const BigInt& q; - const BigInt& y; - - Fixed_Base_Power_Mod powermod_g_p, powermod_y_p; - Modular_Reducer mod_p, mod_q; - }; - } #endif |