Bug 169093 - [WebCrypto] Implement ECDH GenerateKey operation
Summary: [WebCrypto] Implement ECDH GenerateKey operation
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jiewen Tan
URL:
Keywords: InRadar
Depends on:
Blocks: 166746
  Show dependency treegraph
 
Reported: 2017-03-02 13:17 PST by Jiewen Tan
Modified: 2017-03-07 16:01 PST (History)
4 users (show)

See Also:


Attachments
Patch (188.63 KB, patch)
2017-03-03 17:26 PST, Jiewen Tan
no flags Details | Formatted Diff | Diff
Patch (181.54 KB, patch)
2017-03-03 18:42 PST, Jiewen Tan
no flags Details | Formatted Diff | Diff
Patch (181.61 KB, patch)
2017-03-03 20:33 PST, Jiewen Tan
no flags Details | Formatted Diff | Diff
Patch (181.67 KB, patch)
2017-03-03 20:49 PST, Jiewen Tan
bfulgham: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews116 for mac-elcapitan (1.84 MB, application/zip)
2017-03-03 22:39 PST, Build Bot
no flags Details
Patch for landing (185.46 KB, patch)
2017-03-06 16:31 PST, Jiewen Tan
no flags Details | Formatted Diff | Diff
Patch for landing (185.46 KB, patch)
2017-03-06 16:46 PST, Jiewen Tan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiewen Tan 2017-03-02 13:17:20 PST
Implement ECDH GenerateKey operation according to the spec: https://www.w3.org/TR/WebCryptoAPI/#ecdh-operations.
Comment 1 Jiewen Tan 2017-03-02 13:19:39 PST
<rdar://problem/23789585>
Comment 2 Jiewen Tan 2017-03-03 17:26:28 PST
Created attachment 303367 [details]
Patch
Comment 3 Jiewen Tan 2017-03-03 18:42:51 PST
Created attachment 303373 [details]
Patch
Comment 4 WebKit Commit Bot 2017-03-03 18:46:10 PST
Attachment 303373 [details] did not pass style-queue:


ERROR: Source/WebCore/crypto/keys/CryptoKeyEC.h:61:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/crypto/keys/CryptoKeyEC.h:62:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/crypto/CryptoKey.h:46:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/crypto/CryptoKey.h:53:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
Total errors found: 4 in 38 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Jiewen Tan 2017-03-03 20:33:01 PST
Created attachment 303379 [details]
Patch
Comment 6 WebKit Commit Bot 2017-03-03 20:36:36 PST
Attachment 303379 [details] did not pass style-queue:


ERROR: Source/WebCore/crypto/keys/CryptoKeyEC.h:61:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/crypto/keys/CryptoKeyEC.h:62:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/crypto/CryptoKey.h:46:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/crypto/CryptoKey.h:53:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
Total errors found: 4 in 38 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Jiewen Tan 2017-03-03 20:49:24 PST
Created attachment 303381 [details]
Patch
Comment 8 WebKit Commit Bot 2017-03-03 20:53:14 PST
Attachment 303381 [details] did not pass style-queue:


ERROR: Source/WebCore/crypto/keys/CryptoKeyEC.h:61:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/crypto/keys/CryptoKeyEC.h:62:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/crypto/CryptoKey.h:46:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/crypto/CryptoKey.h:53:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
Total errors found: 4 in 38 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 9 Build Bot 2017-03-03 22:39:34 PST
Comment on attachment 303381 [details]
Patch

Attachment 303381 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/3235738

New failing tests:
fast/events/media-focus-in-standalone-media-document.html
Comment 10 Build Bot 2017-03-03 22:39:37 PST
Created attachment 303385 [details]
Archive of layout-test-results from ews116 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews116  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 11 Brent Fulgham 2017-03-06 12:51:04 PST
Comment on attachment 303381 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=303381&action=review

Looks good. r=me with some comment and other clean-up.

> Source/WebCore/ChangeLog:11
> +        Note: Sad that we are not able to support P-521 at this moment since

"since the inability of the underlying crypto library." should be "due to lack of necessary support in the underlying crypto library."

Also: Is there a Radar for this we can reference in the code so we remember to turn the P-521 support on once it is available?

> Source/WebCore/ChangeLog:25
> +        We didn't add fake implementation to GTK this time as a platform key is needed.

I don't think this comment relates to "project.pbxproj", since that is a Mac/iOS-specific file.

> Source/WebCore/bindings/js/SerializedScriptValue.cpp:1212
> +            // A dummy implementation for now.

Is there a Bugzila tracking the work to implement this change? We should list it here.
Comment 12 Jiewen Tan 2017-03-06 16:03:32 PST
Comment on attachment 303381 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=303381&action=review

Thanks Brent for r+ my patch.

>> Source/WebCore/ChangeLog:11
>> +        Note: Sad that we are not able to support P-521 at this moment since
> 
> "since the inability of the underlying crypto library." should be "due to lack of necessary support in the underlying crypto library."
> 
> Also: Is there a Radar for this we can reference in the code so we remember to turn the P-521 support on once it is available?

Fixed.
Here is the bug: https://bugs.webkit.org/show_bug.cgi?id=169231

>> Source/WebCore/ChangeLog:25
>> +        We didn't add fake implementation to GTK this time as a platform key is needed.
> 
> I don't think this comment relates to "project.pbxproj", since that is a Mac/iOS-specific file.

Removed.

>> Source/WebCore/bindings/js/SerializedScriptValue.cpp:1212
>> +            // A dummy implementation for now.
> 
> Is there a Bugzila tracking the work to implement this change? We should list it here.

Here is the bug: https://bugs.webkit.org/show_bug.cgi?id=169232
Comment 13 Jiewen Tan 2017-03-06 16:31:14 PST
Created attachment 303580 [details]
Patch for landing
Comment 14 WebKit Commit Bot 2017-03-06 16:32:52 PST
Attachment 303580 [details] did not pass style-queue:


ERROR: Source/WebCore/crypto/keys/CryptoKeyEC.h:67:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/crypto/keys/CryptoKeyEC.h:68:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/crypto/CryptoKey.h:46:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/crypto/CryptoKey.h:53:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
Total errors found: 4 in 40 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 15 Jiewen Tan 2017-03-06 16:46:09 PST
Created attachment 303582 [details]
Patch for landing
Comment 16 WebKit Commit Bot 2017-03-06 16:49:13 PST
Attachment 303582 [details] did not pass style-queue:


ERROR: Source/WebCore/crypto/keys/CryptoKeyEC.h:67:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/crypto/keys/CryptoKeyEC.h:68:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/crypto/CryptoKey.h:46:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/crypto/CryptoKey.h:53:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
Total errors found: 4 in 40 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 17 WebKit Commit Bot 2017-03-06 18:57:03 PST
Comment on attachment 303582 [details]
Patch for landing

Clearing flags on attachment: 303582

Committed r213489: <http://trac.webkit.org/changeset/213489>