WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
157175
WebCrypto API support for AES-GCM
https://bugs.webkit.org/show_bug.cgi?id=157175
Summary
WebCrypto API support for AES-GCM
Stan Vladut Angel
Reported
2016-04-29 04:33:09 PDT
Created
attachment 277692
[details]
Console error for AES-GCM generateKey method Safari lacks of support for WebCrypto.Using WebCrypto requires Chrome, Firefox or Opera on the Mac due to Safari's lack of full support for WebCrypto. Everyone is expecting from Safari to finally add support. The AES algorithm is the most used one in symmetric key crypto, but Safari doesn't support AES-GCM and many others. It should be added. No support for AES-GCM, ECDSA, ECDH, PBKDF2 at all. There is also a lack in supporting RSA-OAEP.
Attachments
Console error for AES-GCM generateKey method
(17.02 KB, image/png)
2016-04-29 04:33 PDT
,
Stan Vladut Angel
no flags
Details
Patch
(773.87 KB, patch)
2017-02-22 21:57 PST
,
Jiewen Tan
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews121 for ios-simulator-wk2
(854.83 KB, application/zip)
2017-02-22 23:16 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews103 for mac-elcapitan
(777.58 KB, application/zip)
2017-02-23 06:19 PST
,
Build Bot
no flags
Details
Patch
(773.96 KB, patch)
2017-02-23 12:16 PST
,
Jiewen Tan
bfulgham
: review+
commit-queue
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews116 for mac-elcapitan
(1.70 MB, application/zip)
2017-02-23 13:45 PST
,
Build Bot
no flags
Details
Patch for landing
(774.10 KB, patch)
2017-03-02 13:00 PST
,
Jiewen Tan
no flags
Details
Formatted Diff
Diff
Patch for landing
(774.10 KB, patch)
2017-03-02 13:51 PST
,
Jiewen Tan
no flags
Details
Formatted Diff
Diff
Patch for landing
(774.19 KB, patch)
2017-03-02 18:31 PST
,
Jiewen Tan
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
unsung_hero-97
Comment 1
2016-05-19 10:36:05 PDT
+1
Radar WebKit Bug Importer
Comment 2
2016-07-12 16:06:17 PDT
<
rdar://problem/27311691
>
Barrett Harber
Comment 3
2016-10-14 06:06:00 PDT
+1
Jiewen Tan
Comment 4
2017-01-03 14:35:19 PST
***
Bug 151125
has been marked as a duplicate of this bug. ***
Jiewen Tan
Comment 5
2017-02-22 21:57:26 PST
Created
attachment 302492
[details]
Patch
WebKit Commit Bot
Comment 6
2017-02-22 22:01:16 PST
Attachment 302492
[details]
did not pass style-queue: ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:45: usagesAreInvalidForCryptoAlgorithmAES_GCM is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:59: CryptoAlgorithmAES_GCM::create is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:64: CryptoAlgorithmAES_GCM::identifier is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:69: CryptoAlgorithmAES_GCM::encrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:96: CryptoAlgorithmAES_GCM::decrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:123: CryptoAlgorithmAES_GCM::generateKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:141: CryptoAlgorithmAES_GCM::importKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:181: CryptoAlgorithmAES_GCM::exportKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/gnutls/CryptoAlgorithmAES_GCMGnuTLS.cpp:36: CryptoAlgorithmAES_GCM::platformEncrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/gnutls/CryptoAlgorithmAES_GCMGnuTLS.cpp:41: CryptoAlgorithmAES_GCM::platformDecrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:40: encryptAES_GCM is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:53: decyptAES_GCM is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:70: CryptoAlgorithmAES_GCM::platformEncrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:93: CryptoAlgorithmAES_GCM::platformDecrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 14 in 92 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brent Fulgham
Comment 7
2017-02-22 22:14:22 PST
Looks like some compile errors under 32-bit: /Volumes/Data/EWS/WebKit/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:74:26: error: comparison of constant 549755813632 with expression of type 'size_t' (aka 'unsigned long') is always false [-Werror,-Wtautological-constant-out-of-range-compare] if (plainText.size() > PlainTextMaxLength) { ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~
Build Bot
Comment 8
2017-02-22 23:16:16 PST
Comment on
attachment 302492
[details]
Patch
Attachment 302492
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/3177058
New failing tests: scrollingcoordinator/ios/non-stable-viewport-scroll.html
Build Bot
Comment 9
2017-02-22 23:16:19 PST
Created
attachment 302497
[details]
Archive of layout-test-results from ews121 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 10
2017-02-23 06:19:27 PST
Comment on
attachment 302492
[details]
Patch
Attachment 302492
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/3178550
New failing tests: editing/spelling/spellcheck-async.html
Build Bot
Comment 11
2017-02-23 06:19:31 PST
Created
attachment 302507
[details]
Archive of layout-test-results from ews103 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Jiewen Tan
Comment 12
2017-02-23 12:16:20 PST
Created
attachment 302557
[details]
Patch
WebKit Commit Bot
Comment 13
2017-02-23 12:20:23 PST
Attachment 302557
[details]
did not pass style-queue: ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:47: usagesAreInvalidForCryptoAlgorithmAES_GCM is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:61: CryptoAlgorithmAES_GCM::create is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:66: CryptoAlgorithmAES_GCM::identifier is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:71: CryptoAlgorithmAES_GCM::encrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:100: CryptoAlgorithmAES_GCM::decrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:129: CryptoAlgorithmAES_GCM::generateKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:147: CryptoAlgorithmAES_GCM::importKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:187: CryptoAlgorithmAES_GCM::exportKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/gnutls/CryptoAlgorithmAES_GCMGnuTLS.cpp:36: CryptoAlgorithmAES_GCM::platformEncrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/gnutls/CryptoAlgorithmAES_GCMGnuTLS.cpp:41: CryptoAlgorithmAES_GCM::platformDecrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:40: encryptAES_GCM is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:53: decyptAES_GCM is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:70: CryptoAlgorithmAES_GCM::platformEncrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:93: CryptoAlgorithmAES_GCM::platformDecrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 14 in 92 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 14
2017-02-23 13:45:12 PST
Comment on
attachment 302557
[details]
Patch
Attachment 302557
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/3180761
New failing tests: media/modern-media-controls/volume-down-support/volume-down-support.html
Build Bot
Comment 15
2017-02-23 13:45:16 PST
Created
attachment 302570
[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
Brent Fulgham
Comment 16
2017-03-01 18:21:10 PST
Comment on
attachment 302557
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=302557&action=review
I'm sorry this took so long to get reviewed. The mac-debug failure looks unrelated to your change (the bot was in a bad state). Please commit.
> LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_gcm.worker-expected.txt:331 > +PASS AES-GCM 256-bit key, illegal tag length 256-bits decryption
Hooray!
> LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/encrypt_decrypt/test_aes_gcm-expected.txt:333 > +PASS AES-GCM 256-bit key, illegal tag length 256-bits decryption
Excellent!
WebKit Commit Bot
Comment 17
2017-03-01 18:24:40 PST
Comment on
attachment 302557
[details]
Patch Rejecting
attachment 302557
[details]
from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'apply-attachment', '--no-update', '--non-interactive', 302557, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: s/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_successes_AES-GCM-expected.txt patching file LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/symmetric_importKey.worker-expected.txt patching file LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/test_symmetric_importKey-expected.txt Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', u'Brent Fulgham']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Full output:
http://webkit-queues.webkit.org/results/3219298
Jiewen Tan
Comment 18
2017-03-02 13:00:30 PST
Created
attachment 303227
[details]
Patch for landing
Jiewen Tan
Comment 19
2017-03-02 13:01:47 PST
Comment on
attachment 302557
[details]
Patch Thanks Brent for r+ my patch.
WebKit Commit Bot
Comment 20
2017-03-02 13:02:53 PST
Attachment 303227
[details]
did not pass style-queue: ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:47: usagesAreInvalidForCryptoAlgorithmAES_GCM is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:61: CryptoAlgorithmAES_GCM::create is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:66: CryptoAlgorithmAES_GCM::identifier is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:71: CryptoAlgorithmAES_GCM::encrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:100: CryptoAlgorithmAES_GCM::decrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:129: CryptoAlgorithmAES_GCM::generateKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:147: CryptoAlgorithmAES_GCM::importKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:187: CryptoAlgorithmAES_GCM::exportKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/gnutls/CryptoAlgorithmAES_GCMGnuTLS.cpp:36: CryptoAlgorithmAES_GCM::platformEncrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/gnutls/CryptoAlgorithmAES_GCMGnuTLS.cpp:41: CryptoAlgorithmAES_GCM::platformDecrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:40: encryptAES_GCM is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:53: decyptAES_GCM is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:70: CryptoAlgorithmAES_GCM::platformEncrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:93: CryptoAlgorithmAES_GCM::platformDecrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 14 in 92 files If any of these errors are false positives, please file a bug against check-webkit-style.
Jiewen Tan
Comment 21
2017-03-02 13:51:18 PST
Created
attachment 303234
[details]
Patch for landing
Jiewen Tan
Comment 22
2017-03-02 13:55:01 PST
Committed
r213301
: <
http://trac.webkit.org/changeset/213301
>
Ryan Haddad
Comment 23
2017-03-02 16:01:49 PST
This change broke internal builds. Rolled out in
http://trac.webkit.org/projects/webkit/changeset/213320
Jiewen Tan
Comment 24
2017-03-02 18:31:39 PST
Created
attachment 303284
[details]
Patch for landing
WebKit Commit Bot
Comment 25
2017-03-02 18:35:20 PST
Attachment 303284
[details]
did not pass style-queue: ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:47: usagesAreInvalidForCryptoAlgorithmAES_GCM is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:61: CryptoAlgorithmAES_GCM::create is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:66: CryptoAlgorithmAES_GCM::identifier is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:71: CryptoAlgorithmAES_GCM::encrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:100: CryptoAlgorithmAES_GCM::decrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:129: CryptoAlgorithmAES_GCM::generateKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:147: CryptoAlgorithmAES_GCM::importKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:187: CryptoAlgorithmAES_GCM::exportKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/gnutls/CryptoAlgorithmAES_GCMGnuTLS.cpp:36: CryptoAlgorithmAES_GCM::platformEncrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/gnutls/CryptoAlgorithmAES_GCMGnuTLS.cpp:41: CryptoAlgorithmAES_GCM::platformDecrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:40: encryptAES_GCM is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:54: decyptAES_GCM is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:71: CryptoAlgorithmAES_GCM::platformEncrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:94: CryptoAlgorithmAES_GCM::platformDecrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 14 in 92 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 26
2017-03-02 20:23:11 PST
Comment on
attachment 303284
[details]
Patch for landing Clearing flags on attachment: 303284 Committed
r213345
: <
http://trac.webkit.org/changeset/213345
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug