public class PqcSignatureEncodingTest
extends junit.framework.TestCase
crypto_sign "sm" signed-message envelope from
generateSignature() - the signature with the message concatenated to it - and
to verify a buffer that merely started (for AIMer, ended) with a good
signature, ignoring whatever else it carried. That made the encoding
non-unique: given one valid signature, unlimited distinct byte strings
verified for the same message and key.
So for each scheme this asserts that what is produced is exactly the parameter set's signature and that nothing else verifies - in particular the envelope the scheme used to emit, which is the shape a caller would still have lying around from an earlier release.
One parameter set per scheme: this is about the encoding, which the parameter set does not vary, and SQIsign key generation is expensive.
| Constructor and Description |
|---|
PqcSignatureEncodingTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
testAIMer() |
void |
testMayo() |
void |
testQRUOV() |
void |
testQRUOVSignatureMustBeCanonical()
QR-UOV stores each F_q element in ceil(log2 q) bits, one more bit pattern than the field has
elements: q itself is representable and is congruent to zero, so every zero element of a
signature had a second encoding that verified.
|
void |
testSnova() |
void |
testSnovaUnusedNibbleMustBeZero()
Requiring the signature to be exactly the right length pins down what follows it, but not
bits inside it that the decoder never reads.
|
void |
testSQIsign() |
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 testMayo()
public void testSnova()
public void testQRUOV()
public void testSQIsign()
public void testAIMer()
public void testSnovaUnusedNibbleMustBeZero()
public void testQRUOVSignatureMustBeCanonical()