When running tests against the new SDitH support on main the following error occurs when attempting to parse an X509PublicKeySpec for an SDitH keyPair for any of the threshold keyPair types.
Caused by: java.security.spec.InvalidKeySpecException: incorrect algorithm OID for key: 1.3.6.1.4.1.22554.2.16.7
at org.bouncycastle.provider/org.bouncycastle.pqc.jcajce.provider.util.BaseKeyFactorySpi.checkAlgorithm(Unknown Source)
at org.bouncycastle.provider/org.bouncycastle.pqc.jcajce.provider.util.BaseKeyFactorySpi.engineGeneratePublic(Unknown Source)
at java.base/java.security.KeyFactory.generatePublic(KeyFactory.java:345)
This would appear to be caused by SDitHKeyFactorySpi only listing the hypercube OIDs for support and missing out the threshold OIDs
static
{
keyOids.add(BCObjectIdentifiers.sdith_hypercube_cat1_gf256);
keyOids.add(BCObjectIdentifiers.sdith_hypercube_cat3_gf256);
keyOids.add(BCObjectIdentifiers.sdith_hypercube_cat5_gf256);
keyOids.add(BCObjectIdentifiers.sdith_hypercube_cat1_p251);
keyOids.add(BCObjectIdentifiers.sdith_hypercube_cat3_p251);
keyOids.add(BCObjectIdentifiers.sdith_hypercube_cat5_p251);
}
When running tests against the new SDitH support on main the following error occurs when attempting to parse an X509PublicKeySpec for an SDitH keyPair for any of the threshold keyPair types.
This would appear to be caused by SDitHKeyFactorySpi only listing the hypercube OIDs for support and missing out the threshold OIDs