Skip to content
Open
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
10 changes: 5 additions & 5 deletions wots.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ static void base_w(const xmss_params *params,

/* Computes the WOTS+ checksum over a message (in base_w). */
static void wots_checksum(const xmss_params *params,
int *csum_base_w, const int *msg_base_w)
int *csum_base_w, const unsigned int *msg_base_w)
{
int csum = 0;
unsigned long long csum = 0;
unsigned char csum_bytes[(params->wots_len2 * params->wots_log_w + 7) / 8];
unsigned int i;

Expand All @@ -100,7 +100,7 @@ static void wots_checksum(const xmss_params *params,

/* Takes a message and derives the matching chain lengths. */
static void chain_lengths(const xmss_params *params,
int *lengths, const unsigned char *msg)
unsigned int *lengths, const unsigned char *msg)
{
base_w(params, lengths, params->wots_len1, msg);
wots_checksum(params, lengths + params->wots_len1, lengths);
Expand Down Expand Up @@ -139,7 +139,7 @@ void wots_sign(const xmss_params *params,
const unsigned char *seed, const unsigned char *pub_seed,
uint32_t addr[8])
{
int lengths[params->wots_len];
unsigned int lengths[params->wots_len];
uint32_t i;

chain_lengths(params, lengths, msg);
Expand All @@ -163,7 +163,7 @@ void wots_pk_from_sig(const xmss_params *params, unsigned char *pk,
const unsigned char *sig, const unsigned char *msg,
const unsigned char *pub_seed, uint32_t addr[8])
{
int lengths[params->wots_len];
unsigned int lengths[params->wots_len];
uint32_t i;

chain_lengths(params, lengths, msg);
Expand Down