(1ULL << params->full_height)
always evaluates to 0 when params->full_height == 64 since ULL is a 64 bit integer.
e.g. xmss_core.c:122, ends up comparing idx with 0xFFFFFFFFFFFFFFFF.
if (idx >= ((1ULL << params->full_height) - 1)) {
// Delete secret key here. We only do this in memory, production code
// has to make sure that this happens on disk.
memset(sk, 0xFF, params->index_bytes);
memset(sk + params->index_bytes, 0, (params->sk_bytes - params->index_bytes));
if (idx > ((1ULL << params->full_height) - 1))
return -2; // We already used all one-time keys
if ((params->full_height == 64) && (idx == ((1ULL << params->full_height) - 1)))
return -2; // We already used all one-time keys
}
Perhaps this is intentional, but if so it could be noted as such to help the reader.