RESOLVED FIXED 170274
[GCrypt] Implement AES_KW support
https://bugs.webkit.org/show_bug.cgi?id=170274
Summary [GCrypt] Implement AES_KW support
Zan Dobersek
Reported 2017-03-30 00:10:29 PDT
[GCrypt] Implement AES_KW support
Attachments
Patch (5.26 KB, patch)
2017-03-30 00:13 PDT, Zan Dobersek
no flags
Patch (5.55 KB, patch)
2017-03-30 00:29 PDT, Zan Dobersek
no flags
Patch for landing (5.72 KB, patch)
2017-04-03 03:59 PDT, Zan Dobersek
no flags
Patch for landing (5.79 KB, patch)
2017-04-03 11:19 PDT, Zan Dobersek
no flags
Zan Dobersek
Comment 1 2017-03-30 00:13:31 PDT
Build Bot
Comment 2 2017-03-30 00:15:11 PDT
Attachment 305844 [details] did not pass style-queue: ERROR: Source/WebCore/crypto/gcrypt/CryptoAlgorithmAES_KWGCrypt.cpp:109: CryptoAlgorithmAES_KW::platformWrapKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/gcrypt/CryptoAlgorithmAES_KWGCrypt.cpp:121: CryptoAlgorithmAES_KW::platformUnwrapKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 2 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Zan Dobersek
Comment 3 2017-03-30 00:29:10 PDT
Build Bot
Comment 4 2017-03-30 00:31:07 PDT
Attachment 305846 [details] did not pass style-queue: ERROR: Source/WebCore/crypto/gcrypt/CryptoAlgorithmAES_KWGCrypt.cpp:110: CryptoAlgorithmAES_KW::platformWrapKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/gcrypt/CryptoAlgorithmAES_KWGCrypt.cpp:122: CryptoAlgorithmAES_KW::platformUnwrapKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 2 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Zan Dobersek
Comment 5 2017-03-30 00:44:37 PDT
Depends on the Utilities.h header that's being added in bug #170269, as well as the HandleDeleter<gcry_cipher_hd_t> specialization that's being added in bug #170271.
Michael Catanzaro
Comment 6 2017-04-01 18:06:31 PDT
Comment on attachment 305846 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=305846&action=review > Source/WebCore/crypto/gcrypt/CryptoAlgorithmAES_KWGCrypt.cpp:36 > +#include <pal/crypto/gcrypt/Handle.h> > +#include <pal/crypto/gcrypt/Utilities.h> :( > Source/WebCore/crypto/gcrypt/CryptoAlgorithmAES_KWGCrypt.cpp:65 > + Vector<uint8_t> output(data.size() + 8); Correct, but it needs a short comment to explain the + 8 (e.g. "On encryption the provided output buffer must be 64 bit (8 byte) larger than the input buffer" from https://www.gnupg.org/documentation/manuals/gcrypt/Available-cipher-modes.html). > Source/WebCore/crypto/gcrypt/CryptoAlgorithmAES_KWGCrypt.cpp:72 > + return WTFMove(output); :( > Source/WebCore/crypto/gcrypt/CryptoAlgorithmAES_KWGCrypt.cpp:100 > + Vector<uint8_t> output(data.size() - 8); Comment > Source/WebCore/crypto/gcrypt/CryptoAlgorithmAES_KWGCrypt.cpp:107 > + return WTFMove(output); :(
Zan Dobersek
Comment 7 2017-04-02 23:58:20 PDT
Comment on attachment 305846 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=305846&action=review >> Source/WebCore/crypto/gcrypt/CryptoAlgorithmAES_KWGCrypt.cpp:65 >> + Vector<uint8_t> output(data.size() + 8); > > Correct, but it needs a short comment to explain the + 8 (e.g. "On encryption the provided output buffer must be 64 bit (8 byte) larger than the input buffer" from https://www.gnupg.org/documentation/manuals/gcrypt/Available-cipher-modes.html). OK. >> Source/WebCore/crypto/gcrypt/CryptoAlgorithmAES_KWGCrypt.cpp:100 >> + Vector<uint8_t> output(data.size() - 8); > > Comment OK.
Zan Dobersek
Comment 8 2017-04-03 03:59:51 PDT
Created attachment 306071 [details] Patch for landing Still depends on bug #170271.
Zan Dobersek
Comment 9 2017-04-03 11:19:03 PDT
Created attachment 306087 [details] Patch for landing
Build Bot
Comment 10 2017-04-03 11:20:25 PDT
Attachment 306087 [details] did not pass style-queue: ERROR: Source/WebCore/crypto/gcrypt/CryptoAlgorithmAES_KWGCrypt.cpp:112: CryptoAlgorithmAES_KW::platformWrapKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/gcrypt/CryptoAlgorithmAES_KWGCrypt.cpp:124: CryptoAlgorithmAES_KW::platformUnwrapKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 2 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Zan Dobersek
Comment 11 2017-04-03 11:36:10 PDT
Comment on attachment 306087 [details] Patch for landing Clearing flags on attachment: 306087 Committed r214823: <http://trac.webkit.org/changeset/214823>
Zan Dobersek
Comment 12 2017-04-03 11:36:24 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.