Skip to content

Commit 5ce37ae

Browse files
committed
Test SHAKE128 variable length output
1 parent f9bd03b commit 5ce37ae

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

test/Jamfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,4 @@ run test_nist_cavs_sha3_224_short_long.cpp ;
9999

100100
run test_nist_cavs_shake128_short_long.cpp ;
101101
run test_nist_cavs_shake128_monte.cpp ;
102+
run test_nist_cavs_shake128_variable_output.cpp ;
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright 2024 Matt Borland
2+
// Copyright 2024 Christopher Kormanyos
3+
// Distributed under the Boost Software License, Version 1.0.
4+
// https://www.boost.org/LICENSE_1_0.txt
5+
6+
#include <boost/crypt/hash/shake128.hpp>
7+
8+
#include "test_nist_cavs_detail.hpp"
9+
10+
auto main() -> int
11+
{
12+
bool result_is_ok { true };
13+
14+
{
15+
nist::cavs::test_vector_container_type my_test_vectors_variable { };
16+
17+
std::vector<std::size_t> lengths {};
18+
static_cast<void>(nist::cavs::detail::parse_file_vectors_variable_xof("SHAKE128VariableOut.rsp", my_test_vectors_variable, lengths));
19+
20+
result_is_ok = (nist::cavs::test_vectors_variable<boost::crypt::shake128_hasher>(my_test_vectors_variable, lengths) && result_is_ok);
21+
22+
BOOST_TEST(result_is_ok);
23+
}
24+
25+
return boost::report_errors();
26+
}

0 commit comments

Comments
 (0)