Skip to content

Commit

Permalink
bench_c2: initialize values correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastinas committed Jul 11, 2023
1 parent 056a12d commit 6b40949
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/bench_c2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ TEST_CASE("bench sign", "[.][bench]") {
const std::string message =
"This document describes and specifies the FAEST digital signature algorithm.";
std::vector<unsigned char> signed_message(CRYPTO_BYTES + message.size());
unsigned long long signed_message_len;
unsigned long long signed_message_len = CRYPTO_BYTES + message.size();

BENCHMARK("sign") {
return crypto_sign(signed_message.data(), &signed_message_len,
Expand All @@ -44,11 +44,11 @@ TEST_CASE("bench verify", "[.][bench]") {
const std::string message =
"This document describes and specifies the FAEST digital signature algorithm.";
std::vector<unsigned char> signed_message(CRYPTO_BYTES + message.size());
unsigned long long signed_message_len;
unsigned long long signed_message_len = CRYPTO_BYTES + message.size();
crypto_sign(signed_message.data(), &signed_message_len,
reinterpret_cast<const unsigned char*>(message.data()), message.size(), sk.data());
std::vector<unsigned char> opened_message(message.size());
unsigned long long opened_message_len;
unsigned long long opened_message_len = message.size();

BENCHMARK("verify") {
return crypto_sign_open(opened_message.data(), &opened_message_len, signed_message.data(),
Expand Down

0 comments on commit 6b40949

Please sign in to comment.