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

Issue 1398453004: Add a 'secure' constructor to Random in dart:math returning a cryptographically (Closed)

Created:
5 years, 2 months ago by regis
Modified:
5 years, 2 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org, Ivan Posva
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Add a 'secure' constructor to Random in dart:math returning a cryptographically secure random generator which reads from the entropy source provided by the embedder for every generated random value. Add a test. Fixes #1746. R=lrn@google.com Committed: https://github.com/dart-lang/sdk/commit/09954546fb3246c4476ee4a92c4b7bef73964756

Patch Set 1 #

Patch Set 2 : fix comments #

Total comments: 18

Patch Set 3 : address review comments #

Total comments: 10

Patch Set 4 : address review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+170 lines, -24 lines) Patch
M runtime/lib/math.cc View 1 2 3 chunks +27 lines, -5 lines 0 comments Download
M runtime/lib/math_patch.dart View 1 2 3 4 chunks +58 lines, -15 lines 0 comments Download
M runtime/vm/bootstrap_natives.h View 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/_internal/js_runtime/lib/math_patch.dart View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M sdk/lib/math/random.dart View 1 2 1 chunk +15 lines, -4 lines 0 comments Download
M tests/lib/lib.status View 1 chunk +1 line, -0 lines 0 comments Download
A tests/lib/math/random_secure_test.dart View 1 2 1 chunk +62 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (2 generated)
regis
5 years, 2 months ago (2015-10-12 22:22:53 UTC) #2
regis
5 years, 2 months ago (2015-10-13 20:38:57 UTC) #4
Lasse Reichstein Nielsen
lgtm https://codereview.chromium.org/1398453004/diff/20001/runtime/lib/math.cc File runtime/lib/math.cc (right): https://codereview.chromium.org/1398453004/diff/20001/runtime/lib/math.cc#newcode211 runtime/lib/math.cc:211: "Entropy source is not setup")); setup -> set ...
5 years, 2 months ago (2015-10-14 11:08:46 UTC) #5
regis
Thank you, Lasse. PTAL https://codereview.chromium.org/1398453004/diff/20001/runtime/lib/math.cc File runtime/lib/math.cc (right): https://codereview.chromium.org/1398453004/diff/20001/runtime/lib/math.cc#newcode211 runtime/lib/math.cc:211: "Entropy source is not setup")); ...
5 years, 2 months ago (2015-10-14 20:22:36 UTC) #6
Lasse Reichstein Nielsen
lgtm https://codereview.chromium.org/1398453004/diff/40001/runtime/lib/math_patch.dart File runtime/lib/math_patch.dart (right): https://codereview.chromium.org/1398453004/diff/40001/runtime/lib/math_patch.dart#newcode185 runtime/lib/math_patch.dart:185: if ((max <= 0) || (max > _POW2_32)) ...
5 years, 2 months ago (2015-10-15 09:32:33 UTC) #7
regis
Thanks! https://codereview.chromium.org/1398453004/diff/40001/runtime/lib/math_patch.dart File runtime/lib/math_patch.dart (right): https://codereview.chromium.org/1398453004/diff/40001/runtime/lib/math_patch.dart#newcode185 runtime/lib/math_patch.dart:185: if ((max <= 0) || (max > _POW2_32)) ...
5 years, 2 months ago (2015-10-15 17:12:02 UTC) #8
regis
5 years, 2 months ago (2015-10-15 17:16:08 UTC) #9
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
09954546fb3246c4476ee4a92c4b7bef73964756 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698