- All Implemented Interfaces:
- Test
public class SM9KeyExchangeTest
extends SimpleTest
Known-answer test for the SM9 key exchange protocol (GM/T 0044.3-2016) against both GM/T 0044.5-2016
Annex B vectors - the Chinese edition's (hid = 0x02, crypto/sm9/sm9_keyexchange.txt) and the English
edition's (hid = 0x03, crypto/sm9/sm9_keyexchange_hid03.txt), the hid being the KGC's published choice,
taken from the file. The master public key, both user keys, both ephemerals, the shared key and S_A / S_B
are reproduced byte-for-byte, with party A on a key rebuilt through fromEncodedExchangeKey, as a party
holding its KGC-served key but not the master private key does.