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

Issue 118623002: [webcrypto] Add raw symmetric key AES-KW wrap/unwrap for NSS. (Closed)

Created:
7 years ago by padolph
Modified:
6 years, 9 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

[webcrypto] Add raw symmetric key AES-KW wrap/unwrap for NSS. BUG=245025 TEST=content_unittests --gtest_filter="WebCryptoImpl*" Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255270

Patch Set 1 #

Patch Set 2 : minor refactoring #

Total comments: 10

Patch Set 3 : fixes for bryaneyler #

Total comments: 16

Patch Set 4 : rebase #

Patch Set 5 : fixes for eroman #

Total comments: 3

Patch Set 6 : rebase and add large data test #

Total comments: 9

Patch Set 7 : fixes for rsleevi #

Patch Set 8 : rebase #

Total comments: 27

Patch Set 9 : fixes for eroman #

Patch Set 10 : rebase #

Patch Set 11 : rebase and refactor #

Total comments: 8

Patch Set 12 : fixes for eroman #

Patch Set 13 : rebase #

Total comments: 14

Patch Set 14 : fixes for rsleevi #

Patch Set 15 : minor comment change: added a TODO #

Total comments: 6

Patch Set 16 : fixes for eroman #

Patch Set 17 : changed ASSERTS from last change to EXPECTS, to match original code intent #

Unified diffs Side-by-side diffs Delta from patch set Stats (+523 lines, -46 lines) Patch
M content/renderer/webcrypto/platform_crypto.h View 1 2 3 4 5 6 7 8 9 1 chunk +19 lines, -0 lines 0 comments Download
M content/renderer/webcrypto/platform_crypto_nss.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +133 lines, -30 lines 0 comments Download
M content/renderer/webcrypto/platform_crypto_openssl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +17 lines, -0 lines 0 comments Download
M content/renderer/webcrypto/shared_crypto.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +17 lines, -0 lines 0 comments Download
M content/renderer/webcrypto/shared_crypto.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +83 lines, -0 lines 0 comments Download
M content/renderer/webcrypto/shared_crypto_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 12 chunks +186 lines, -16 lines 0 comments Download
M content/renderer/webcrypto/webcrypto_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +13 lines, -0 lines 0 comments Download
M content/renderer/webcrypto/webcrypto_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +16 lines, -0 lines 0 comments Download
A content/test/data/webcrypto/aes_kw.json View 1 2 3 4 5 6 7 8 9 10 1 chunk +39 lines, -0 lines 0 comments Download

Messages

Total messages: 43 (0 generated)
padolph
7 years ago (2013-12-18 23:15:44 UTC) #1
Bryan Eyler
https://codereview.chromium.org/118623002/diff/20001/content/renderer/webcrypto/webcrypto_impl_nss.cc File content/renderer/webcrypto/webcrypto_impl_nss.cc (right): https://codereview.chromium.org/118623002/diff/20001/content/renderer/webcrypto/webcrypto_impl_nss.cc#newcode202 content/renderer/webcrypto/webcrypto_impl_nss.cc:202: DCHECK_EQ(algorithm.id(), key.algorithm().id()); Is this right? Isn't algorithm the key ...
7 years ago (2013-12-18 23:30:32 UTC) #2
eroman
I don't believe we want to expose encrypt/decrypt explicitly. According to the spec AES-KW has ...
7 years ago (2013-12-18 23:30:37 UTC) #3
padolph
On 2013/12/18 23:30:37, eroman wrote: > I don't believe we want to expose encrypt/decrypt explicitly. ...
7 years ago (2013-12-18 23:42:55 UTC) #4
Ryan Sleevi
On 2013/12/18 23:42:55, padolph wrote: > On 2013/12/18 23:30:37, eroman wrote: > > I don't ...
7 years ago (2013-12-18 23:48:01 UTC) #5
padolph
https://codereview.chromium.org/118623002/diff/20001/content/renderer/webcrypto/webcrypto_impl_nss.cc File content/renderer/webcrypto/webcrypto_impl_nss.cc (right): https://codereview.chromium.org/118623002/diff/20001/content/renderer/webcrypto/webcrypto_impl_nss.cc#newcode202 content/renderer/webcrypto/webcrypto_impl_nss.cc:202: DCHECK_EQ(algorithm.id(), key.algorithm().id()); On 2013/12/18 23:30:32, Bryan Eyler wrote: > ...
7 years ago (2013-12-19 00:07:15 UTC) #6
padolph
(manual email) me 0 minutes ago #6 https://codereview.chromium.org/118623002/diff/20001/content/renderer/webcryp... File content/renderer/webcrypto/webcrypto_impl_nss.cc (right): https://codereview.chromium.org/118623002/diff/20001/content/renderer/webcryp... content/renderer/webcrypto/webcrypto_impl_nss.cc:202: DCHECK_EQ(algorithm.id(), key.algorithm().id()); ...
7 years ago (2013-12-19 00:10:52 UTC) #7
padolph
On 2013/12/18 23:48:01, Ryan Sleevi wrote: > On 2013/12/18 23:42:55, padolph wrote: > > On ...
7 years ago (2013-12-19 00:19:20 UTC) #8
padolph
(manual email) On 2013/12/18 23:48:01, Ryan Sleevi wrote: > On 2013/12/18 23:42:55, padolph wrote: > ...
7 years ago (2013-12-19 00:20:28 UTC) #9
Bryan Eyler
I see what the discrepancies here are now, and why it's confusing us. If this ...
7 years ago (2013-12-19 00:25:42 UTC) #10
padolph
7 years ago (2013-12-19 00:54:38 UTC) #11
padolph
On 2013/12/19 00:25:42, Bryan Eyler wrote: > I see what the discrepancies here are now, ...
7 years ago (2013-12-19 01:38:45 UTC) #12
eroman
Thanks Paul. I agree that putting it in Encrypt/Decrypt and having the general unwrap/wrap implementation ...
7 years ago (2013-12-20 01:40:56 UTC) #13
eroman
https://codereview.chromium.org/118623002/diff/40001/content/renderer/webcrypto/webcrypto_impl_nss.cc File content/renderer/webcrypto/webcrypto_impl_nss.cc (right): https://codereview.chromium.org/118623002/diff/40001/content/renderer/webcrypto/webcrypto_impl_nss.cc#newcode184 content/renderer/webcrypto/webcrypto_impl_nss.cc:184: const unsigned int kAesKwIvLength = 8; Can you instead ...
7 years ago (2013-12-20 01:58:14 UTC) #14
padolph
https://codereview.chromium.org/118623002/diff/40001/content/renderer/webcrypto/webcrypto_impl_nss.cc File content/renderer/webcrypto/webcrypto_impl_nss.cc (right): https://codereview.chromium.org/118623002/diff/40001/content/renderer/webcrypto/webcrypto_impl_nss.cc#newcode184 content/renderer/webcrypto/webcrypto_impl_nss.cc:184: const unsigned int kAesKwIvLength = 8; On 2013/12/20 01:58:14, ...
7 years ago (2013-12-23 19:58:32 UTC) #15
Bryan Eyler
It looks good to me, but I do have one concern about the assumption of ...
6 years, 11 months ago (2014-01-15 19:30:17 UTC) #16
padolph
https://codereview.chromium.org/118623002/diff/60002/content/renderer/webcrypto/webcrypto_impl_nss.cc File content/renderer/webcrypto/webcrypto_impl_nss.cc (right): https://codereview.chromium.org/118623002/diff/60002/content/renderer/webcrypto/webcrypto_impl_nss.cc#newcode211 content/renderer/webcrypto/webcrypto_impl_nss.cc:211: // generic secret blob, since we can't be certain ...
6 years, 11 months ago (2014-01-15 22:58:52 UTC) #17
eroman
https://codereview.chromium.org/118623002/diff/60002/content/renderer/webcrypto/webcrypto_impl_nss.cc File content/renderer/webcrypto/webcrypto_impl_nss.cc (right): https://codereview.chromium.org/118623002/diff/60002/content/renderer/webcrypto/webcrypto_impl_nss.cc#newcode211 content/renderer/webcrypto/webcrypto_impl_nss.cc:211: // generic secret blob, since we can't be certain ...
6 years, 11 months ago (2014-01-15 23:45:03 UTC) #18
Ryan Sleevi
Not LGTM from a layering/design perspective. We shouldn't be forcing keys within NSS to be ...
6 years, 11 months ago (2014-01-16 23:41:14 UTC) #19
padolph
On 2014/01/16 23:41:14, Ryan Sleevi (OOO until 2-21) wrote: > Not LGTM from a layering/design ...
6 years, 10 months ago (2014-02-19 03:26:44 UTC) #20
padolph
https://codereview.chromium.org/118623002/diff/160001/content/renderer/webcrypto/webcrypto_impl_nss.cc File content/renderer/webcrypto/webcrypto_impl_nss.cc (right): https://codereview.chromium.org/118623002/diff/160001/content/renderer/webcrypto/webcrypto_impl_nss.cc#newcode376 content/renderer/webcrypto/webcrypto_impl_nss.cc:376: const CK_MECHANISM_TYPE kAesKwMechanism = CKM_NSS_AES_KEY_WRAP; On 2014/01/16 23:41:15, Ryan ...
6 years, 10 months ago (2014-02-19 03:55:42 UTC) #21
eroman
https://codereview.chromium.org/118623002/diff/250001/content/renderer/webcrypto/webcrypto_impl_nss.cc File content/renderer/webcrypto/webcrypto_impl_nss.cc (right): https://codereview.chromium.org/118623002/diff/250001/content/renderer/webcrypto/webcrypto_impl_nss.cc#newcode399 content/renderer/webcrypto/webcrypto_impl_nss.cc:399: SECItem iv_item = {siBuffer, const_cast<unsigned char*>(kAesIv), there is a ...
6 years, 10 months ago (2014-02-26 23:40:21 UTC) #22
padolph
https://codereview.chromium.org/118623002/diff/250001/content/renderer/webcrypto/webcrypto_impl_nss.cc File content/renderer/webcrypto/webcrypto_impl_nss.cc (right): https://codereview.chromium.org/118623002/diff/250001/content/renderer/webcrypto/webcrypto_impl_nss.cc#newcode399 content/renderer/webcrypto/webcrypto_impl_nss.cc:399: SECItem iv_item = {siBuffer, const_cast<unsigned char*>(kAesIv), On 2014/02/26 23:40:22, ...
6 years, 9 months ago (2014-02-28 23:28:39 UTC) #23
eroman
L G T M. Ryan, can you review this? https://codereview.chromium.org/118623002/diff/320001/content/renderer/webcrypto/platform_crypto.h File content/renderer/webcrypto/platform_crypto.h (right): https://codereview.chromium.org/118623002/diff/320001/content/renderer/webcrypto/platform_crypto.h#newcode190 content/renderer/webcrypto/platform_crypto.h:190: ...
6 years, 9 months ago (2014-03-01 01:13:54 UTC) #24
padolph
https://codereview.chromium.org/118623002/diff/320001/content/renderer/webcrypto/platform_crypto.h File content/renderer/webcrypto/platform_crypto.h (right): https://codereview.chromium.org/118623002/diff/320001/content/renderer/webcrypto/platform_crypto.h#newcode190 content/renderer/webcrypto/platform_crypto.h:190: // * |wrapped_key_data| is at least 24 bytes and ...
6 years, 9 months ago (2014-03-01 01:55:00 UTC) #25
Ryan Sleevi
lgtm https://codereview.chromium.org/118623002/diff/360001/content/renderer/webcrypto/platform_crypto_nss.cc File content/renderer/webcrypto/platform_crypto_nss.cc (right): https://codereview.chromium.org/118623002/diff/360001/content/renderer/webcrypto/platform_crypto_nss.cc#newcode503 content/renderer/webcrypto/platform_crypto_nss.cc:503: // possible operations for this key type. This ...
6 years, 9 months ago (2014-03-01 02:40:12 UTC) #26
padolph
https://codereview.chromium.org/118623002/diff/360001/content/renderer/webcrypto/platform_crypto_nss.cc File content/renderer/webcrypto/platform_crypto_nss.cc (right): https://codereview.chromium.org/118623002/diff/360001/content/renderer/webcrypto/platform_crypto_nss.cc#newcode503 content/renderer/webcrypto/platform_crypto_nss.cc:503: // possible operations for this key type. On 2014/03/01 ...
6 years, 9 months ago (2014-03-01 03:38:28 UTC) #27
padolph
The CQ bit was checked by padolph@netflix.com
6 years, 9 months ago (2014-03-04 03:08:53 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/padolph@netflix.com/118623002/390001
6 years, 9 months ago (2014-03-04 03:09:48 UTC) #29
eroman
lgtm https://codereview.chromium.org/118623002/diff/390001/content/renderer/webcrypto/platform_crypto_nss.cc File content/renderer/webcrypto/platform_crypto_nss.cc (right): https://codereview.chromium.org/118623002/diff/390001/content/renderer/webcrypto/platform_crypto_nss.cc#newcode463 content/renderer/webcrypto/platform_crypto_nss.cc:463: const blink::WebCryptoAlgorithm& hash = GetInnerHashAlgorithm(algorithm); This shouldn't be ...
6 years, 9 months ago (2014-03-04 03:16:25 UTC) #30
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-04 05:01:10 UTC) #31
commit-bot: I haz the power
Retried try job too often on win_x64_rel for step(s) base_unittests, chrome_elf_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_x64_rel&number=81112
6 years, 9 months ago (2014-03-04 05:01:11 UTC) #32
padolph
https://codereview.chromium.org/118623002/diff/390001/content/renderer/webcrypto/platform_crypto_nss.cc File content/renderer/webcrypto/platform_crypto_nss.cc (right): https://codereview.chromium.org/118623002/diff/390001/content/renderer/webcrypto/platform_crypto_nss.cc#newcode463 content/renderer/webcrypto/platform_crypto_nss.cc:463: const blink::WebCryptoAlgorithm& hash = GetInnerHashAlgorithm(algorithm); On 2014/03/04 03:16:26, eroman ...
6 years, 9 months ago (2014-03-04 17:20:05 UTC) #33
padolph
The CQ bit was checked by padolph@netflix.com
6 years, 9 months ago (2014-03-05 17:48:45 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/padolph@netflix.com/118623002/420001
6 years, 9 months ago (2014-03-05 17:49:19 UTC) #35
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-05 20:13:35 UTC) #36
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=275438
6 years, 9 months ago (2014-03-05 20:13:35 UTC) #37
eroman
The CQ bit was checked by eroman@chromium.org
6 years, 9 months ago (2014-03-05 22:08:21 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/padolph@netflix.com/118623002/420001
6 years, 9 months ago (2014-03-05 22:08:42 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/padolph@netflix.com/118623002/420001
6 years, 9 months ago (2014-03-06 00:04:46 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/padolph@netflix.com/118623002/420001
6 years, 9 months ago (2014-03-06 02:47:59 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/padolph@netflix.com/118623002/420001
6 years, 9 months ago (2014-03-06 03:13:20 UTC) #42
commit-bot: I haz the power
6 years, 9 months ago (2014-03-06 05:58:19 UTC) #43
Message was sent while issue was closed.
Change committed as 255270

Powered by Google App Engine
This is Rietveld 408576698