Open mazhenke opened 1 month ago
Indeed, for Montgomery curves, ecp_curves.c
says
Actually, the required msb for private keys
I have no idea why this choice. @mpg?
But anyway I'll fix the documentation.
I have no idea why this choice. @mpg?
I can't remember right now. I'll think about it and let you know if anything comes back.
In ecp.h, for the nbits:
size_t nbits; /!< For Short Weierstrass: The number of bits in \p P. For Montgomery curves: the number of bits in the private keys. /
but actually for Montgomery curves, nbits is the private key bitlen + 1. For example: Curve25519, nbits is set to 254, but the private key bitlength is at least 255, which is 254 + 1.