- 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).