diff options
author | lloyd <[email protected]> | 2010-03-05 16:10:55 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-05 16:10:55 +0000 |
commit | df56028cad58fad04b9866326cb62700af8f2fbe (patch) | |
tree | dcaa1a80c9f20db7b7993ac54b1aaafd488354c0 /src/pubkey/ecdsa/ecdsa.h | |
parent | 93873731f73e905d8714556f1ebe23acb32de0e1 (diff) |
Add verification ops for all signature key types
Diffstat (limited to 'src/pubkey/ecdsa/ecdsa.h')
-rw-r--r-- | src/pubkey/ecdsa/ecdsa.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/pubkey/ecdsa/ecdsa.h b/src/pubkey/ecdsa/ecdsa.h index 75a7b152a..4331cd87c 100644 --- a/src/pubkey/ecdsa/ecdsa.h +++ b/src/pubkey/ecdsa/ecdsa.h @@ -116,6 +116,25 @@ class BOTAN_DLL ECDSA_Signature_Operation : public PK_Ops::Signature_Operation const BigInt& x; }; +class BOTAN_DLL ECDSA_Verification_Operation : public PK_Ops::Verification + { + public: + ECDSA_Verification_Operation(const ECDSA_PublicKey& ecdsa); + + u32bit message_parts() const { return 2; } + u32bit message_part_size() const { return order.bytes(); } + u32bit max_input_bits() const { return order.bits(); } + + bool with_recovery() const { return false; } + + bool verify(const byte msg[], u32bit msg_len, + const byte sig[], u32bit sig_len); + private: + const PointGFp& base_point; + const PointGFp& public_point; + const BigInt& order; + }; + } #endif |