|
Bouncy Castle Cryptography Library 1.87 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Interface for an SM9 (GM/T 0044) encryption master public key, the published root of the identity-based scheme.
Usage warning: an identity's key should be used for the SM9 KEM or for , but not for both. A sender uses the hid its KGC publishes for the function it is using, and a KGC offering both publishes a separate one for each.
| Field Summary | |
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). |
| Fields inherited from interface java.security.PublicKey |
serialVersionUID |
| Method Summary | |
java.security.PublicKey |
getExchangeEphemeral(byte[] encoded)
Wrap a peer's key-exchange ephemeral value R, as received, for the final of - the encoding is the standard's 64-byte x || y form returned by the first on the peer's side. |
java.security.PublicKey |
getUserPublicKey(byte[] identity)
Return the public key of the user identified by : the key a sender encapsulates to. |
java.security.PublicKey |
getUserPublicKey(byte[] identity,
byte hid)
Return the public key of the user identified by under an explicit hid - for KEM / public-key encryption, for key exchange; the KGC's published choice governs. |
| Methods inherited from interface java.security.Key |
getAlgorithm, getEncoded, getFormat |
| Field Detail |
public static final byte HID
The same value is declared on SM9EncUserKeyGenerator and on the lightweight
SM9EncMasterPrivateKeyParameters.HID, which both
JCA copies take their value from, so the three cannot drift apart.
public static final byte HID_EXCHANGE
SM9EncMasterPrivateKeyParameters.HID_EXCHANGE, as
HID is.
| Method Detail |
public java.security.PublicKey getUserPublicKey(byte[] identity)
The key returned is always an SM9EncUserPublicKey, which gives back the identity
and the master public key it was formed from, and a caller may rely on the cast; the
declared type stays so that code compiled against it keeps linking.
identity - the user's identity.
SM9EncUserPublicKey.
public java.security.PublicKey getUserPublicKey(byte[] identity,
byte hid)
getUserPublicKey(byte[]), the key returned is always an
SM9EncUserPublicKey.
A key under HID_EXCHANGE names a key-exchange peer, for
: and the SM9 KEM services refuse to encrypt
or encapsulate to it, since no decryption or decapsulation key can be derived under that
hid.
identity - the user's identity.hid - the private-key generation function identifier the KGC chose.
SM9EncUserPublicKey.public java.security.PublicKey getExchangeEphemeral(byte[] encoded)
encoded - the peer's ephemeral value R, 64 bytes.
|
Bouncy Castle Cryptography Library 1.87 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||