diff options
Diffstat (limited to 'src/lib/pubkey/pubkey.h')
-rw-r--r-- | src/lib/pubkey/pubkey.h | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/src/lib/pubkey/pubkey.h b/src/lib/pubkey/pubkey.h index ffb00979d..54c55c597 100644 --- a/src/lib/pubkey/pubkey.h +++ b/src/lib/pubkey/pubkey.h @@ -24,14 +24,6 @@ namespace Botan { enum Signature_Format { IEEE_1363, DER_SEQUENCE }; /** -* Enum marking if protection against fault attacks should be used -*/ -enum Fault_Protection { - ENABLE_FAULT_PROTECTION, - DISABLE_FAULT_PROTECTION -}; - -/** * Public Key Encryptor */ class BOTAN_DLL PK_Encryptor @@ -136,7 +128,11 @@ class BOTAN_DLL PK_Signer * @return signature */ std::vector<byte> sign_message(const byte in[], size_t length, - RandomNumberGenerator& rng); + RandomNumberGenerator& rng) + { + this->update(in, length); + return this->signature(rng); + } /** * Sign a message. @@ -191,19 +187,12 @@ class BOTAN_DLL PK_Signer * @param emsa the EMSA to use * An example would be "EMSA1(SHA-224)". * @param format the signature format to use - * @param prot says if fault protection should be enabled */ PK_Signer(const Private_Key& key, const std::string& emsa, - Signature_Format format = IEEE_1363, - Fault_Protection prot = ENABLE_FAULT_PROTECTION); + Signature_Format format = IEEE_1363); private: - bool self_test_signature(const std::vector<byte>& msg, - const std::vector<byte>& sig) const; - std::unique_ptr<PK_Ops::Signature> m_op; - std::unique_ptr<PK_Ops::Verification> m_verify_op; - std::unique_ptr<EMSA> m_emsa; Signature_Format m_sig_format; }; @@ -299,11 +288,7 @@ class BOTAN_DLL PK_Verifier const std::string& emsa, Signature_Format format = IEEE_1363); private: - bool validate_signature(const secure_vector<byte>& msg, - const byte sig[], size_t sig_len); - std::unique_ptr<PK_Ops::Verification> m_op; - std::unique_ptr<EMSA> m_emsa; Signature_Format m_sig_format; }; |