Bouncy Castle Cryptography Library 1.87

org.bouncycastle.pqc.crypto.test
Class MLDSAWycheproofTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.bouncycastle.pqc.crypto.test.MLDSAWycheproofTest
All Implemented Interfaces:
junit.framework.Test

public class MLDSAWycheproofTest
extends junit.framework.TestCase

ML-DSA signature verification against the Project Wycheproof vectors in crypto/wycheproof/mldsa_<n>_verify_test.json.

These complement the ACVP and NIST KAT batteries driven from MLDSATest: where those confirm the specified paths, the majority of these cases are invalid by construction - signatures violating the infinity norm bound, malformed hint encodings, wrong-length keys and signatures, zero public keys and out-of-range contexts - and the point of them is that verification says no.

A verifier is allowed to reject at any stage, so a case the file marks invalid passes here whether the key is refused when it is constructed, the signer refuses it at init, or verification returns false. A case marked valid has to construct, initialise and verify cleanly.


Constructor Summary
MLDSAWycheproofTest()
           
 
Method Summary
 void testMLDSA44Verify()
           
 void testMLDSA65Verify()
           
 void testMLDSA87Verify()
           
 
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

MLDSAWycheproofTest

public MLDSAWycheproofTest()
Method Detail

testMLDSA44Verify

public void testMLDSA44Verify()
                       throws java.lang.Exception
Throws:
java.lang.Exception

testMLDSA65Verify

public void testMLDSA65Verify()
                       throws java.lang.Exception
Throws:
java.lang.Exception

testMLDSA87Verify

public void testMLDSA87Verify()
                       throws java.lang.Exception
Throws:
java.lang.Exception

Bouncy Castle Cryptography Library 1.87