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

Issue 416993009: [webcrypto] JWK: Reject keys with non-minimal bigintegers. (Closed)

Created:
6 years, 5 months ago by eroman
Modified:
6 years, 5 months ago
Reviewers:
Ryan Sleevi
CC:
chromium-reviews, darin-cc_chromium.org, jam
Project:
chromium
Visibility:
Public.

Description

[webcrypto] JWK: Reject keys with non-minimal bigintegers. RSA properties such as n, e, d, p, q, dp, dq, qi are big integers encoded as base64 url-safe, big-endian octet strings. * Reject big integers that contain leading zeros, since by the JWA rules they must be minimal. * Reject big integers that are the empty octet string (since 0 is the minimal representation of the big-endian number 0, not empty string). This also changes the exception message and type when one of the optional parameters p, q, dp, dq, qi are missing. Before it would give an OperationError, because NSS was unable to infer the missing parameters. Now it gives a DataError explaining that the parameter is required. BUG=374927, 383998 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=285798

Patch Set 1 #

Patch Set 2 : improve a test #

Total comments: 2

Patch Set 3 : address sleevi comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -76 lines) Patch
M content/child/webcrypto/jwk.cc View 3 chunks +23 lines, -37 lines 0 comments Download
M content/child/webcrypto/nss/rsa_key_nss.cc View 3 chunks +19 lines, -22 lines 0 comments Download
M content/child/webcrypto/shared_crypto_unittest.cc View 1 2 5 chunks +31 lines, -11 lines 0 comments Download
M content/child/webcrypto/status.h View 1 chunk +7 lines, -3 lines 0 comments Download
M content/child/webcrypto/status.cc View 1 chunk +8 lines, -3 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
eroman
6 years, 5 months ago (2014-07-26 00:10:34 UTC) #1
Ryan Sleevi
lgtm https://codereview.chromium.org/416993009/diff/20001/content/child/webcrypto/shared_crypto_unittest.cc File content/child/webcrypto/shared_crypto_unittest.cc (right): https://codereview.chromium.org/416993009/diff/20001/content/child/webcrypto/shared_crypto_unittest.cc#newcode2406 content/child/webcrypto/shared_crypto_unittest.cc:2406: // implementation does not allow them. See http://crbug/com/374927 ...
6 years, 5 months ago (2014-07-26 00:52:34 UTC) #2
eroman
https://codereview.chromium.org/416993009/diff/20001/content/child/webcrypto/shared_crypto_unittest.cc File content/child/webcrypto/shared_crypto_unittest.cc (right): https://codereview.chromium.org/416993009/diff/20001/content/child/webcrypto/shared_crypto_unittest.cc#newcode2406 content/child/webcrypto/shared_crypto_unittest.cc:2406: // implementation does not allow them. See http://crbug/com/374927 On ...
6 years, 5 months ago (2014-07-26 00:57:12 UTC) #3
eroman
The CQ bit was checked by eroman@chromium.org
6 years, 5 months ago (2014-07-26 00:59:08 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eroman@chromium.org/416993009/40001
6 years, 5 months ago (2014-07-26 05:00:30 UTC) #5
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_x64_rel on tryserver.chromium.win ...
6 years, 5 months ago (2014-07-26 11:40:13 UTC) #6
commit-bot: I haz the power
6 years, 5 months ago (2014-07-26 19:59:27 UTC) #7
Message was sent while issue was closed.
Change committed as 285798

Powered by Google App Engine
This is Rietveld 408576698