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

Issue 835633002: Change the WebCrypto behavior when importing EC private keys without a public key. (Closed)

Created:
5 years, 11 months ago by eroman
Modified:
5 years, 11 months ago
Reviewers:
Ryan Sleevi, davidben
CC:
chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@add_private_tests
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Change the WebCrypto behavior when exporting EC private keys that were imported without a public key. Before such keys were exported to PKCS8 format, the publicKey would be missing in the ECPrivateKey. Now instead the publicKey is written to exported bytes even if it was not provided during import. This is more consistent with how export works for JWK, where the public key is a required parameter. It also speeds up the structured (de) cloning of such keys, which uses PKCS8 format under the hood (and for which if the publicKey was not provided, BoringSSL computes it). BUG=445635 Committed: https://crrev.com/6a87d7f37462fe33d0da8b730ce7f81e31063790 Cr-Commit-Position: refs/heads/master@{#311553}

Patch Set 1 #

Total comments: 5

Patch Set 2 : add back something removed accidentally #

Total comments: 3

Patch Set 3 : Clarify test names for pkcs8 input/output data #

Patch Set 4 : properly rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -2 lines) Patch
M content/child/webcrypto/openssl/ec_algorithm_openssl.cc View 1 2 2 chunks +9 lines, -0 lines 0 comments Download
M content/child/webcrypto/test/ecdsa_unittest.cc View 1 2 2 chunks +11 lines, -2 lines 0 comments Download
M content/test/data/webcrypto/ec_private_keys.json View 1 2 3 1 chunk +19 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (3 generated)
eroman
5 years, 11 months ago (2015-01-02 02:11:36 UTC) #2
Ryan Sleevi
LGTM % a naming nit that I'm not too comfortable with. https://codereview.chromium.org/835633002/diff/1/content/child/webcrypto/openssl/ec_algorithm_openssl.cc File content/child/webcrypto/openssl/ec_algorithm_openssl.cc (right): ...
5 years, 11 months ago (2015-01-02 22:45:23 UTC) #3
eroman
https://codereview.chromium.org/835633002/diff/1/content/test/data/webcrypto/ec_private_keys.json File content/test/data/webcrypto/ec_private_keys.json (right): https://codereview.chromium.org/835633002/diff/1/content/test/data/webcrypto/ec_private_keys.json#newcode94 content/test/data/webcrypto/ec_private_keys.json:94: "pkcs8": "308187020100301306072A8648CE3D020106082A8648CE3D030107046D306B02010104201FE33950C5F461124AE992C2BDFDF1C73B1615F571BD567E60D19AA1F48CDF42A144034200047C110C66DCFDA807F6E69E45DDB3C74F69A1484D203E8DC5ADA8E9A9DD7CB3C70DF448986E51BDE5D1576F99901F9C2C6A806A47FD907643A72B835597EFC8C6" On 2015/01/02 22:45:23, Ryan Sleevi wrote: > ...
5 years, 11 months ago (2015-01-02 23:49:39 UTC) #4
eroman
David, could you please review the BoringSSL side of this change? ec_algorithm_openssl.cc
5 years, 11 months ago (2015-01-02 23:50:17 UTC) #6
eroman
https://codereview.chromium.org/835633002/diff/1/content/child/webcrypto/openssl/ec_algorithm_openssl.cc File content/child/webcrypto/openssl/ec_algorithm_openssl.cc (left): https://codereview.chromium.org/835633002/diff/1/content/child/webcrypto/openssl/ec_algorithm_openssl.cc#oldcode119 content/child/webcrypto/openssl/ec_algorithm_openssl.cc:119: if (!EC_KEY_check_key(ec.get())) Hmm, this removal was unintentional from having ...
5 years, 11 months ago (2015-01-06 20:16:14 UTC) #7
davidben
lgtm. Probably worth later as BoringSSL cleanup adding new ECPrivateKey encode/decode functions, with encode taking ...
5 years, 11 months ago (2015-01-06 20:24:41 UTC) #8
eroman
https://codereview.chromium.org/835633002/diff/20001/content/child/webcrypto/openssl/ec_algorithm_openssl.cc File content/child/webcrypto/openssl/ec_algorithm_openssl.cc (right): https://codereview.chromium.org/835633002/diff/20001/content/child/webcrypto/openssl/ec_algorithm_openssl.cc#newcode123 content/child/webcrypto/openssl/ec_algorithm_openssl.cc:123: if (enc_flags & EC_PKEY_NO_PUBKEY) { On 2015/01/06 20:24:41, David ...
5 years, 11 months ago (2015-01-06 20:26:46 UTC) #9
eroman
https://codereview.chromium.org/835633002/diff/1/content/test/data/webcrypto/ec_private_keys.json File content/test/data/webcrypto/ec_private_keys.json (right): https://codereview.chromium.org/835633002/diff/1/content/test/data/webcrypto/ec_private_keys.json#newcode94 content/test/data/webcrypto/ec_private_keys.json:94: "pkcs8": "308187020100301306072A8648CE3D020106082A8648CE3D030107046D306B02010104201FE33950C5F461124AE992C2BDFDF1C73B1615F571BD567E60D19AA1F48CDF42A144034200047C110C66DCFDA807F6E69E45DDB3C74F69A1484D203E8DC5ADA8E9A9DD7CB3C70DF448986E51BDE5D1576F99901F9C2C6A806A47FD907643A72B835597EFC8C6" On 2015/01/02 23:49:38, eroman wrote: > On ...
5 years, 11 months ago (2015-01-06 21:14:36 UTC) #10
Ryan Sleevi
lgtm
5 years, 11 months ago (2015-01-13 05:48:13 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/835633002/60001
5 years, 11 months ago (2015-01-14 20:40:14 UTC) #13
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 11 months ago (2015-01-14 22:32:30 UTC) #14
commit-bot: I haz the power
5 years, 11 months ago (2015-01-14 22:33:18 UTC) #15
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/6a87d7f37462fe33d0da8b730ce7f81e31063790
Cr-Commit-Position: refs/heads/master@{#311553}

Powered by Google App Engine
This is Rietveld 408576698