RFR: 8286428: AlgorithmId should understand PBES2

Valerie Peng valeriep at openjdk.java.net
Wed May 11 00:20:47 UTC 2022


On Mon, 9 May 2022 21:44:10 GMT, Weijun Wang <weijun at openjdk.org> wrote:

> `AlgorithmId.getName` is updated for PBES2 algorithm identifiers so it directly returns the standard algorithm defined by Java (Ex: `PBEWithHmacSHA256AndAES_256`), instead of a simple "PBES2".
> 
> Please note I specifically update the javadoc for this method to clarify that this name is meant to be a name that's recognized by various `getInstance()` methods. This is how we are actually using this method.
> 
> After this change, the `javax.crypto.EncryptedPrivateKeyInfo` API automatically works with PBES2 encrypted data. As the spec of its `getAlgName()` methods says, "Standard name is returned". This is shown by the newly include regression test.
> 
> Existing security-related tests run fine.

Marked as reviewed by valeriep (Reviewer).

Changes looks fine.

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

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



More information about the security-dev mailing list