Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Issue 10822019: crypto: special case ∞+a, a+∞ and a+a in p224. (Closed)

Created:
8 years, 5 months ago by agl
Modified:
8 years, 4 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

crypto: 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 : ... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -43 lines) Patch
M crypto/p224.cc View 1 2 9 chunks +99 lines, -43 lines 0 comments Download
M crypto/p224_unittest.cc View 1 2 3 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
agl
8 years, 5 months ago (2012-07-25 18:58:51 UTC) #1
willchan no longer on Chromium
Not that I know what this code really does, but LGTM. http://codereview.chromium.org/10822019/diff/1/crypto/p224.cc File crypto/p224.cc (right): ...
8 years, 5 months ago (2012-07-25 23:35:26 UTC) #2
agl
https://chromiumcodereview.appspot.com/10822019/diff/1/crypto/p224.cc File crypto/p224.cc (right): https://chromiumcodereview.appspot.com/10822019/diff/1/crypto/p224.cc#newcode359 crypto/p224.cc:359: uint32 top4AllOnes = 0xffffffffu; On 2012/07/25 23:35:26, willchan wrote: ...
8 years, 4 months ago (2012-07-27 17:21:06 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/agl@chromium.org/10822019/6001
8 years, 4 months ago (2012-07-27 17:22:12 UTC) #4
commit-bot: I haz the power
Try job failure for 10822019-6001 (retry) on win_rel for step "compile" (clobber build). It's a ...
8 years, 4 months ago (2012-07-27 17:45:41 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/agl@chromium.org/10822019/6003
8 years, 4 months ago (2012-07-27 17:49:57 UTC) #6
commit-bot: I haz the power
Try job failure for 10822019-6003 (retry) on win for step "compile" (clobber build). It's a ...
8 years, 4 months ago (2012-07-27 18:36:39 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/agl@chromium.org/10822019/2006
8 years, 4 months ago (2012-07-27 19:03:31 UTC) #8
commit-bot: I haz the power
8 years, 4 months ago (2012-07-27 21:25:25 UTC) #9
Change committed as 148815

Powered by Google App Engine
This is Rietveld 408576698