mbedtls
mbedtls copied to clipboard
Document that bignum_core doesn't handle zero-length arrays
Arithmetic on the singleton set {0} isn't useful, so there's no point in supporting zero-length numbers in bignum_core. This is different from bignum which manipulates variable-length numbers and a zero-length array, with a null pointer, is a perfectly cromulent representation of 0. Likewise bignum_mod
and bignum_mod_raw
don't need to work with modulo 1 so they never need to manipulate zero-length limb arrays.
- Document this in
bignum_core.h
. - Remove any support for zero-length-with-null-pointer in
bignum_core.c
. - See if there's any functions in
bignum_mod_raw
andbignum_mod
where this applies as well.