Skip to content

Commit ee5cbaf

Browse files
author
royb
committed
fixed PrivateKeyFactory sphincs plus/slh-dsa
1 parent 5ff148f commit ee5cbaf

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

core/src/main/java/org/bouncycastle/pqc/crypto/util/PrivateKeyFactory.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,19 @@ else if (algOID.equals(PKCSObjectIdentifiers.id_alg_hss_lms_hashsig))
173173
return HSSPrivateKeyParameters.getInstance(Arrays.copyOfRange(keyEnc, 4, keyEnc.length));
174174
}
175175
}
176-
else if (algOID.on(BCObjectIdentifiers.sphincsPlus) || algOID.on(BCObjectIdentifiers.sphincsPlus_interop))
176+
else if (algOID.on(BCObjectIdentifiers.sphincsPlus) || algOID.on(BCObjectIdentifiers.sphincsPlus_interop) ||
177+
algOID.equals(NISTObjectIdentifiers.id_slh_dsa_sha2_128s) ||
178+
algOID.equals(NISTObjectIdentifiers.id_slh_dsa_sha2_128f) ||
179+
algOID.equals(NISTObjectIdentifiers.id_slh_dsa_sha2_192s) ||
180+
algOID.equals(NISTObjectIdentifiers.id_slh_dsa_sha2_192f) ||
181+
algOID.equals(NISTObjectIdentifiers.id_slh_dsa_sha2_256s) ||
182+
algOID.equals(NISTObjectIdentifiers.id_slh_dsa_sha2_256f) ||
183+
algOID.equals(NISTObjectIdentifiers.id_slh_dsa_shake_128s) ||
184+
algOID.equals(NISTObjectIdentifiers.id_slh_dsa_shake_128f) ||
185+
algOID.equals(NISTObjectIdentifiers.id_slh_dsa_shake_192s) ||
186+
algOID.equals(NISTObjectIdentifiers.id_slh_dsa_shake_192f) ||
187+
algOID.equals(NISTObjectIdentifiers.id_slh_dsa_shake_256s) ||
188+
algOID.equals(NISTObjectIdentifiers.id_slh_dsa_shake_256f))
177189
{
178190
SPHINCSPlusParameters spParams = Utils.sphincsPlusParamsLookup(algOID);
179191

0 commit comments

Comments
 (0)