[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:33:33 PST 2020


https://bugs.webkit.org/show_bug.cgi?id=207174

--- Comment #5 from Jiewen Tan <jiewen_tan at apple.com> ---
(In reply to Tomoki Imai from comment #3)
> (In reply to Jiewen Tan from comment #2)
> > Not sure why this is needed? You have to implement PKCS#7 yourself?
> 
> I think we need this to validate all the padding is done as expected, and
> our usage of underlying libraries like CommonCrypt, GCrypt, OpenSSL are
> correct.

I don't buy that. Just like you don't write tests to validate WTF before you use stuffs from WTF. And I believe if you don't use PKCS#7, the existing tests won't pass.

> 
> For OpenSSL backend, we don't have to implement PKCS#7 by ourselves, but we
> need to setup enough memory for encrypted/decrypted data, which may contains
> PKCS#7 padding.
> 
> 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

Then maybe you should write a test in that patch to help you validate your implementation instead of adding new tests like these here.

-- 
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/1aaf9a7a/attachment-0001.htm>


More information about the webkit-unassigned mailing list