diff options
Diffstat (limited to 'src/lib/pbkdf')
-rw-r--r-- | src/lib/pbkdf/argon2/argon2.cpp | 27 | ||||
-rw-r--r-- | src/lib/pbkdf/argon2/argon2.h | 2 | ||||
-rw-r--r-- | src/lib/pbkdf/bcrypt_pbkdf/bcrypt_pbkdf.cpp | 1 | ||||
-rw-r--r-- | src/lib/pbkdf/bcrypt_pbkdf/bcrypt_pbkdf.h | 2 | ||||
-rw-r--r-- | src/lib/pbkdf/pbkdf1/pbkdf1.h | 2 | ||||
-rw-r--r-- | src/lib/pbkdf/pbkdf2/pbkdf2.h | 2 | ||||
-rw-r--r-- | src/lib/pbkdf/pgp_s2k/pgp_s2k.h | 8 | ||||
-rw-r--r-- | src/lib/pbkdf/scrypt/scrypt.h | 2 |
8 files changed, 33 insertions, 13 deletions
diff --git a/src/lib/pbkdf/argon2/argon2.cpp b/src/lib/pbkdf/argon2/argon2.cpp index 05b1e9c48..0d767e04e 100644 --- a/src/lib/pbkdf/argon2/argon2.cpp +++ b/src/lib/pbkdf/argon2/argon2.cpp @@ -5,6 +5,7 @@ */ #include <botan/argon2.h> +#include <botan/loadstor.h> #include <botan/hash.h> #include <botan/mem_ops.h> #include <botan/rotate.h> @@ -26,23 +27,23 @@ secure_vector<uint8_t> argon2_H0(HashFunction& blake2b, { const uint8_t v = 19; // Argon2 version code - blake2b.update_le<uint32_t>(static_cast<uint32_t>(p)); - blake2b.update_le<uint32_t>(static_cast<uint32_t>(output_len)); - blake2b.update_le<uint32_t>(static_cast<uint32_t>(M)); - blake2b.update_le<uint32_t>(static_cast<uint32_t>(t)); - blake2b.update_le<uint32_t>(static_cast<uint32_t>(v)); - blake2b.update_le<uint32_t>(static_cast<uint32_t>(y)); + blake2b.update_le(static_cast<uint32_t>(p)); + blake2b.update_le(static_cast<uint32_t>(output_len)); + blake2b.update_le(static_cast<uint32_t>(M)); + blake2b.update_le(static_cast<uint32_t>(t)); + blake2b.update_le(static_cast<uint32_t>(v)); + blake2b.update_le(static_cast<uint32_t>(y)); - blake2b.update_le<uint32_t>(static_cast<uint32_t>(password_len)); + blake2b.update_le(static_cast<uint32_t>(password_len)); blake2b.update(cast_char_ptr_to_uint8(password), password_len); - blake2b.update_le<uint32_t>(static_cast<uint32_t>(salt_len)); + blake2b.update_le(static_cast<uint32_t>(salt_len)); blake2b.update(salt, salt_len); - blake2b.update_le<uint32_t>(static_cast<uint32_t>(key_len)); + blake2b.update_le(static_cast<uint32_t>(key_len)); blake2b.update(key, key_len); - blake2b.update_le<uint32_t>(static_cast<uint32_t>(ad_len)); + blake2b.update_le(static_cast<uint32_t>(ad_len)); blake2b.update(ad, ad_len); return blake2b.final(); @@ -57,10 +58,10 @@ void Htick(secure_vector<uint8_t>& T, { BOTAN_ASSERT_NOMSG(output_len % 64 == 0); - blake2b.update_le<uint32_t>(static_cast<uint32_t>(output_len)); + blake2b.update_le(static_cast<uint32_t>(output_len)); blake2b.update(H0); - blake2b.update_le<uint32_t>(static_cast<uint32_t>(p0)); - blake2b.update_le<uint32_t>(static_cast<uint32_t>(p1)); + blake2b.update_le(static_cast<uint32_t>(p0)); + blake2b.update_le(static_cast<uint32_t>(p1)); blake2b.final(&T[0]); diff --git a/src/lib/pbkdf/argon2/argon2.h b/src/lib/pbkdf/argon2/argon2.h index a6fa03314..468a44f94 100644 --- a/src/lib/pbkdf/argon2/argon2.h +++ b/src/lib/pbkdf/argon2/argon2.h @@ -11,6 +11,8 @@ namespace Botan { +BOTAN_FUTURE_INTERNAL_HEADER(argon2.h) + class RandomNumberGenerator; /** diff --git a/src/lib/pbkdf/bcrypt_pbkdf/bcrypt_pbkdf.cpp b/src/lib/pbkdf/bcrypt_pbkdf/bcrypt_pbkdf.cpp index 36501b4cb..2f2c77025 100644 --- a/src/lib/pbkdf/bcrypt_pbkdf/bcrypt_pbkdf.cpp +++ b/src/lib/pbkdf/bcrypt_pbkdf/bcrypt_pbkdf.cpp @@ -5,6 +5,7 @@ */ #include <botan/bcrypt_pbkdf.h> +#include <botan/loadstor.h> #include <botan/blowfish.h> #include <botan/hash.h> #include <botan/internal/timer.h> diff --git a/src/lib/pbkdf/bcrypt_pbkdf/bcrypt_pbkdf.h b/src/lib/pbkdf/bcrypt_pbkdf/bcrypt_pbkdf.h index 5f0f9e80f..0d459e8db 100644 --- a/src/lib/pbkdf/bcrypt_pbkdf/bcrypt_pbkdf.h +++ b/src/lib/pbkdf/bcrypt_pbkdf/bcrypt_pbkdf.h @@ -9,6 +9,8 @@ #include <botan/pwdhash.h> +BOTAN_FUTURE_INTERNAL_HEADER(bcrypt_pbkdf.h) + namespace Botan { /** diff --git a/src/lib/pbkdf/pbkdf1/pbkdf1.h b/src/lib/pbkdf/pbkdf1/pbkdf1.h index 74b2644f6..f5e95b836 100644 --- a/src/lib/pbkdf/pbkdf1/pbkdf1.h +++ b/src/lib/pbkdf/pbkdf1/pbkdf1.h @@ -11,6 +11,8 @@ #include <botan/pbkdf.h> #include <botan/hash.h> +BOTAN_FUTURE_INTERNAL_HEADER(pbkdf1.h) + namespace Botan { /** diff --git a/src/lib/pbkdf/pbkdf2/pbkdf2.h b/src/lib/pbkdf/pbkdf2/pbkdf2.h index 65955eb28..9f90799c4 100644 --- a/src/lib/pbkdf/pbkdf2/pbkdf2.h +++ b/src/lib/pbkdf/pbkdf2/pbkdf2.h @@ -13,6 +13,8 @@ #include <botan/pwdhash.h> #include <botan/mac.h> +BOTAN_FUTURE_INTERNAL_HEADER(pbkdf2.h) + namespace Botan { BOTAN_PUBLIC_API(2,0) size_t pbkdf2(MessageAuthenticationCode& prf, diff --git a/src/lib/pbkdf/pgp_s2k/pgp_s2k.h b/src/lib/pbkdf/pgp_s2k/pgp_s2k.h index 4ce934a2b..7fda724c2 100644 --- a/src/lib/pbkdf/pgp_s2k/pgp_s2k.h +++ b/src/lib/pbkdf/pgp_s2k/pgp_s2k.h @@ -13,6 +13,14 @@ #include <botan/pwdhash.h> #include <botan/hash.h> +/* +This header will not be fully internal - the RFC4880 count +encoding functions will remain here. But the definition of +OpenPGP_S2K will be made internal +*/ + +//BOTAN_FUTURE_INTERNAL_HEADER(pgp_s2k.h) + namespace Botan { /** diff --git a/src/lib/pbkdf/scrypt/scrypt.h b/src/lib/pbkdf/scrypt/scrypt.h index 83a3b0cca..1af59b6a5 100644 --- a/src/lib/pbkdf/scrypt/scrypt.h +++ b/src/lib/pbkdf/scrypt/scrypt.h @@ -10,6 +10,8 @@ #include <botan/pwdhash.h> +BOTAN_FUTURE_INTERNAL_HEADER(scrypt.h) + namespace Botan { /** |