Class SM9EncMasterPublicKeyParameters
java.lang.Object
org.bouncycastle.crypto.params.AsymmetricKeyParameter
org.bouncycastle.crypto.params.SM9EncMasterPublicKeyParameters
- All Implemented Interfaces:
CipherParameters
SM9 encryption master public key P_pub-e = [ke]P1, a point of G1
(GM/T 0044.4-2016). Note the group roles are swapped relative to signature:
the encryption master public key lives in G1 and users' keys in G2.
-
Method Summary
Modifier and TypeMethodDescriptionfromEncoded(byte[] enc) byte[]The master public key point P_pub-e of G1 in uncompressed form (0x04 || x || y, 65 bytes).getUserPublicKey(byte[] identity) The encryption public key of the user identified byidentity: the recipient key a sender encapsulates to (or encrypts to), formed from this master public key and the identity under the encryption hid 0x03 (GM/T 0044.4).getUserPublicKey(byte[] identity, byte hid) The public key of the user identified byidentityunder an explicit hid (0x03encryption/KEM,0x02key exchange) - use when the KGC's published hid differs from the encryption default.g = e(P_pub-e, P2), the fixed pairing value used by both encapsulation and encryption.recipientPoint(byte[] identity) Q = [H1(identity||hid, N)]P1 + P_pub-e, the recipient's public key point in G1, using the encryption hid (0x03).recipientPoint(byte[] identity, byte hid) Q = [H1(identity||hid, N)]P1 + P_pub-e for an explicit hid (0x03 encryption, 0x02 key exchange).Methods inherited from class AsymmetricKeyParameter
isPrivate
-
Method Details
-
getUserPublicKey
The encryption public key of the user identified byidentity: the recipient key a sender encapsulates to (or encrypts to), formed from this master public key and the identity under the encryption hid 0x03 (GM/T 0044.4). It is derived from the published master public key alone, so any sender can construct it without KGC interaction. -
getUserPublicKey
The public key of the user identified byidentityunder an explicit hid (0x03encryption/KEM,0x02key exchange) - use when the KGC's published hid differs from the encryption default. -
recipientPoint
Q = [H1(identity||hid, N)]P1 + P_pub-e, the recipient's public key point in G1, using the encryption hid (0x03). -
recipientPoint
Q = [H1(identity||hid, N)]P1 + P_pub-e for an explicit hid (0x03 encryption, 0x02 key exchange). -
pairingWithP2
g = e(P_pub-e, P2), the fixed pairing value used by both encapsulation and encryption. -
getEncoded
public byte[] getEncoded()The master public key point P_pub-e of G1 in uncompressed form (0x04 || x || y, 65 bytes). -
fromEncoded
-