From f9a7c85b74be0f4a7273e8e0591703af83036e81 Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 3 Feb 2015 08:11:45 +0000 Subject: Convert PK operations to using Algo_Registry instead of Engine. Remove global PRNG. --- src/lib/pubkey/ecdsa/ecdsa.h | 48 -------------------------------------------- 1 file changed, 48 deletions(-) (limited to 'src/lib/pubkey/ecdsa/ecdsa.h') diff --git a/src/lib/pubkey/ecdsa/ecdsa.h b/src/lib/pubkey/ecdsa/ecdsa.h index c0245e8bc..91ddb500d 100644 --- a/src/lib/pubkey/ecdsa/ecdsa.h +++ b/src/lib/pubkey/ecdsa/ecdsa.h @@ -11,8 +11,6 @@ #define BOTAN_ECDSA_KEY_H__ #include -#include -#include namespace Botan { @@ -89,52 +87,6 @@ class BOTAN_DLL ECDSA_PrivateKey : public ECDSA_PublicKey, bool check_key(RandomNumberGenerator& rng, bool) const; }; -/** -* ECDSA signature operation -*/ -class BOTAN_DLL ECDSA_Signature_Operation : public PK_Ops::Signature - { - public: - ECDSA_Signature_Operation(const ECDSA_PrivateKey& ecdsa, - const std::string& hash); - - secure_vector sign(const byte msg[], size_t msg_len, - RandomNumberGenerator& rng); - - size_t message_parts() const { return 2; } - size_t message_part_size() const { return order.bytes(); } - size_t max_input_bits() const { return order.bits(); } - - private: - const PointGFp& base_point; - const BigInt& order; - const BigInt& x; - Modular_Reducer mod_order; - std::string m_hash; - }; - -/** -* ECDSA verification operation -*/ -class BOTAN_DLL ECDSA_Verification_Operation : public PK_Ops::Verification - { - public: - ECDSA_Verification_Operation(const ECDSA_PublicKey& ecdsa); - - size_t message_parts() const { return 2; } - size_t message_part_size() const { return order.bytes(); } - size_t max_input_bits() const { return order.bits(); } - - bool with_recovery() const { return false; } - - bool verify(const byte msg[], size_t msg_len, - const byte sig[], size_t sig_len); - private: - const PointGFp& base_point; - const PointGFp& public_point; - const BigInt& order; - }; - } #endif -- cgit v1.2.3