public class PqcUnmappedAlgorithmOidTest
extends junit.framework.TestCase
PrivateKeyFactory /
PublicKeyFactory.
The private-key dispatch used to select a branch with algOID.on(<arc>), a subtree
test that matches every leaf below the arc — including leaves that have no entry in the
matching Utils.*Params table. The branch then passed the null lookup result
straight into a *PrivateKeyParameters constructor, so a PKCS#8 blob naming such an OID
escaped createKey with a NullPointerException (or, where the constructor merely
stores the parameters, returned a key object carrying null parameters that failed later,
far from the parse). Both are wrong for a method whose contract is throws IOException.
The concrete reported case is the OQS interop arc 1.3.9999.6, which carries 16 hybrid
(ECDSA-P256 / RSA-3072 / P-384 / P-521 combined with SPHINCS+) OIDs that are declared in
BCObjectIdentifiers but deliberately not implemented — e.g.
p256_sphincs_sha2_128f_simple = 1.3.9999.6.4.14.
| Constructor and Description |
|---|
PqcUnmappedAlgorithmOidTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
testDeclaredOidsUnderDispatchArcsStillDispatch()
Compatibility assertion and drift guard in one.
|
void |
testOqsHybridP256Sphincs128fPrivateKeyRejected()
The reported case: a PKCS#8 PrivateKeyInfo tagged with the OQS hybrid OID 1.3.9999.6.4.14
used to leave createKey as a NullPointerException.
|
void |
testOqsHybridPrivateKeysRejected()
All 16 OQS hybrid OIDs, over every private-key body shape.
|
void |
testOqsInteropArcRealKeyStillRoundTrips()
End-to-end compatibility on the arc that carries the reported hybrids: a real SPHINCS+ key
whose OID (1.3.9999.6.4.13) is a sibling leaf of 1.3.9999.6.4.14 must still round-trip.
|
void |
testUnbackedPublicKeyRegistrationsRejected()
Public-key side.
|
void |
testUndeclaredLeafUnderEachDispatchArcRejected()
The general form: an undeclared leaf under each arc the dispatch used to accept wholesale.
|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, tearDown, toStringpublic void testOqsHybridP256Sphincs128fPrivateKeyRejected()
throws java.lang.Exception
java.lang.Exceptionpublic void testOqsHybridPrivateKeysRejected()
throws java.lang.Exception
java.lang.Exceptionpublic void testUndeclaredLeafUnderEachDispatchArcRejected()
throws java.lang.Exception
java.lang.Exceptionpublic void testUnbackedPublicKeyRegistrationsRejected()
throws java.lang.Exception
java.lang.Exceptionpublic void testDeclaredOidsUnderDispatchArcsStillDispatch()
throws java.lang.Exception
java.lang.Exceptionpublic void testOqsInteropArcRealKeyStillRoundTrips()
throws java.lang.Exception
java.lang.Exception