int bignum_r_degree(struct bn* n)
{
int i = BN_ARRAY_SIZE;
while ((n->array[--i] == 0) && i);
int out = i * WORD_SIZE * 8;
out += 32 - __builtin_clz(n->array[i]);
return out;
}
Returns the number of bits used to write the number (!!!not the buffer size).