Remove function pointers from curve structure

They're not needed in practice, and removing them decreases the code size
slightly and provides less opportunities for an attacker.
This commit is contained in:
Manuel Pégourié-Gonnard 2019-11-21 09:18:29 +01:00
parent e714332563
commit 1c6f7eae2d
3 changed files with 10 additions and 20 deletions

View file

@ -280,7 +280,7 @@ int uECC_verify(const uint8_t *public_key, const uint8_t *message_hash,
for (i = num_bits - 2; i >= 0; --i) {
uECC_word_t index;
curve->double_jacobian(rx, ry, z, curve);
double_jacobian_default(rx, ry, z, curve);
index = (!!uECC_vli_testBit(u1, i)) | ((!!uECC_vli_testBit(u2, i)) << 1);
point = points[index];