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/dsa/dsa.h | |
parent | 93873731f73e905d8714556f1ebe23acb32de0e1 (diff) |
Add verification ops for all signature key types
Diffstat (limited to 'src/pubkey/dsa/dsa.h')
-rw-r--r-- | src/pubkey/dsa/dsa.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/pubkey/dsa/dsa.h b/src/pubkey/dsa/dsa.h index e0aab1b52..68ae34235 100644 --- a/src/pubkey/dsa/dsa.h +++ b/src/pubkey/dsa/dsa.h @@ -83,6 +83,27 @@ class BOTAN_DLL DSA_Signature_Operation : public PK_Ops::Signature_Operation Modular_Reducer mod_q; }; +class BOTAN_DLL DSA_Verification_Operation : public PK_Ops::Verification + { + public: + DSA_Verification_Operation(const DSA_PublicKey& dsa); + + u32bit message_parts() const { return 2; } + u32bit message_part_size() const { return q.bytes(); } + u32bit max_input_bits() const { return q.bits(); } + + bool with_recovery() const { return false; } + + bool verify(const byte msg[], u32bit msg_len, + const byte sig[], u32bit sig_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 |