|
Bouncy Castle Cryptography Library 1.87 | |||||||||
| 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.RawPublicKeyEncodingTest
NTRU, Dilithium and BIKE public keys are written raw into the SubjectPublicKeyInfo BIT STRING, and the draft form that wrapped them in an OCTET STRING is still read. A raw key is random bytes, so it can begin with bytes that read as an OCTET STRING header whose length covers exactly the rest - about once in 2^32 keys - and must still be read as the raw key: such an NTRU key used to be rejected, and such a Dilithium or BIKE key loaded as a different, shorter key. The prefix is forced onto real keys here; none of the three binds its public key bytes to anything a decoder checks.
| Constructor Summary | |
RawPublicKeyEncodingTest()
|
|
| Method Summary | |
void |
testBIKE()
|
void |
testDilithium()
|
void |
testNTRU()
|
| 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 RawPublicKeyEncodingTest()
| Method Detail |
public void testNTRU()
throws java.lang.Exception
java.lang.Exception
public void testDilithium()
throws java.lang.Exception
java.lang.Exception
public void testBIKE()
throws java.lang.Exception
java.lang.Exception
|
Bouncy Castle Cryptography Library 1.87 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||