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
4 changes: 2 additions & 2 deletions test/box_sodium_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ static_assert(sealed_box::overhead == 48);
// smaller, 2^32 - 17, as the Doc Comment says.
static_assert(box::max_message_size == ~std::uint64_t{0} - 16 &&
box_xchacha::max_message_size == box::max_message_size);
static_assert(sizeof(std::size_t) == 8 ? box::max_message_size == crypto_box_MESSAGEBYTES_MAX
: crypto_box_MESSAGEBYTES_MAX == 0xffffffffU - 16);
static_assert(sizeof(std::size_t) != 8 || box::max_message_size == crypto_box_MESSAGEBYTES_MAX);
static_assert(sizeof(std::size_t) == 8 || crypto_box_MESSAGEBYTES_MAX == 0xffffffffU - 16);
// Move-only: the precomputed key has one owner, which wipes it.
static_assert(!std::is_copy_constructible_v<box> && !std::is_copy_assignable_v<box>);
static_assert(std::is_nothrow_move_constructible_v<box> && std::is_nothrow_move_assignable_v<box>);
Expand Down
9 changes: 6 additions & 3 deletions test/constant_time/paths.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,10 @@ int secp256k1_musig() {
int const failures =
check(carries_mark<Checker>(bytes_of(own_nonce->secret_part)), "secp256k1's nonce_gen");
Checker::mark_public(bytes_of(own_nonce->public_part));
std::array<musig::public_nonce, 2> const nonces{own_nonce->public_part,
other_nonce->public_part};
std::array<musig::public_nonce, 2> const nonces{
own_nonce->public_part,
other_nonce->public_part,
};
auto const nonce_sum = musig::nonce_aggregate<backend>(nonces, space);
if (!nonce_sum) {
return failures + check(false, "secp256k1's nonce_aggregate");
Expand Down Expand Up @@ -567,7 +569,8 @@ int secp256k1_silent_payments() {
return check(false, "secp256k1's public keys for silent payments");
}
std::array<silent_payments::recipient, 1> const recipients{
silent_payments::recipient{.scan_key = *scan_key, .spend_key = *spend_key}};
silent_payments::recipient{.scan_key = *scan_key, .spend_key = *spend_key},
};
std::array<std::uint8_t, silent_payments::outpoint_size> outpoint{};
outpoint.fill(0x01);
std::array<secp256k1_pair const*, 1> const plain_inputs{&*input_pair};
Expand Down
6 changes: 3 additions & 3 deletions test/secretbox_sodium_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ static_assert(secretbox_xchacha::key_size == 32 && secretbox_xchacha::iv_size ==
static_assert(secretbox::max_message_size == ~std::uint64_t{0} - 16);
// libsodium's own limit on a 64-bit target; on a 32-bit one libsodium's is the smaller,
// 2^32 - 17, as the Doc Comment says.
static_assert(sizeof(std::size_t) == 8
? secretbox::max_message_size == crypto_secretbox_MESSAGEBYTES_MAX
: crypto_secretbox_MESSAGEBYTES_MAX == 0xffffffffU - 16);
static_assert(sizeof(std::size_t) != 8 ||
secretbox::max_message_size == crypto_secretbox_MESSAGEBYTES_MAX);
static_assert(sizeof(std::size_t) == 8 || crypto_secretbox_MESSAGEBYTES_MAX == 0xffffffffU - 16);
static_assert(secretbox::max_additional_data_size == 0 &&
secretbox_xchacha::max_additional_data_size == 0);

Expand Down
Loading