Skip to content

Conversation

@valencif
Copy link

@valencif valencif commented Jun 7, 2024

Bug in uECC_vli_add and uECC_vli_sub

Error appear when oper2 = 0xFFFFFFFF and previous carry=1

i.e with 8 bits:

oper1:       83 +
oper2:       FF
           ------
   F+3=      12
 1+8+F=     18   // carry = (sum < left[i])  -->  carry = (8<8)  --> carry = 0 (Incorrect)
           ------
            182  //  Correct result

Equivalent error appears in the calculation of borrow in uECC_vli_sub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants