public interface SM9EncMasterPublicKey
extends java.security.PublicKey
| Modifier and Type | Field and Description |
|---|---|
static byte |
HID
The encryption private-key generation function identifier hid, 0x03 - the
value the GM/T 0044.5-2016 Annex C/D worked examples publish for KEM and
public-key encryption. hid is not fixed by the standard: GM/T 0044.3-2016
defines it as the "identifier of the encryption private key generating
function, denoted by one byte", chosen and published by the KGC.
|
static byte |
HID_EXCHANGE
The key-exchange private-key generation function identifier hid, 0x02, as
published by the Chinese edition of the GM/T 0044.5-2016 Annex B worked
example (the official English edition of the same annex chose 0x03 - the
KGC's published choice governs).
|
| Modifier and Type | Method and Description |
|---|---|
java.security.PublicKey |
getExchangeEphemeral(byte[] encoded)
Wrap a peer's key-exchange ephemeral value R, as received, for the final
doPhase of KeyAgreement.SM9 - the encoding is the
standard's 64-byte x || y form returned by the first doPhase on the
peer's side. |
java.security.PublicKey |
getUserPublicKey(byte[] identity)
Return the public key of the user identified by
identity: the key a sender
encapsulates to. |
java.security.PublicKey |
getUserPublicKey(byte[] identity,
byte hid)
Return the public key of the user identified by
identity under an
explicit hid - 0x03 for KEM / public-key encryption, 0x02
for key exchange; the KGC's published choice governs. |
static final byte HID
static final byte HID_EXCHANGE
java.security.PublicKey getUserPublicKey(byte[] identity)
identity: the key a sender
encapsulates to. It is derived from the master public key and the identity
alone, so any sender holding the published master public key can construct
it - no certificate or KGC interaction is needed.identity - the user's identity.java.security.PublicKey getUserPublicKey(byte[] identity,
byte hid)
identity under an
explicit hid - 0x03 for KEM / public-key encryption, 0x02
for key exchange; the KGC's published choice governs.identity - the user's identity.hid - the private-key generation function identifier the KGC chose.java.security.PublicKey getExchangeEphemeral(byte[] encoded)
doPhase of KeyAgreement.SM9 - the encoding is the
standard's 64-byte x || y form returned by the first doPhase on the
peer's side. A value that is not a point of G1, or is the point at
infinity, is rejected here rather than reaching the pairing.encoded - the peer's ephemeral value R, 64 bytes.doPhase.