Descriptioncrypto: special case ∞+a, a+∞ and a+a in p224.
In unrelated work, I found that the group addition formula used in p224.cc
doesn't work when one of the arguments is the point at infinity. This change
catches that case and simplifies the ScalarMult loop as a consequence.
In the course of doing this, I found a couple of bugs in Contract that would
have produced the wrong answer is very rare cases.
I also added a catch for a+a. This can't happen in the ScalarMult loop, but it
could happen from SPAKE2 at a rate of 1 in ~2**220 evaluations.
BUG=none
TEST=crypto_unittests
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=148815
Patch Set 1 #
Total comments: 8
Patch Set 2 : ... #Patch Set 3 : ... #Patch Set 4 : ... #Messages
Total messages: 9 (0 generated)
|