Botan  1.10.9
Public Member Functions | List of all members
Botan::Assembler_Engine Class Reference

#include <asm_engine.h>

Inheritance diagram for Botan::Assembler_Engine:
Botan::Engine

Public Member Functions

BlockCipherfind_block_cipher (const SCAN_Name &, Algorithm_Factory &) const
 
HashFunctionfind_hash (const SCAN_Name &request, Algorithm_Factory &) const
 
virtual MessageAuthenticationCodefind_mac (const SCAN_Name &algo_spec, Algorithm_Factory &af) const
 
virtual PBKDFfind_pbkdf (const SCAN_Name &algo_spec, Algorithm_Factory &af) const
 
virtual StreamCipherfind_stream_cipher (const SCAN_Name &algo_spec, Algorithm_Factory &af) const
 
virtual Keyed_Filterget_cipher (const std::string &algo_spec, Cipher_Dir dir, Algorithm_Factory &af)
 
virtual PK_Ops::Decryptionget_decryption_op (const Private_Key &key) const
 
virtual PK_Ops::Encryptionget_encryption_op (const Public_Key &key) const
 
virtual PK_Ops::Key_Agreementget_key_agreement_op (const Private_Key &key) const
 
virtual PK_Ops::Signatureget_signature_op (const Private_Key &key) const
 
virtual PK_Ops::Verificationget_verify_op (const Public_Key &key) const
 
virtual Modular_Exponentiatormod_exp (const BigInt &n, Power_Mod::Usage_Hints hints) const
 
std::string provider_name () const
 

Detailed Description

Engine for x86-32 specific implementations

Definition at line 18 of file asm_engine.h.

Member Function Documentation

BlockCipher * Botan::Assembler_Engine::find_block_cipher ( const SCAN_Name algo_spec,
Algorithm_Factory af 
) const
virtual
Parameters
algo_specthe algorithm name/specification
afan algorithm factory object
Returns
newly allocated object, or NULL

Reimplemented from Botan::Engine.

Definition at line 33 of file asm_engine.cpp.

References Botan::SCAN_Name::algo_name().

35  {
36  if(request.algo_name() == "Serpent")
37  {
38 #if defined(BOTAN_HAS_SERPENT_X86_32)
39  return new Serpent_X86_32;
40 #endif
41  }
42 
43  return 0;
44  }
HashFunction * Botan::Assembler_Engine::find_hash ( const SCAN_Name algo_spec,
Algorithm_Factory af 
) const
virtual
Parameters
algo_specthe algorithm name/specification
afan algorithm factory object
Returns
newly allocated object, or NULL

Reimplemented from Botan::Engine.

Definition at line 47 of file asm_engine.cpp.

References Botan::SCAN_Name::algo_name().

49  {
50 #if defined(BOTAN_HAS_MD4_X86_32)
51  if(request.algo_name() == "MD4")
52  return new MD4_X86_32;
53 #endif
54 
55 #if defined(BOTAN_HAS_MD5_X86_32)
56  if(request.algo_name() == "MD5")
57  return new MD5_X86_32;
58 #endif
59 
60  if(request.algo_name() == "SHA-160")
61  {
62 #if defined(BOTAN_HAS_SHA1_X86_64)
63  return new SHA_160_X86_64;
64 #elif defined(BOTAN_HAS_SHA1_X86_32)
65  return new SHA_160_X86_32;
66 #endif
67  }
68 
69  return 0;
70  }
MessageAuthenticationCode * Botan::Engine::find_mac ( const SCAN_Name algo_spec,
Algorithm_Factory af 
) const
virtualinherited
Parameters
algo_specthe algorithm name/specification
afan algorithm factory object
Returns
newly allocated object, or NULL

Reimplemented in Botan::Core_Engine, and Botan::Dynamically_Loaded_Engine.

Definition at line 34 of file engine.cpp.

36  {
37  return 0;
38  }
PBKDF * Botan::Engine::find_pbkdf ( const SCAN_Name algo_spec,
Algorithm_Factory af 
) const
virtualinherited
Parameters
algo_specthe algorithm name/specification
afan algorithm factory object
Returns
newly allocated object, or NULL

Reimplemented in Botan::Dynamically_Loaded_Engine, and Botan::Core_Engine.

Definition at line 41 of file engine.cpp.

43  {
44  return 0;
45  }
StreamCipher * Botan::Engine::find_stream_cipher ( const SCAN_Name algo_spec,
Algorithm_Factory af 
) const
virtualinherited
Parameters
algo_specthe algorithm name/specification
afan algorithm factory object
Returns
newly allocated object, or NULL

Reimplemented in Botan::Core_Engine, Botan::OpenSSL_Engine, and Botan::Dynamically_Loaded_Engine.

Definition at line 20 of file engine.cpp.

22  {
23  return 0;
24  }
Keyed_Filter * Botan::Engine::get_cipher ( const std::string &  algo_spec,
Cipher_Dir  dir,
Algorithm_Factory af 
)
virtualinherited

Return a new cipher object

Parameters
algo_specthe algorithm name/specification
dirspecifies if encryption or decryption is desired
afan algorithm factory object
Returns
newly allocated object, or NULL

Reimplemented in Botan::Dynamically_Loaded_Engine, and Botan::Core_Engine.

Definition at line 54 of file engine.cpp.

57  {
58  return 0;
59  }
PK_Ops::Decryption * Botan::Engine::get_decryption_op ( const Private_Key key) const
virtualinherited

Return a new operator object for this key, if possible

Parameters
keythe key we want an operator for
Returns
newly allocated operator object, or NULL

Reimplemented in Botan::Dynamically_Loaded_Engine, Botan::GMP_Engine, Botan::OpenSSL_Engine, and Botan::Core_Engine.

Definition at line 86 of file engine.cpp.

87  {
88  return 0;
89  }
PK_Ops::Encryption * Botan::Engine::get_encryption_op ( const Public_Key key) const
virtualinherited

Return a new operator object for this key, if possible

Parameters
keythe key we want an operator for
Returns
newly allocated operator object, or NULL

Reimplemented in Botan::Dynamically_Loaded_Engine, Botan::GMP_Engine, Botan::OpenSSL_Engine, and Botan::Core_Engine.

Definition at line 80 of file engine.cpp.

81  {
82  return 0;
83  }
PK_Ops::Key_Agreement * Botan::Engine::get_key_agreement_op ( const Private_Key key) const
virtualinherited

Return a new operator object for this key, if possible

Parameters
keythe key we want an operator for
Returns
newly allocated operator object, or NULL

Reimplemented in Botan::Dynamically_Loaded_Engine, Botan::GMP_Engine, Botan::OpenSSL_Engine, and Botan::Core_Engine.

Definition at line 62 of file engine.cpp.

63  {
64  return 0;
65  }
PK_Ops::Signature * Botan::Engine::get_signature_op ( const Private_Key key) const
virtualinherited

Return a new operator object for this key, if possible

Parameters
keythe key we want an operator for
Returns
newly allocated operator object, or NULL

Reimplemented in Botan::Dynamically_Loaded_Engine, Botan::GMP_Engine, Botan::OpenSSL_Engine, and Botan::Core_Engine.

Definition at line 68 of file engine.cpp.

69  {
70  return 0;
71  }
PK_Ops::Verification * Botan::Engine::get_verify_op ( const Public_Key key) const
virtualinherited

Return a new operator object for this key, if possible

Parameters
keythe key we want an operator for
Returns
newly allocated operator object, or NULL

Reimplemented in Botan::Dynamically_Loaded_Engine, Botan::GMP_Engine, Botan::OpenSSL_Engine, and Botan::Core_Engine.

Definition at line 74 of file engine.cpp.

75  {
76  return 0;
77  }
Modular_Exponentiator * Botan::Engine::mod_exp ( const BigInt n,
Power_Mod::Usage_Hints  hints 
) const
virtualinherited
Parameters
nthe modulus
hintsany use hints
Returns
newly allocated object, or NULL

Reimplemented in Botan::Dynamically_Loaded_Engine, Botan::GMP_Engine, Botan::OpenSSL_Engine, and Botan::Core_Engine.

Definition at line 48 of file engine.cpp.

50  {
51  return 0;
52  }
std::string Botan::Assembler_Engine::provider_name ( ) const
inlinevirtual
Returns
name of this engine

Implements Botan::Engine.

Definition at line 21 of file asm_engine.h.

21 { return "asm"; }

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