You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code below adds 2 commitments with the value of 200 using 8 bits as size. 200 + 200 should overflow a u8, this code tries to find what value matches this commitment. Surprisingly (or not), the output I get is 400 which sounds ok since it's 200 + 200 but it is not an u8. Did I understand the 8 bits size wrong?
The text was updated successfully, but these errors were encountered:
grumbach
changed the title
8 bits range proofs behaviour with numbers larger than u8
[Question] 8 bits range proofs behaviour with numbers larger than u8
Aug 17, 2021
Where do you expect a u8 to come into play? You've just proven 200 < 2^8 and attempted to prove 400 < 2^8. The commitments are EC points, not u8 values. You should be able to create a commitment to 400 with no problems.
Does proof3 verify correctly (it shouldn't)? Also, I'm not sure why there isn't a precondition check in prove_* to return an error if the thing you're trying to prove isn't true.
The code below adds 2 commitments with the value of
200
using 8 bits as size.200 + 200
should overflow au8
, this code tries to find what value matches this commitment. Surprisingly (or not), the output I get is400
which sounds ok since it's200 + 200
but it is not anu8
. Did I understand the 8 bits size wrong?The text was updated successfully, but these errors were encountered: