Summary: | WebCrypto API support for AES-GCM | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Stan Vladut Angel <stanvladut> | ||||||||||||||||||||
Component: | WebCore Misc. | Assignee: | Jiewen Tan <jiewen_tan> | ||||||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||||||
Severity: | Major | CC: | ap, barrett.harber+webkit, bfulgham, buildbot, commit-queue, jiewen_tan, rniwa, rob, roustem, ryanhaddad, unsung_hero-97, webkit-bug-importer | ||||||||||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||||||||||
Hardware: | Mac | ||||||||||||||||||||||
OS: | OS X 10.11 | ||||||||||||||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=151125 | ||||||||||||||||||||||
Bug Depends on: | 160880 | ||||||||||||||||||||||
Bug Blocks: | 166746 | ||||||||||||||||||||||
Attachments: |
|
+1 +1 *** Bug 151125 has been marked as a duplicate of this bug. *** Created attachment 302492 [details]
Patch
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.
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) { ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~ 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 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
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 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
Created attachment 302557 [details]
Patch
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.
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 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
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! 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 Created attachment 303227 [details]
Patch for landing
Comment on attachment 302557 [details]
Patch
Thanks Brent for r+ my patch.
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.
Created attachment 303234 [details]
Patch for landing
Committed r213301: <http://trac.webkit.org/changeset/213301> This change broke internal builds. Rolled out in http://trac.webkit.org/projects/webkit/changeset/213320 Created attachment 303284 [details]
Patch for landing
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.
Comment on attachment 303284 [details] Patch for landing Clearing flags on attachment: 303284 Committed r213345: <http://trac.webkit.org/changeset/213345> |
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.