diff options
author | lloyd <[email protected]> | 2010-03-05 06:47:02 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-05 06:47:02 +0000 |
commit | 1b68d7e53c4bc5e6b2938194b0f7eda78a72ce43 (patch) | |
tree | da1b0482d875a48fe95e133346aee4baabcbf7cb /src/pubkey/pk_ops.h | |
parent | d4ef447dc8b3b4f40f2ab250b1c364e2f74ccfa4 (diff) |
Remove the sign() operation from the public key objects, totally replaced
by using the ops.
Add real ECDSA test vectors (two found in ANSI X9.62)
Diffstat (limited to 'src/pubkey/pk_ops.h')
-rw-r--r-- | src/pubkey/pk_ops.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/pubkey/pk_ops.h b/src/pubkey/pk_ops.h index 5aa50efdb..2386b968a 100644 --- a/src/pubkey/pk_ops.h +++ b/src/pubkey/pk_ops.h @@ -49,6 +49,31 @@ class Signature_Operation virtual ~Signature_Operation() {} }; +class Verification_Operation + { + public: + /** + * Get the maximum message size in bits supported by this public key. + * @return the maximum message in bits + */ + virtual u32bit max_input_bits() const = 0; + + /** + * @return boolean specifying if this key type supports recovery + */ + virtual bool with_recovery() const = 0; + + /* + * Perform a signature operation + * @param msg the message + * @param msg_len the length of msg in bytes + * @returns recovered message if with_recovery() otherwise {0} or {1} + */ + virtual SecureVector<byte> verify(const byte msg[], u32bit msg_len); + + virtual ~Verification_Operation() {} + }; + /* * A generic Key Agreement Operation (eg DH or ECDH) */ |