org.bouncycastle.jcajce.interfaces
Interface SM9EncMasterPrivateKey
- All Superinterfaces:
- java.security.Key, java.security.PrivateKey, java.io.Serializable, SM9EncUserKeyGenerator
- public interface SM9EncMasterPrivateKey
- extends java.security.PrivateKey, SM9EncUserKeyGenerator
Interface for an SM9 (GM/T 0044) encryption master private key, the KGC-held
root of the identity-based scheme. The one encryption master key serves KEM /
public-key encryption (hid = 0x03), whose user key pairs come from the
SM9EncUserKeyGenerator extraction method, and key exchange (hid = 0x02), whose
user key pairs come from generateExchangeKeyPair(byte[]) - the KGC's published
hid distinguishing them.
Usage warning: the hid separates the key exchange from the other two, not the KEM
from public-key encryption: an identity's key should be used for the KEM or for public-key
encryption, but not for both. A KGC offering both publishes a separate hid for each.
| Fields inherited from interface java.security.PrivateKey |
serialVersionUID |
|
Method Summary |
java.security.KeyPair |
generateExchangeKeyPair(byte[] identity)
Generate the key-exchange key pair of the user identified by
, under hid 0x02 - the exchange identifier the GM/T 0044.5
Chinese-edition worked example publishes. |
java.security.KeyPair |
generateExchangeKeyPair(byte[] identity,
byte hid)
Generate the key-exchange key pair of the user identified by
under an explicit hid, for a KGC whose published exchange
hid is not 0x02. |
| Methods inherited from interface java.security.Key |
getAlgorithm, getEncoded, getFormat |
generateExchangeKeyPair
public java.security.KeyPair generateExchangeKeyPair(byte[] identity)
- Generate the key-exchange key pair of the user identified by
, under hid 0x02 - the exchange identifier the GM/T 0044.5
Chinese-edition worked example publishes. Exchange keys and KEM/decryption
keys are distinct objects and the consumers mutually reject them.
- Parameters:
identity - the user's identity.
- Returns:
- the user's key-exchange key pair.
generateExchangeKeyPair
public java.security.KeyPair generateExchangeKeyPair(byte[] identity,
byte hid)
- Generate the key-exchange key pair of the user identified by
under an explicit hid, for a KGC whose published exchange
hid is not 0x02.
- Parameters:
identity - the user's identity.hid - the private-key generation function identifier the KGC chose.
- Returns:
- the user's key-exchange key pair.