[Webkit-unassigned] [Bug 208186] [OpenSSL] Implement WebCrypto APIs for AES-CTR and AES-KW
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Mar 1 22:22:30 PST 2020
https://bugs.webkit.org/show_bug.cgi?id=208186
--- Comment #3 from Yoshiaki Jitsukawa <yoshiaki.jitsukawa at sony.com> ---
Comment on attachment 391641
--> https://bugs.webkit.org/attachment.cgi?id=391641
patch
View in context: https://bugs.webkit.org/attachment.cgi?id=391641&action=review
> Source/WebCore/crypto/openssl/CryptoAlgorithmAES_CTROpenSSL.cpp:66
> + // Disable padding
Do we need to explicitly disable padding in CTR mode?
> Source/WebCore/crypto/openssl/CryptoAlgorithmAES_CTROpenSSL.cpp:70
> + size_t blocks = inputText.size() / blockSize + 1;
Is there any particular reason why you don't use roundUpToMultipleOf() like other AES variants?
e.g. const size_t blocks= roundUpToMultipleOf(blockSize, plainSize) / blockSize
> Source/WebCore/crypto/openssl/CryptoAlgorithmAES_CTROpenSSL.cpp:73
> + if (counterLength < sizeof(size_t) * 8 && blocks > ((size_t) 1 << counterLength))
Could you remove the space between "(size_t)" and "1"?
> Source/WebCore/crypto/openssl/CryptoAlgorithmAES_CTROpenSSL.cpp:86
> + Vector<uint8_t> outputText(headSize);
outputText should be reserved and used both in first and second parts to avoid reallocation.
> Source/WebCore/crypto/openssl/CryptoAlgorithmAES_CTROpenSSL.cpp:102
> + {
Could you early skip the second part by doing condition check like:
if (capacity < block)
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200302/be78d461/attachment-0001.htm>
More information about the webkit-unassigned
mailing list