[GCrypt] Implement AES_KW support
Created attachment 305844 [details] Patch
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.
Created attachment 305846 [details] Patch
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.
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.
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); :(
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.
Created attachment 306071 [details] Patch for landing Still depends on bug #170271.
Created attachment 306087 [details] Patch for landing
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.
Comment on attachment 306087 [details] Patch for landing Clearing flags on attachment: 306087 Committed r214823: <http://trac.webkit.org/changeset/214823>
All reviewed patches have been landed. Closing bug.