|
Bouncy Castle Cryptography Library 1.86 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.bouncycastle.pqc.crypto.test.PqcUnmappedAlgorithmOidTest
Regression tests for the algorithm-identifier dispatch in the PQC PrivateKeyFactory /
PublicKeyFactory.
The private-key dispatch used to select a branch with , a subtree
test that matches every leaf below the arc — including leaves that have no entry in the
matching table. The branch then passed the lookup result
straight into a constructor, so a PKCS#8 blob naming such an OID
escaped with a NullPointerException (or, where the constructor merely
stores the parameters, returned a key object carrying parameters that failed later,
far from the parse). Both are wrong for a method whose contract is .
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.
= 1.3.9999.6.4.14.
| Constructor Summary | |
PqcUnmappedAlgorithmOidTest()
|
|
| Method Summary | |
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. |
| Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString |
| Methods inherited from class junit.framework.Assert |
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, fail, fail |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public PqcUnmappedAlgorithmOidTest()
| Method Detail |
public void testOqsHybridP256Sphincs128fPrivateKeyRejected()
throws java.lang.Exception
java.lang.Exception
public void testOqsHybridPrivateKeysRejected()
throws java.lang.Exception
java.lang.Exception
public void testUndeclaredLeafUnderEachDispatchArcRejected()
throws java.lang.Exception
java.lang.Exception
public void testUnbackedPublicKeyRegistrationsRejected()
throws java.lang.Exception
java.lang.Exception
public void testDeclaredOidsUnderDispatchArcsStillDispatch()
throws java.lang.Exception
java.lang.Exception
public void testOqsInteropArcRealKeyStillRoundTrips()
throws java.lang.Exception
java.lang.Exception
|
Bouncy Castle Cryptography Library 1.86 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||