Botan: Botan::PBKDF Class Reference

Botan 1.10.17

Public Member Functions | List of all members
Botan::PBKDF Class Referenceabstract

`#include <pbkdf.h>`

Inheritance diagram for Botan::PBKDF:

## Public Member Functions
void | clear ()
virtual PBKDF * | clone () const =0
virtual OctetString | derive_key (size_t output_len, const std::string &passphrase, const byte salt[], size_t salt_len, size_t iterations) const =0
virtual std::string | name () const =0

## Detailed Description

Base class for PBKDF (password based key derivation function) implementations. Converts a password into a key using a salt and iterated hashing to make brute force attacks harder.

Definition at line 21 of file pbkdf.h.

## Member Function Documentation

## ◆ clear()

void Botan::PBKDF::clear | ( |  | ) |
| inlinevirtual

Zeroize internal state

Implements Botan::Algorithm.

Definition at line 30 of file pbkdf.h.

30 {}

## ◆ clone()

virtual PBKDF* Botan::PBKDF::clone | ( |  | ) | const
| pure virtual

Returns
  new instance of this same algorithm

Implemented in Botan::PKCS5_PBKDF1, Botan::OpenPGP_S2K, and Botan::PKCS5_PBKDF2.

Referenced by Botan::Algorithm_Factory::make_pbkdf().

## ◆ derive_key()

virtual OctetString Botan::PBKDF::derive_key | ( | size_t | output_len,
|  | const std::string & | passphrase,
|  | const byte | salt[],
|  | size_t | salt_len,
|  | size_t | iterations
| ) |  | const
| pure virtual

Derive a key from a passphrase

Parameters

  output_len | the desired length of the key to produce
  passphrase | the password to derive the key from
  salt | a randomly chosen salt
  salt_len | length of salt in bytes
  iterations | the number of iterations to use (use 10K or more)

Implemented in Botan::PKCS5_PBKDF1, Botan::OpenPGP_S2K, and Botan::PKCS5_PBKDF2.

## ◆ name()

virtual std::string Botan::Algorithm::name | ( |  | ) | const
| pure virtualinherited

Returns
  name of this algorithm

Implemented in Botan::AES_256, Botan::AES_256_NI, Botan::AES_256_SSSE3, Botan::Camellia_256, Botan::GOST_28147_89, Botan::AES_192, Botan::AES_192_NI, Botan::TLS_12_PRF, Botan::AES_192_SSSE3, Botan::TripleDES, Botan::Camellia_192, Botan::SHA_256, Botan::Comb4P, Botan::SHA_512, Botan::MessageAuthenticationCode, Botan::Lion, Botan::PKCS5_PBKDF1, Botan::WiderWake_41_BE, Botan::Skein_512, Botan::Keccak_1600, Botan::CTR_BE, Botan::OFB, Botan::Salsa20, Botan::Cascade_Cipher, Botan::LubyRackoff, Botan::Turing, Botan::RC2, Botan::Blowfish, Botan::OpenPGP_S2K, Botan::AES_128, Botan::AES_128_NI, Botan::TLS_PRF, Botan::KDF1, Botan::AES_128_SSSE3, Botan::Camellia_128, Botan::CAST_128, Botan::CAST_256, Botan::DES, Botan::DESX, Botan::IDEA, Botan::KASUMI, Botan::MARS, Botan::MISTY1, Botan::Noekeon, Botan::SAFER_SK, Botan::SEED, Botan::Serpent, Botan::Skipjack, Botan::Square, Botan::TEA, Botan::Twofish, Botan::XTEA, Botan::KDF2, Botan::ARC4, Botan::SSL3_PRF, Botan::X942_PRF, Botan::Parallel, Botan::HMAC, Botan::ANSI_X919_MAC, Botan::GOST_34_11, Botan::HAS_160, Botan::SHA_224, Botan::CBC_MAC, Botan::CMAC, Botan::SSL3_MAC, Botan::PKCS5_PBKDF2, Botan::Adler32, Botan::CRC24, Botan::CRC32, Botan::BMW_512, Botan::MD2, Botan::MD4, Botan::MD5, Botan::RIPEMD_128, Botan::RIPEMD_160, Botan::SHA_160, Botan::SHA_384, Botan::Tiger, and Botan::Whirlpool.

Referenced by Botan::Algorithm_Factory::add_block_cipher(), Botan::Algorithm_Factory::add_hash_function(), Botan::Algorithm_Factory::add_pbkdf(), Botan::Algorithm_Factory::add_stream_cipher(), Botan::CMAC::CMAC(), Botan::Comb4P::Comb4P(), Botan::EMSA2::EMSA2(), Botan::EMSA3::EMSA3(), Botan::HMAC::HMAC(), Botan::SSL3_MAC::name(), Botan::CBC_MAC::name(), Botan::CMAC::name(), Botan::HMAC::name(), Botan::PBE_PKCS5v15::name(), Botan::CBC_Encryption::name(), Botan::ECB_Encryption::name(), Botan::ANSI_X931_RNG::name(), Botan::Randpool::name(), Botan::PBE_PKCS5v20::name(), Botan::Cascade_Cipher::name(), Botan::LubyRackoff::name(), Botan::OFB::name(), Botan::CTR_BE::name(), Botan::Lion::name(), Botan::ECB_Decryption::name(), Botan::CBC_Decryption::name(), Botan::PBE_PKCS5v15::PBE_PKCS5v15(), Botan::PBE_PKCS5v20::PBE_PKCS5v20(), Botan::StreamCipher::set_iv(), and Botan::SSL3_MAC::SSL3_MAC().

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

- src/pbkdf/pbkdf.h