mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8345533: Switch ML-DSA implementation to FIPS 204 final
Reviewed-by: bperez, jnimeh
This commit is contained in:
parent
63d095169a
commit
fb95a53944
3 changed files with 8 additions and 1 deletions
|
@ -41,7 +41,7 @@ public class ML_DSA_Impls {
|
|||
// set the version to an older one. The following VM option is required:
|
||||
//
|
||||
// --add-exports java.base/sun.security.provider=ALL-UNNAMED
|
||||
public static Version version = Version.DRAFT;
|
||||
public static Version version = Version.FINAL;
|
||||
|
||||
static int name2int(String name) {
|
||||
if (name.endsWith("44")) {
|
||||
|
|
|
@ -32,6 +32,7 @@ import java.security.Security;
|
|||
* @test
|
||||
* @bug 8342442 8345057
|
||||
* @library /test/lib
|
||||
* @modules java.base/sun.security.provider
|
||||
*/
|
||||
|
||||
/// This test runs on `internalProjection.json`-style files generated
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
import jdk.test.lib.Asserts;
|
||||
import jdk.test.lib.json.JSONValue;
|
||||
import jdk.test.lib.security.FixedSecureRandom;
|
||||
import sun.security.provider.ML_DSA_Impls;
|
||||
|
||||
import java.security.*;
|
||||
import java.security.spec.EncodedKeySpec;
|
||||
|
@ -34,6 +35,11 @@ import static jdk.test.lib.Utils.toByteArray;
|
|||
public class ML_DSA_Test {
|
||||
|
||||
public static void run(JSONValue kat, Provider provider) throws Exception {
|
||||
|
||||
// We only have ML-DSA test for internal functions, which
|
||||
// is equivalent to the FIP 204 draft.
|
||||
ML_DSA_Impls.version = ML_DSA_Impls.Version.DRAFT;
|
||||
|
||||
var mode = kat.get("mode").asString();
|
||||
switch (mode) {
|
||||
case "keyGen" -> keyGenTest(kat, provider);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue