Skip to content

Commit 29ced27

Browse files
committed
fixed SLHDSA naming
1 parent 0093c0c commit 29ced27

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

prov/src/main/java/org/bouncycastle/jcajce/spec/SLHDSAParameterSpec.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ public class SLHDSAParameterSpec
7171
parameters.put("sha2-256f", SLHDSAParameterSpec.slh_dsa_sha2_256f);
7272
parameters.put("sha2-256s", SLHDSAParameterSpec.slh_dsa_sha2_256s);
7373

74-
parameters.put("slh-dsa-sha2-128f", SLHDSAParameterSpec.slh_dsa_shake_128f);
75-
parameters.put("slh-dsa-sha2-128s", SLHDSAParameterSpec.slh_dsa_shake_128s);
76-
parameters.put("slh-dsa-sha2-192f", SLHDSAParameterSpec.slh_dsa_shake_192f);
77-
parameters.put("slh-dsa-sha2-192s", SLHDSAParameterSpec.slh_dsa_shake_192s);
78-
parameters.put("slh-dsa-sha2-256f", SLHDSAParameterSpec.slh_dsa_shake_256f);
79-
parameters.put("slh-dsa-sha2-256s", SLHDSAParameterSpec.slh_dsa_shake_256s);
74+
parameters.put("slh-dsa-shake-128f", SLHDSAParameterSpec.slh_dsa_shake_128f);
75+
parameters.put("slh-dsa-shake-128s", SLHDSAParameterSpec.slh_dsa_shake_128s);
76+
parameters.put("slh-dsa-shake-192f", SLHDSAParameterSpec.slh_dsa_shake_192f);
77+
parameters.put("slh-dsa-shake-192s", SLHDSAParameterSpec.slh_dsa_shake_192s);
78+
parameters.put("slh-dsa-shake-256f", SLHDSAParameterSpec.slh_dsa_shake_256f);
79+
parameters.put("slh-dsa-shake-256s", SLHDSAParameterSpec.slh_dsa_shake_256s);
8080

8181
parameters.put("shake-128f", SLHDSAParameterSpec.slh_dsa_shake_128f);
8282
parameters.put("shake-128s", SLHDSAParameterSpec.slh_dsa_shake_128s);
@@ -99,12 +99,12 @@ public class SLHDSAParameterSpec
9999
parameters.put("sha2-256f-with-sha512", SLHDSAParameterSpec.slh_dsa_sha2_256f_with_sha512);
100100
parameters.put("sha2-256s-with-sha512", SLHDSAParameterSpec.slh_dsa_sha2_256s_with_sha512);
101101

102-
parameters.put("slh-dsashake-128f-with-shake128", SLHDSAParameterSpec.slh_dsa_shake_128f_with_shake128);
103-
parameters.put("slh-dsashake-128s-with-shake128", SLHDSAParameterSpec.slh_dsa_shake_128s_with_shake128);
104-
parameters.put("slh-dsashake-192f-with-shake256", SLHDSAParameterSpec.slh_dsa_shake_192f_with_shake256);
105-
parameters.put("slh-dsashake-192s-with-shake256", SLHDSAParameterSpec.slh_dsa_shake_192s_with_shake256);
106-
parameters.put("slh-dsashake-256f-with-shake256", SLHDSAParameterSpec.slh_dsa_shake_256f_with_shake256);
107-
parameters.put("slh-dsashake-256s-with-shake256", SLHDSAParameterSpec.slh_dsa_shake_256s_with_shake256);
102+
parameters.put("slh-dsa-shake-128f-with-shake128", SLHDSAParameterSpec.slh_dsa_shake_128f_with_shake128);
103+
parameters.put("slh-dsa-shake-128s-with-shake128", SLHDSAParameterSpec.slh_dsa_shake_128s_with_shake128);
104+
parameters.put("slh-dsa-shake-192f-with-shake256", SLHDSAParameterSpec.slh_dsa_shake_192f_with_shake256);
105+
parameters.put("slh-dsa-shake-192s-with-shake256", SLHDSAParameterSpec.slh_dsa_shake_192s_with_shake256);
106+
parameters.put("slh-dsa-shake-256f-with-shake256", SLHDSAParameterSpec.slh_dsa_shake_256f_with_shake256);
107+
parameters.put("slh-dsa-shake-256s-with-shake256", SLHDSAParameterSpec.slh_dsa_shake_256s_with_shake256);
108108

109109
parameters.put("shake-128f-with-shake128", SLHDSAParameterSpec.slh_dsa_shake_128f_with_shake128);
110110
parameters.put("shake-128s-with-shake128", SLHDSAParameterSpec.slh_dsa_shake_128s_with_shake128);

prov/src/test/java/org/bouncycastle/pqc/jcajce/provider/test/SLHDSATest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ public void testKeyFactory()
8080
"SLH-DSA-SHAKE-256S-WITH-SHAKE256",
8181
};
8282

83+
for (int i = 0; i != names.length; i++)
84+
{
85+
assertEquals(names[i], SLHDSAParameterSpec.fromName(names[i]).getName());
86+
}
87+
8388
ASN1ObjectIdentifier[] oids = new ASN1ObjectIdentifier[] {
8489
NISTObjectIdentifiers.id_slh_dsa_sha2_128f,
8590
NISTObjectIdentifiers.id_slh_dsa_sha2_128s,

0 commit comments

Comments
 (0)