From 1b7dbd5ca22f83ac8011dc209d92d2562562c816 Mon Sep 17 00:00:00 2001 From: lloyd Date: Mon, 8 Dec 2014 06:51:10 +0000 Subject: Add a basic speed test for McEliece --- src/lib/pubkey/mce/mce_kem.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/lib') diff --git a/src/lib/pubkey/mce/mce_kem.h b/src/lib/pubkey/mce/mce_kem.h index 4e46a0fab..2bb1edba5 100644 --- a/src/lib/pubkey/mce/mce_kem.h +++ b/src/lib/pubkey/mce/mce_kem.h @@ -37,6 +37,16 @@ class BOTAN_DLL McEliece_KEM_Decryptor * returns the derived 512-bit symmetric key */ secure_vector decrypt(const byte msg[], size_t msg_len); + + /** + * returns the derived 512-bit symmetric key + */ + template + secure_vector decrypt_vec(const std::vector& v) + { + return decrypt(&v[0], v.size()); + + } private: McEliece_Private_Operation m_raw_priv_op; }; -- cgit v1.2.3