Botan  1.11.15
Public Types | Public Member Functions
Botan::McEliece_Private_Operation Class Reference

#include <mceliece.h>

Inheritance diagram for Botan::McEliece_Private_Operation:
Botan::PK_Ops::Decryption

List of all members.

Public Types

typedef PK_Spec< Private_KeySpec

Public Member Functions

secure_vector< bytedecrypt (const byte msg[], size_t msg_len)
McEliece_PrivateKey const & get_key () const
size_t max_input_bits () const
 McEliece_Private_Operation (const McEliece_PrivateKey &mce_key)

Detailed Description

Definition at line 110 of file mceliece.h.


Member Typedef Documentation

typedef PK_Spec<Private_Key> Botan::PK_Ops::Decryption::Spec [inherited]

Definition at line 62 of file pk_ops.h.


Constructor & Destructor Documentation

Definition at line 120 of file mceliece.cpp.

   :m_priv_key(private_key)
   {
   }

Member Function Documentation

secure_vector< byte > Botan::McEliece_Private_Operation::decrypt ( const byte  msg[],
size_t  msg_len 
) [virtual]

Implements Botan::PK_Ops::Decryption.

Definition at line 125 of file mceliece.cpp.

References Botan::McEliece_PublicKey::get_code_length(), and Botan::mceliece_decrypt().

Referenced by Botan::McEliece_PrivateKey::check_key(), and Botan::McEliece_KEM_Decryptor::decrypt().

   {
   secure_vector<gf2m> err_pos;

   secure_vector<byte> plaintext = mceliece_decrypt(
      err_pos,
      msg, msg_len,
      m_priv_key
      );

   return mceliece_message_parts(err_pos, plaintext, m_priv_key.get_code_length()).get_concat();
   }

Definition at line 119 of file mceliece.h.

{ return m_priv_key; }
size_t Botan::McEliece_Private_Operation::max_input_bits ( ) const [inline, virtual]

Implements Botan::PK_Ops::Decryption.

Definition at line 115 of file mceliece.h.

{ return m_priv_key.max_input_bits();  }

The documentation for this class was generated from the following files: