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

Issue 1344483003: Fix a typo in Bigint dart implementation of modInverse. (Closed)

Created:
5 years, 3 months ago by regis
Modified:
5 years, 3 months ago
Reviewers:
Mads Ager (google)
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fix a typo in Bigint dart implementation of modInverse. Fixes #24324 Committed: https://github.com/dart-lang/sdk/commit/9ca5ca6316eeddfb6f79526e49528b27f862e2f2

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M runtime/lib/bigint.dart View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (1 generated)
regis
TBR The code path with the typo is only used for modInverse (not for gcd), ...
5 years, 3 months ago (2015-09-14 04:03:26 UTC) #2
regis
Committed patchset #1 (id:1) manually as 9ca5ca6316eeddfb6f79526e49528b27f862e2f2 (presubmit successful).
5 years, 3 months ago (2015-09-14 04:04:01 UTC) #3
Mads Ager (google)
LGTM, should we add a test?
5 years, 3 months ago (2015-09-14 06:18:32 UTC) #4
regis
5 years, 3 months ago (2015-09-14 06:25:01 UTC) #5
Message was sent while issue was closed.
On 2015/09/14 06:18:32, Mads Ager (google) wrote:
> LGTM, should we add a test?

As I mentioned, it is hard to find a test exercising this path. You need to use
modInverse (not gcd) with an even modulus This is never the case in practice,
since crypto always uses an odd modulus (the reason this bug remained hidden).
Feel free to add one if you have the patience to find one :-)

You would need to backtrack from the typo location back to a pair of inputs.
This is not obvious. The code, however, is very obvious and I am confident that
the fix is good.

Powered by Google App Engine
This is Rietveld 408576698