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

Issue 820523003: [webcrypto] Implement PBKDF2 (blink-side) (Closed)

Created:
5 years, 11 months ago by xun.sun
Modified:
5 years, 11 months ago
CC:
arv+blink, blink-reviews, blink-reviews-bindings_chromium.org, dglazkov+blink
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Implement PBKDF2 (blink-side) This CL implements password-based key derivation function 2 (PBKDF2) as described in the WebCrypto spec - https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#pbkdf2. The Chromium-side implementation is https://codereview.chromium.org/797723006/ BUG=399099 R=eroman TESTS=crypto/ Layout tests Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=188649

Patch Set 1 #

Patch Set 2 : Added Layout tests #

Total comments: 2

Patch Set 3 : Added Layout tests for deriveKey failures #

Patch Set 4 : Rebase and structured cloning test #

Total comments: 23

Patch Set 5 : Add more Layout tests #

Patch Set 6 : Add comments to the new tests in LayoutTests/crypto/subtle/pbkdf2-deriveBits.html #

Total comments: 12

Patch Set 7 : Added test for empty password #

Patch Set 8 : Remove derived_key result from the empty password test. #

Patch Set 9 : Throw OperationError on empty passwords #

Patch Set 10 : Fixed empty password test #

Patch Set 11 : Fixed empty password test #

Total comments: 1

Patch Set 12 : nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1126 lines, -69 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +9 lines, -0 lines 0 comments Download
A + LayoutTests/crypto/subtle/clone-pbkdf2Key.html View 1 2 3 4 5 6 2 chunks +12 lines, -11 lines 0 comments Download
A + LayoutTests/crypto/subtle/clone-pbkdf2Key-expected.txt View 1 2 3 4 2 chunks +190 lines, -55 lines 0 comments Download
A LayoutTests/crypto/subtle/pbkdf2-deriveBits.html View 1 2 3 4 5 6 1 chunk +114 lines, -0 lines 0 comments Download
A LayoutTests/crypto/subtle/pbkdf2-deriveBits-empty-password-failure.html View 1 2 3 4 5 6 7 8 9 1 chunk +63 lines, -0 lines 0 comments Download
A LayoutTests/crypto/subtle/pbkdf2-deriveBits-empty-password-failure-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +15 lines, -0 lines 0 comments Download
A LayoutTests/crypto/subtle/pbkdf2-deriveBits-expected.txt View 1 2 3 4 5 6 1 chunk +37 lines, -0 lines 0 comments Download
A LayoutTests/crypto/subtle/pbkdf2-deriveBits-failures.html View 1 2 3 4 1 chunk +64 lines, -0 lines 0 comments Download
A LayoutTests/crypto/subtle/pbkdf2-deriveBits-failures-expected.txt View 1 2 3 4 1 chunk +14 lines, -0 lines 0 comments Download
A LayoutTests/crypto/subtle/pbkdf2-deriveBits-rfc6070-test-vectors.html View 1 2 3 4 5 6 1 chunk +123 lines, -0 lines 0 comments Download
A LayoutTests/crypto/subtle/pbkdf2-deriveBits-rfc6070-test-vectors-expected.txt View 1 2 3 4 5 6 1 chunk +44 lines, -0 lines 0 comments Download
A LayoutTests/crypto/subtle/pbkdf2-deriveKey-aes.html View 1 2 3 4 1 chunk +129 lines, -0 lines 0 comments Download
A LayoutTests/crypto/subtle/pbkdf2-deriveKey-aes-expected.txt View 1 2 1 chunk +69 lines, -0 lines 0 comments Download
A LayoutTests/crypto/subtle/pbkdf2-deriveKey-failures.html View 1 2 3 1 chunk +123 lines, -0 lines 0 comments Download
A LayoutTests/crypto/subtle/pbkdf2-deriveKey-failures-expected.txt View 1 2 1 chunk +32 lines, -0 lines 0 comments Download
M Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp View 1 2 3 3 chunks +6 lines, -0 lines 0 comments Download
M Source/modules/crypto/NormalizeAlgorithm.cpp View 1 2 3 4 3 chunks +30 lines, -0 lines 0 comments Download
M Source/platform/exported/WebCryptoAlgorithm.cpp View 1 2 3 6 chunks +28 lines, -2 lines 0 comments Download
M public/platform/WebCryptoAlgorithm.h View 1 2 3 4 chunks +5 lines, -1 line 0 comments Download
M public/platform/WebCryptoAlgorithmParams.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +19 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (2 generated)
xun.sun
PTAL.
5 years, 11 months ago (2015-01-07 06:23:07 UTC) #1
eroman
I only gave this an initial look over tonight (about to leave). Some initial comments: ...
5 years, 11 months ago (2015-01-07 06:48:52 UTC) #2
xun.sun
https://codereview.chromium.org/820523003/diff/20001/LayoutTests/crypto/subtle/pbkdf2-deriveBits.html File LayoutTests/crypto/subtle/pbkdf2-deriveBits.html (right): https://codereview.chromium.org/820523003/diff/20001/LayoutTests/crypto/subtle/pbkdf2-deriveBits.html#newcode29 LayoutTests/crypto/subtle/pbkdf2-deriveBits.html:29: dkLen: 20, On 2015/01/07 06:48:52, eroman wrote: > What ...
5 years, 11 months ago (2015-01-09 16:17:50 UTC) #3
xun.sun
On 2015/01/07 06:48:52, eroman wrote: > I only gave this an initial look over tonight ...
5 years, 11 months ago (2015-01-09 16:19:32 UTC) #4
eroman
On Fri, Jan 9, 2015 at 8:19 AM, <xun.sun@intel.com> wrote: > On 2015/01/07 06:48:52, eroman ...
5 years, 11 months ago (2015-01-09 19:59:09 UTC) #5
xun.sun
On 2015/01/09 19:59:09, eroman wrote: > On Fri, Jan 9, 2015 at 8:19 AM, <mailto:xun.sun@intel.com> ...
5 years, 11 months ago (2015-01-13 19:02:56 UTC) #6
xun.sun
On 2015/01/13 19:02:56, xun.sun wrote: > On 2015/01/09 19:59:09, eroman wrote: > > On Fri, ...
5 years, 11 months ago (2015-01-13 19:06:01 UTC) #7
xun.sun
https://codereview.chromium.org/820523003/diff/60001/Source/platform/exported/WebCryptoAlgorithm.cpp File Source/platform/exported/WebCryptoAlgorithm.cpp (right): https://codereview.chromium.org/820523003/diff/60001/Source/platform/exported/WebCryptoAlgorithm.cpp#newcode327 Source/platform/exported/WebCryptoAlgorithm.cpp:327: if (idInt >= WTF_ARRAY_LENGTH(algorithmIdToInfo)) I made this change because ...
5 years, 11 months ago (2015-01-13 19:16:30 UTC) #8
eroman
Please update the CL description to: (1) Link to the spec for PKBDF2: https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#pbkdf2 (2) ...
5 years, 11 months ago (2015-01-14 21:12:23 UTC) #9
xun.sun
https://codereview.chromium.org/820523003/diff/60001/LayoutTests/crypto/subtle/clone-pbkdf2Key.html File LayoutTests/crypto/subtle/clone-pbkdf2Key.html (right): https://codereview.chromium.org/820523003/diff/60001/LayoutTests/crypto/subtle/clone-pbkdf2Key.html#newcode22 LayoutTests/crypto/subtle/clone-pbkdf2Key.html:22: var k256BitData = "00112233445546778899aabbccddeeff000102030405060708090a0b0c0d0e0f"; On 2015/01/14 21:12:22, eroman wrote: ...
5 years, 11 months ago (2015-01-15 17:13:29 UTC) #10
xun.sun
On 2015/01/14 21:12:23, eroman wrote: > Please update the CL description to: > > (1) ...
5 years, 11 months ago (2015-01-15 17:17:13 UTC) #11
eroman
Patchset 7 LGTM after the following comments are adressed https://codereview.chromium.org/820523003/diff/60001/LayoutTests/crypto/subtle/clone-pbkdf2Key.html File LayoutTests/crypto/subtle/clone-pbkdf2Key.html (right): https://codereview.chromium.org/820523003/diff/60001/LayoutTests/crypto/subtle/clone-pbkdf2Key.html#newcode22 LayoutTests/crypto/subtle/clone-pbkdf2Key.html:22: ...
5 years, 11 months ago (2015-01-15 22:28:58 UTC) #12
xun.sun
https://codereview.chromium.org/820523003/diff/100001/LayoutTests/TestExpectations File LayoutTests/TestExpectations (right): https://codereview.chromium.org/820523003/diff/100001/LayoutTests/TestExpectations#newcode631 LayoutTests/TestExpectations:631: # These PBKDF2 tests are failing without the Chromium ...
5 years, 11 months ago (2015-01-16 03:36:59 UTC) #13
xun.sun
On 2015/01/15 22:28:58, eroman wrote: > Patchset 7 LGTM after the following comments are adressed ...
5 years, 11 months ago (2015-01-16 03:42:10 UTC) #14
eroman
https://codereview.chromium.org/820523003/diff/100001/LayoutTests/crypto/subtle/pbkdf2-deriveBits.html File LayoutTests/crypto/subtle/pbkdf2-deriveBits.html (right): https://codereview.chromium.org/820523003/diff/100001/LayoutTests/crypto/subtle/pbkdf2-deriveBits.html#newcode108 LayoutTests/crypto/subtle/pbkdf2-deriveBits.html:108: }, On 2015/01/16 03:36:59, xun.sun wrote: > On 2015/01/15 ...
5 years, 11 months ago (2015-01-16 04:05:23 UTC) #15
xun.sun
On 2015/01/16 04:05:23, eroman wrote: > https://codereview.chromium.org/820523003/diff/100001/LayoutTests/crypto/subtle/pbkdf2-deriveBits.html > File LayoutTests/crypto/subtle/pbkdf2-deriveBits.html (right): > > https://codereview.chromium.org/820523003/diff/100001/LayoutTests/crypto/subtle/pbkdf2-deriveBits.html#newcode108 > ...
5 years, 11 months ago (2015-01-16 05:38:47 UTC) #16
eroman
LGTM @jochen: Could you review for Source/platform/* and public/platform/* approval? Thanks!
5 years, 11 months ago (2015-01-16 21:21:39 UTC) #18
jochen (gone - plz use gerrit)
lgtm with nit https://codereview.chromium.org/820523003/diff/190001/public/platform/WebCryptoAlgorithmParams.h File public/platform/WebCryptoAlgorithmParams.h (right): https://codereview.chromium.org/820523003/diff/190001/public/platform/WebCryptoAlgorithmParams.h#newcode366 public/platform/WebCryptoAlgorithmParams.h:366: unsigned saltLength, unsigned iterations) nit. no ...
5 years, 11 months ago (2015-01-19 12:51:22 UTC) #19
xun.sun
On 2015/01/19 12:51:22, jochen (slow) wrote: > lgtm with nit > > https://codereview.chromium.org/820523003/diff/190001/public/platform/WebCryptoAlgorithmParams.h > File ...
5 years, 11 months ago (2015-01-19 13:40:31 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/820523003/210001
5 years, 11 months ago (2015-01-19 19:33:05 UTC) #22
commit-bot: I haz the power
5 years, 11 months ago (2015-01-19 21:30:47 UTC) #23
Message was sent while issue was closed.
Committed patchset #12 (id:210001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=188649

Powered by Google App Engine
This is Rietveld 408576698