Botan 2.19.1
Crypto and TLS for C&
|
#include <bcrypt_pbkdf.h>
Public Member Functions | |
Bcrypt_PBKDF_Family () | |
std::unique_ptr< PasswordHash > | default_params () const override |
std::unique_ptr< PasswordHash > | from_iterations (size_t iter) const override |
std::unique_ptr< PasswordHash > | from_params (size_t i, size_t, size_t) const override |
std::string | name () const override |
std::unique_ptr< PasswordHash > | tune (size_t output_length, std::chrono::milliseconds msec, size_t max_memory) const override |
Static Public Member Functions | |
static std::unique_ptr< PasswordHashFamily > | create (const std::string &algo_spec, const std::string &provider="") |
static std::unique_ptr< PasswordHashFamily > | create_or_throw (const std::string &algo_spec, const std::string &provider="") |
static std::vector< std::string > | providers (const std::string &algo_spec) |
Definition at line 48 of file bcrypt_pbkdf.h.
|
inline |
Definition at line 51 of file bcrypt_pbkdf.h.
|
staticinherited |
Create an instance based on a name If provider is empty then best available is chosen.
algo_spec | algorithm name |
provider | provider implementation to choose |
Definition at line 33 of file pwdhash.cpp.
References Botan::SCAN_Name::algo_name(), Botan::SCAN_Name::arg(), Botan::SCAN_Name::arg_count(), BOTAN_UNUSED, Botan::HashFunction::create(), Botan::MessageAuthenticationCode::create(), and hash.
Referenced by botan_pwdhash(), botan_pwdhash_timed(), and Botan::PasswordHashFamily::create_or_throw().
|
staticinherited |
Create an instance based on a name, or throw if the algo/provider combination cannot be found. If provider is empty then best available is chosen.
Definition at line 103 of file pwdhash.cpp.
References Botan::PasswordHashFamily::create().
|
overridevirtual |
Return some default parameter set for this PBKDF that should be good enough for most users. The value returned may change over time as processing power and attacks improve.
Implements Botan::PasswordHashFamily.
Definition at line 69 of file bcrypt_pbkdf.cpp.
References from_iterations().
Referenced by tune().
|
overridevirtual |
Return a parameter chosen based on a rough approximation with the specified iteration count. The exact value this returns for a particular algorithm may change from over time. Think of it as an alternative to tune, where time is expressed in terms of PBKDF2 iterations rather than milliseconds.
Implements Botan::PasswordHashFamily.
Definition at line 74 of file bcrypt_pbkdf.cpp.
Referenced by default_params(), from_params(), and tune().
|
overridevirtual |
Create a password hash using some scheme specific format. Eg PBKDF2 and PGP-S2K set iterations in i1 Scrypt uses N,r,p in i{1-3} Bcrypt-PBKDF just has iterations Argon2{i,d,id} would use iterations, memory, parallelism for i{1-3}, and Argon2 type is part of the family.
Values not needed should be set to 0
Implements Botan::PasswordHashFamily.
Definition at line 79 of file bcrypt_pbkdf.cpp.
References from_iterations().
|
overridevirtual |
Implements Botan::PasswordHashFamily.
Definition at line 30 of file bcrypt_pbkdf.cpp.
|
staticinherited |
Definition at line 113 of file pwdhash.cpp.
|
overridevirtual |
Return a new parameter set tuned for this machine
output_length | how long the output length will be |
msec | the desired execution time in milliseconds |
max_memory_usage_mb | some password hash functions can use a tunable amount of memory, in this case max_memory_usage limits the amount of RAM the returned parameters will require, in mebibytes (2**20 bytes). It may require some small amount above the request. Set to zero to place no limit at all. |
Implements Botan::PasswordHashFamily.
Definition at line 35 of file bcrypt_pbkdf.cpp.
References Botan::bcrypt_pbkdf(), default_params(), Botan::Timer::events(), from_iterations(), Botan::Timer::run_until_elapsed(), and Botan::Timer::value().