[Webkit-unassigned] [Bug 207174] Add WebCrypto LayoutTests to check if PKCS#7 padding is correctly implemented in AES-CBC
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Feb 5 11:44:53 PST 2020
https://bugs.webkit.org/show_bug.cgi?id=207174
--- Comment #7 from Jiewen Tan <jiewen_tan at apple.com> ---
(In reply to Tomoki Imai from comment #4)
> (In reply to Tomoki Imai from comment #3)
>
> > Actually we had a bug in calculating the encrypted data length when the
> > length % 8 == 0, and the case was not covered by the current LayoutTest. bug
> > 207176
>
> Correction: length % 16 == 0.
> When the length % 16 == 0, we need to add 16 bytes for padding, but our
> first implementation didn't add any padding, but passed all the LayoutTest.
> https://en.wikipedia.org/wiki/Padding_(cryptography)#PKCS%235_and_PKCS%237
You could modify the existing test to have the plain text that has a length of multiple of 16 in your other patch. Then the original test is then sufficient enough.
--
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/20200205/db9ad976/attachment-0001.htm>
More information about the webkit-unassigned
mailing list