RFR: 8255410: Add ChaCha20 and Poly1305 support to SunPKCS11 provider [v3]

Valerie Peng valeriep at openjdk.java.net
Fri Apr 23 00:01:24 UTC 2021


On Thu, 15 Apr 2021 10:27:25 GMT, Sibabrata Sahoo <ssahoo at openjdk.org> wrote:

>> Valerie Peng has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fixed an tagLen issue, no key+iv reuse check for decryption, and add regression test for ChaCha20 SKF.
>
> test/jdk/sun/security/pkcs11/Cipher/TestChaChaPoly.java line 1:
> 
>> 1: /*
> 
> There is no compatibility Test exist between SunJCE and SunPKCS11 providers. Do we need one here.

Theoretically, these new regression tests are mostly adapted from the ChaCha20-Poly1305 cipher tests of existing SunJCE provider. The test vectors are also the same, so the compatibility is tested indirectly. 
I have added a testInterop() method which uses one for encryption and the other for decryption and vice versa, just to be safe. If there are specific scenarios which I missed, please let me know and I will add it.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3420



More information about the security-dev mailing list