Bouncy Castle Cryptography Library 1.86

org.bouncycastle.crypto.test
Class SM9SignerTest

java.lang.Object
  extended byorg.bouncycastle.util.test.SimpleTest
      extended byorg.bouncycastle.crypto.test.SM9SignerTest
All Implemented Interfaces:
Test

public class SM9SignerTest
extends SimpleTest

Known-answer test for the SM9 digital signature algorithm (GM/T 0044.2-2016) against the GM/T 0044.5-2016 Annex A vector (crypto/sm9/sm9_signature.txt): the signature components h and S are reproduced byte-for-byte, verification accepts, and a tampered message is rejected. Also checks a zero-length message signs and verifies (the signer's l = 0 retry is a scalar test, so - unlike the SM9 stream cipher's K1 check - an empty message is well-defined).


Nested Class Summary
 
Nested classes inherited from class org.bouncycastle.util.test.SimpleTest
SimpleTest.TestExceptionOperation
 
Constructor Summary
SM9SignerTest()
           
 
Method Summary
 java.lang.String getName()
           
static void main(java.lang.String[] args)
           
 void performTest()
           
 
Methods inherited from class org.bouncycastle.util.test.SimpleTest
areEqual, areEqual, areEqual, fail, fail, fail, isEquals, isEquals, isEquals, isEquals, isEquals, isEquals, isEquals, isTrue, isTrue, perform, runTest, runTest, runTests, runTests, testException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SM9SignerTest

public SM9SignerTest()
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface Test
Specified by:
getName in class SimpleTest

performTest

public void performTest()
                 throws java.lang.Exception
Specified by:
performTest in class SimpleTest
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)

Bouncy Castle Cryptography Library 1.86