public class MLDSATest
extends junit.framework.TestCase
| Constructor and Description |
|---|
MLDSATest() |
| Modifier and Type | Method and Description |
|---|---|
void |
testCalculateMuVerify() |
void |
testComponentLengthChecks() |
void |
testConsistency() |
void |
testExpandedPrivateKeyTrConsistency() |
void |
testHashExternalMu() |
void |
testHashQuickBrownFox() |
void |
testKeyGen() |
void |
testKeyGenCombinedVectorSet() |
void |
testMLDSARejection() |
void |
testPreferredFormatCopyIsIndependent() |
void |
testPrivateKeyEmbeddedPublicKeyConsistency() |
void |
testPrivateKeyInfoChoiceArms()
RFC 9881 sec. 6: the privateKey is CHOICE { seed [0] OCTET STRING (SIZE (32)), expandedKey OCTET STRING,
both SEQUENCE { seed, expandedKey } } and the tag says which arm is present.
|
void |
testPrivateKeyRejectsMalformedLength() |
void |
testQuickBrownFox() |
void |
testRawExpandedKeyThatReadsAsDer()
A raw expanded key is random content, so it can begin with bytes that read as a tag and a length exactly
covering the rest - about once in 2^24 keys - and must still be read as the raw expanded key. tr binds rho,
so the prefix cannot be forced onto an ML-DSA key: this seed was found by search, and its rho begins
77 82 09 fc, a tag and the length 2556 that covers the other bytes of an ML-DSA-44 expanded key exactly.
|
void |
testRNG() |
void |
testSigGen() |
void |
testSigGenCombinedVectorSet() |
void |
testSigVer() |
void |
testSigVerCombinedVectorSet() |
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 testPreferredFormatCopyIsIndependent()
public void testConsistency()
throws java.lang.Exception
java.lang.Exceptionpublic void testKeyGen()
throws java.io.IOException
java.io.IOExceptionpublic void testSigGen()
throws java.io.IOException
java.io.IOExceptionpublic void testSigVer()
throws java.io.IOException
java.io.IOExceptionpublic void testRNG()
public void testKeyGenCombinedVectorSet()
throws java.io.IOException
java.io.IOExceptionpublic void testSigGenCombinedVectorSet()
throws java.io.IOException
java.io.IOExceptionpublic void testSigVerCombinedVectorSet()
throws java.io.IOException
java.io.IOExceptionpublic void testQuickBrownFox()
throws java.lang.Exception
java.lang.Exceptionpublic void testHashQuickBrownFox()
throws java.lang.Exception
java.lang.Exceptionpublic void testHashExternalMu()
throws java.lang.Exception
java.lang.Exceptionpublic void testCalculateMuVerify()
throws java.lang.Exception
java.lang.Exceptionpublic void testMLDSARejection()
throws java.lang.Exception
java.lang.Exceptionpublic void testPrivateKeyRejectsMalformedLength()
public void testComponentLengthChecks()
throws java.lang.Exception
java.lang.Exceptionpublic void testPrivateKeyEmbeddedPublicKeyConsistency()
throws java.lang.Exception
java.lang.Exceptionpublic void testPrivateKeyInfoChoiceArms()
throws java.lang.Exception
java.lang.Exceptionpublic void testRawExpandedKeyThatReadsAsDer()
throws java.lang.Exception
java.lang.Exceptionpublic void testExpandedPrivateKeyTrConsistency()
throws java.lang.Exception
java.lang.Exception