Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions include/boost/crypt2/drbg/sha224_drbg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#define BOOST_CRYPT2_DRBG_SHA224_DRBG_HPP

#include <boost/crypt2/drbg/detail/hash_drbg.hpp>
#include <boost/crypt2/drbg/detail/hmac_drbg.hpp>
#include <boost/crypt2/mac/hmac.hpp>
#include <boost/crypt2/hash/sha224.hpp>

namespace boost::crypt {
Expand All @@ -15,11 +17,17 @@ namespace drbg_detail {
template <bool prediction_resistance>
using sha224_hash_drbg_t = hash_drbg<sha224_hasher, 192U, 224U, prediction_resistance>;

template <bool prediction_resistance>
using sha224_hmac_drbg_t = hmac_drbg<hmac<sha224_hasher>, 192U, 224U, prediction_resistance>;

} // namespace drbg_detail

BOOST_CRYPT_EXPORT using sha224_hash_drbg = drbg_detail::sha224_hash_drbg_t<false>;
BOOST_CRYPT_EXPORT using sha224_hash_drbg_pr = drbg_detail::sha224_hash_drbg_t<true>;

BOOST_CRYPT_EXPORT using sha224_hmac_drbg = drbg_detail::sha224_hmac_drbg_t<false>;
BOOST_CRYPT_EXPORT using sha224_hmac_drbg_pr = drbg_detail::sha224_hmac_drbg_t<true>;

} // namespace boost::crypt

#endif // BOOST_CRYPT2_DRBG_SHA224_DRBG_HPP
8 changes: 8 additions & 0 deletions include/boost/crypt2/drbg/sha256_drbg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#define BOOST_CRYPT2_DRBG_SHA256_DRBG_HPP

#include <boost/crypt2/drbg/detail/hash_drbg.hpp>
#include <boost/crypt2/drbg/detail/hmac_drbg.hpp>
#include <boost/crypt2/mac/hmac.hpp>
#include <boost/crypt2/hash/sha256.hpp>

namespace boost::crypt {
Expand All @@ -15,11 +17,17 @@ namespace drbg_detail {
template <bool prediction_resistance>
using sha256_hash_drbg_t = hash_drbg<sha256_hasher, 256U, 256U, prediction_resistance>;

template <bool prediction_resistance>
using sha256_hmac_drbg_t = hmac_drbg<hmac<sha256_hasher>, 256U, 256U, prediction_resistance>;

} // namespace drbg_detail

BOOST_CRYPT_EXPORT using sha256_hash_drbg = drbg_detail::sha256_hash_drbg_t<false>;
BOOST_CRYPT_EXPORT using sha256_hash_drbg_pr = drbg_detail::sha256_hash_drbg_t<true>;

BOOST_CRYPT_EXPORT using sha256_hmac_drbg = drbg_detail::sha256_hmac_drbg_t<false>;
BOOST_CRYPT_EXPORT using sha256_hmac_drbg_pr = drbg_detail::sha256_hmac_drbg_t<true>;

} // namespace boost::crypt

#endif // BOOST_CRYPT2_DRBG_SHA256_DRBG_HPP
8 changes: 8 additions & 0 deletions include/boost/crypt2/drbg/sha384_drbg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#define BOOST_CRYPT2_DRBG_SHA384_DRBG_HPP

#include <boost/crypt2/drbg/detail/hash_drbg.hpp>
#include <boost/crypt2/drbg/detail/hmac_drbg.hpp>
#include <boost/crypt2/mac/hmac.hpp>
#include <boost/crypt2/hash/sha384.hpp>

namespace boost::crypt {
Expand All @@ -15,11 +17,17 @@ namespace drbg_detail {
template <bool prediction_resistance>
using sha384_hash_drbg_t = hash_drbg<sha384_hasher, 256U, 384U, prediction_resistance>;

template <bool prediction_resistance>
using sha384_hmac_drbg_t = hmac_drbg<hmac<sha384_hasher>, 256U, 384U, prediction_resistance>;

} // namespace drbg_detail

BOOST_CRYPT_EXPORT using sha384_hash_drbg = drbg_detail::sha384_hash_drbg_t<false>;
BOOST_CRYPT_EXPORT using sha384_hash_drbg_pr = drbg_detail::sha384_hash_drbg_t<true>;

BOOST_CRYPT_EXPORT using sha384_hmac_drbg = drbg_detail::sha384_hmac_drbg_t<false>;
BOOST_CRYPT_EXPORT using sha384_hmac_drbg_pr = drbg_detail::sha384_hmac_drbg_t<true>;

} // namespace boost::crypt

#endif // BOOST_CRYPT2_DRBG_SHA384_DRBG_HPP
8 changes: 8 additions & 0 deletions include/boost/crypt2/drbg/sha3_224_drbg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#define BOOST_CRYPT2_DRBG_SHA3_224_DRBG_HPP

#include <boost/crypt2/drbg/detail/hash_drbg.hpp>
#include <boost/crypt2/drbg/detail/hmac_drbg.hpp>
#include <boost/crypt2/mac/hmac.hpp>
#include <boost/crypt2/hash/sha3_224.hpp>

namespace boost::crypt {
Expand All @@ -15,11 +17,17 @@ namespace drbg_detail {
template <bool prediction_resistance>
using sha3_224_hash_drbg_t = hash_drbg<sha3_224_hasher, 192U, 224U, prediction_resistance>;

template <bool prediction_resistance>
using sha3_224_hmac_drbg_t = hmac_drbg<hmac<sha3_224_hasher>, 192U, 224U, prediction_resistance>;

} // namespace drbg_detail

BOOST_CRYPT_EXPORT using sha3_224_hash_drbg = drbg_detail::sha3_224_hash_drbg_t<false>;
BOOST_CRYPT_EXPORT using sha3_224_hash_drbg_pr = drbg_detail::sha3_224_hash_drbg_t<true>;

BOOST_CRYPT_EXPORT using sha3_224_hmac_drbg = drbg_detail::sha3_224_hmac_drbg_t<false>;
BOOST_CRYPT_EXPORT using sha3_224_hmac_drbg_pr = drbg_detail::sha3_224_hmac_drbg_t<true>;

} // namespace boost::crypt

#endif // BOOST_CRYPT_DRBG_SHA3_224_DRBG_HPP
8 changes: 8 additions & 0 deletions include/boost/crypt2/drbg/sha3_256_drbg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#define BOOST_CRYPT2_DRBG_SHA3_256_DRBG_HPP

#include <boost/crypt2/drbg/detail/hash_drbg.hpp>
#include <boost/crypt2/drbg/detail/hmac_drbg.hpp>
#include <boost/crypt2/mac/hmac.hpp>
#include <boost/crypt2/hash/sha3_256.hpp>

namespace boost::crypt {
Expand All @@ -15,11 +17,17 @@ namespace drbg_detail {
template <bool prediction_resistance>
using sha3_256_hash_drbg_t = hash_drbg<sha3_256_hasher, 256U, 256U, prediction_resistance>;

template <bool prediction_resistance>
using sha3_256_hmac_drbg_t = hmac_drbg<hmac<sha3_256_hasher>, 256U, 256U, prediction_resistance>;

} // namespace drbg_detail

BOOST_CRYPT_EXPORT using sha3_256_hash_drbg = drbg_detail::sha3_256_hash_drbg_t<false>;
BOOST_CRYPT_EXPORT using sha3_256_hash_drbg_pr = drbg_detail::sha3_256_hash_drbg_t<true>;

BOOST_CRYPT_EXPORT using sha3_256_hmac_drbg = drbg_detail::sha3_256_hmac_drbg_t<false>;
BOOST_CRYPT_EXPORT using sha3_256_hmac_drbg_pr = drbg_detail::sha3_256_hmac_drbg_t<true>;

} // namespace boost::crypt

#endif // BOOST_CRYPT_DRBG_SHA3_256_DRBG_HPP
8 changes: 8 additions & 0 deletions include/boost/crypt2/drbg/sha3_384_drbg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#define BOOST_CRYPT2_DRBG_SHA3_384_DRBG_HPP

#include <boost/crypt2/drbg/detail/hash_drbg.hpp>
#include <boost/crypt2/drbg/detail/hmac_drbg.hpp>
#include <boost/crypt2/mac/hmac.hpp>
#include <boost/crypt2/hash/sha3_384.hpp>

namespace boost::crypt {
Expand All @@ -15,11 +17,17 @@ namespace drbg_detail {
template <bool prediction_resistance>
using sha3_384_hash_drbg_t = hash_drbg<sha3_384_hasher, 256U, 384U, prediction_resistance>;

template <bool prediction_resistance>
using sha3_384_hmac_drbg_t = hmac_drbg<hmac<sha3_384_hasher>, 256U, 384U, prediction_resistance>;

} // namespace drbg_detail

BOOST_CRYPT_EXPORT using sha3_384_hash_drbg = drbg_detail::sha3_384_hash_drbg_t<false>;
BOOST_CRYPT_EXPORT using sha3_384_hash_drbg_pr = drbg_detail::sha3_384_hash_drbg_t<true>;

BOOST_CRYPT_EXPORT using sha3_384_hmac_drbg = drbg_detail::sha3_384_hmac_drbg_t<false>;
BOOST_CRYPT_EXPORT using sha3_384_hmac_drbg_pr = drbg_detail::sha3_384_hmac_drbg_t<true>;

} // namespace boost::crypt

#endif // BOOST_CRYPT_DRBG_SHA3_384_DRBG_HPP
8 changes: 8 additions & 0 deletions include/boost/crypt2/drbg/sha3_512_drbg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#define BOOST_CRYPT2_DRBG_SHA3_512_DRBG_HPP

#include <boost/crypt2/drbg/detail/hash_drbg.hpp>
#include <boost/crypt2/drbg/detail/hmac_drbg.hpp>
#include <boost/crypt2/mac/hmac.hpp>
#include <boost/crypt2/hash/sha3_512.hpp>

namespace boost::crypt {
Expand All @@ -15,11 +17,17 @@ namespace drbg_detail {
template <bool prediction_resistance>
using sha3_512_hash_drbg_t = hash_drbg<sha3_512_hasher, 256U, 512U, prediction_resistance>;

template <bool prediction_resistance>
using sha3_512_hmac_drbg_t = hmac_drbg<hmac<sha3_512_hasher>, 256U, 512U, prediction_resistance>;

} // namespace drbg_detail

BOOST_CRYPT_EXPORT using sha3_512_hash_drbg = drbg_detail::sha3_512_hash_drbg_t<false>;
BOOST_CRYPT_EXPORT using sha3_512_hash_drbg_pr = drbg_detail::sha3_512_hash_drbg_t<true>;

BOOST_CRYPT_EXPORT using sha3_512_hmac_drbg = drbg_detail::sha3_512_hmac_drbg_t<false>;
BOOST_CRYPT_EXPORT using sha3_512_hmac_drbg_pr = drbg_detail::sha3_512_hmac_drbg_t<true>;

} // namespace boost::crypt

#endif // BOOST_CRYPT_DRBG_SHA3_512_DRBG_HPP
8 changes: 8 additions & 0 deletions include/boost/crypt2/drbg/sha512_224_drbg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#define BOOST_CRYPT2_DRBG_SHA512_224_DRBG_HPP

#include <boost/crypt2/drbg/detail/hash_drbg.hpp>
#include <boost/crypt2/drbg/detail/hmac_drbg.hpp>
#include <boost/crypt2/mac/hmac.hpp>
#include <boost/crypt2/hash/sha512_224.hpp>

namespace boost::crypt {
Expand All @@ -15,11 +17,17 @@ namespace drbg_detail {
template <bool prediction_resistance>
using sha512_224_hash_drbg_t = hash_drbg<sha512_224_hasher, 192U, 224U, prediction_resistance>;

template <bool prediction_resistance>
using sha512_224_hmac_drbg_t = hmac_drbg<hmac<sha512_224_hasher>, 192U, 224U, prediction_resistance>;

} // namespace drbg_detail

BOOST_CRYPT_EXPORT using sha512_224_hash_drbg = drbg_detail::sha512_224_hash_drbg_t<false>;
BOOST_CRYPT_EXPORT using sha512_224_hash_drbg_pr = drbg_detail::sha512_224_hash_drbg_t<true>;

BOOST_CRYPT_EXPORT using sha512_224_hmac_drbg = drbg_detail::sha512_224_hmac_drbg_t<false>;
BOOST_CRYPT_EXPORT using sha512_224_hmac_drbg_pr = drbg_detail::sha512_224_hmac_drbg_t<true>;

} // namespace boost::crypt

#endif // BOOST_CRYPT2_DRBG_SHA512_224_DRBG_HPP
8 changes: 8 additions & 0 deletions include/boost/crypt2/drbg/sha512_256_drbg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#define BOOST_CRYPT2_DRBG_SHA512_256_DRBG_HPP

#include <boost/crypt2/drbg/detail/hash_drbg.hpp>
#include <boost/crypt2/drbg/detail/hmac_drbg.hpp>
#include <boost/crypt2/mac/hmac.hpp>
#include <boost/crypt2/hash/sha512_256.hpp>

namespace boost::crypt {
Expand All @@ -15,11 +17,17 @@ namespace drbg_detail {
template <bool prediction_resistance>
using sha512_256_hash_drbg_t = hash_drbg<sha512_256_hasher, 256U, 256U, prediction_resistance>;

template <bool prediction_resistance>
using sha512_256_hmac_drbg_t = hmac_drbg<hmac<sha512_256_hasher>, 256U, 256U, prediction_resistance>;

} // namespace drbg_detail

BOOST_CRYPT_EXPORT using sha512_256_hash_drbg = drbg_detail::sha512_256_hash_drbg_t<false>;
BOOST_CRYPT_EXPORT using sha512_256_hash_drbg_pr = drbg_detail::sha512_256_hash_drbg_t<true>;

BOOST_CRYPT_EXPORT using sha512_256_hmac_drbg = drbg_detail::sha512_256_hmac_drbg_t<false>;
BOOST_CRYPT_EXPORT using sha512_256_hmac_drbg_pr = drbg_detail::sha512_256_hmac_drbg_t<true>;

} // namespace boost::crypt

#endif // BOOST_CRYPT2_DRBG_SHA512_256_DRBG_HPP
8 changes: 8 additions & 0 deletions include/boost/crypt2/drbg/sha512_drbg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#define BOOST_CRYPT2_DRBG_SHA512_DRBG_HPP

#include <boost/crypt2/drbg/detail/hash_drbg.hpp>
#include <boost/crypt2/drbg/detail/hmac_drbg.hpp>
#include <boost/crypt2/mac/hmac.hpp>
#include <boost/crypt2/hash/sha512.hpp>

namespace boost::crypt {
Expand All @@ -15,11 +17,17 @@ namespace drbg_detail {
template <bool prediction_resistance>
using sha512_hash_drbg_t = hash_drbg<sha512_hasher, 256U, 512U, prediction_resistance>;

template <bool prediction_resistance>
using sha512_hmac_drbg_t = hmac_drbg<hmac<sha512_hasher>, 256U, 512U, prediction_resistance>;

} // namespace drbg_detail

BOOST_CRYPT_EXPORT using sha512_hash_drbg = drbg_detail::sha512_hash_drbg_t<false>;
BOOST_CRYPT_EXPORT using sha512_hash_drbg_pr = drbg_detail::sha512_hash_drbg_t<true>;

BOOST_CRYPT_EXPORT using sha512_hmac_drbg = drbg_detail::sha512_hmac_drbg_t<false>;
BOOST_CRYPT_EXPORT using sha512_hmac_drbg_pr = drbg_detail::sha512_hmac_drbg_t<true>;

} // namespace boost::crypt

#endif // BOOST_CRYPT2_DRBG_SHA512_DRBG_HPP
14 changes: 7 additions & 7 deletions test/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,43 +87,43 @@ run test_hash_drbg.cpp ;
run test_nist_cavs_sha1_monte.cpp ;
run test_nist_cavs_sha1_short_long.cpp ;
run test_nist_cavs_sha1_hmac.cpp ;
#run test_nist_cavs_sha1_hmac_drbg.cpp ;
run test_nist_cavs_sha1_hmac_drbg.cpp ;
run test_nist_cavs_sha1_hash_drbg.cpp ;

run test_nist_cavs_sha224_monte.cpp ;
run test_nist_cavs_sha224_short_long.cpp ;
run test_nist_cavs_sha224_hmac.cpp ;
#run test_nist_cavs_sha224_hmac_drbg.cpp ;
run test_nist_cavs_sha224_hmac_drbg.cpp ;
run test_nist_cavs_sha224_hash_drbg.cpp ;

run test_nist_cavs_sha256_monte.cpp ;
run test_nist_cavs_sha256_short_long.cpp ;
run test_nist_cavs_sha256_hmac.cpp ;
#run test_nist_cavs_sha256_hmac_drbg.cpp ;
run test_nist_cavs_sha256_hmac_drbg.cpp ;
run test_nist_cavs_sha256_hash_drbg.cpp ;

run test_nist_cavs_sha384_monte.cpp ;
run test_nist_cavs_sha384_short_long.cpp ;
run test_nist_cavs_sha384_hmac.cpp ;
#run test_nist_cavs_sha384_hmac_drbg.cpp ;
run test_nist_cavs_sha384_hmac_drbg.cpp ;
run test_nist_cavs_sha384_hash_drbg.cpp ;

run test_nist_cavs_sha512_monte.cpp ;
run test_nist_cavs_sha512_short_long.cpp ;
run test_nist_cavs_sha512_hmac.cpp ;
#run test_nist_cavs_sha512_hmac_drbg.cpp ;
run test_nist_cavs_sha512_hmac_drbg.cpp ;
run test_nist_cavs_sha512_hash_drbg.cpp ;

run test_nist_cavs_sha512_224_monte.cpp ;
run test_nist_cavs_sha512_224_short_long.cpp ;
run test_nist_cavs_sha512_224_hmac.cpp ;
#run test_nist_cavs_sha512_224_hmac_drbg.cpp ;
run test_nist_cavs_sha512_224_hmac_drbg.cpp ;
run test_nist_cavs_sha512_224_hash_drbg.cpp ;

run test_nist_cavs_sha512_256_monte.cpp ;
run test_nist_cavs_sha512_256_short_long.cpp ;
run test_nist_cavs_sha512_256_hmac.cpp ;
#run test_nist_cavs_sha512_256_hmac_drbg.cpp ;
run test_nist_cavs_sha512_256_hmac_drbg.cpp ;
run test_nist_cavs_sha512_256_hash_drbg.cpp ;

run test_nist_cavs_sha3_512_monte.cpp ;
Expand Down
2 changes: 1 addition & 1 deletion test/test_nist_cavs_sha1_hmac_drbg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#include <boost/crypt/drbg/sha1_drbg.hpp>
#include <boost/crypt2/drbg/sha1_drbg.hpp>
#include "test_nist_cavs_detail.hpp"

auto main() -> int
Expand Down
2 changes: 1 addition & 1 deletion test/test_nist_cavs_sha224_hmac_drbg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#include <boost/crypt/drbg/sha224_drbg.hpp>
#include <boost/crypt2/drbg/sha224_drbg.hpp>
#include "test_nist_cavs_detail.hpp"

auto main() -> int
Expand Down
2 changes: 1 addition & 1 deletion test/test_nist_cavs_sha256_hmac_drbg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#include <boost/crypt/drbg/sha256_drbg.hpp>
#include <boost/crypt2/drbg/sha256_drbg.hpp>
#include "test_nist_cavs_detail.hpp"

auto main() -> int
Expand Down
2 changes: 1 addition & 1 deletion test/test_nist_cavs_sha384_hmac_drbg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#include <boost/crypt/drbg/sha384_drbg.hpp>
#include <boost/crypt2/drbg/sha384_drbg.hpp>
#include "test_nist_cavs_detail.hpp"

auto main() -> int
Expand Down
2 changes: 1 addition & 1 deletion test/test_nist_cavs_sha512_224_hmac_drbg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#include <boost/crypt/drbg/sha512_224_drbg.hpp>
#include <boost/crypt2/drbg/sha512_224_drbg.hpp>
#include "test_nist_cavs_detail.hpp"

auto main() -> int
Expand Down
2 changes: 1 addition & 1 deletion test/test_nist_cavs_sha512_256_hmac_drbg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#include <boost/crypt/drbg/sha512_256_drbg.hpp>
#include <boost/crypt2/drbg/sha512_256_drbg.hpp>
#include "test_nist_cavs_detail.hpp"

auto main() -> int
Expand Down
2 changes: 1 addition & 1 deletion test/test_nist_cavs_sha512_hmac_drbg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#include <boost/crypt/drbg/sha512_drbg.hpp>
#include <boost/crypt2/drbg/sha512_drbg.hpp>
#include "test_nist_cavs_detail.hpp"

auto main() -> int
Expand Down