public class SM9KEMGenerator extends java.lang.Object implements EncapsulatedSecretGenerator
Usage warning: an identity's encryption key should be used for this mechanism
or for public-key encryption (SM9Engine), but
not for both. A deployment needing both has its KGC publish a separate hid for each
function, as it already does for the key exchange, so that the two keys are distinct.
| Modifier and Type | Field and Description |
|---|---|
static int |
ENCAPSULATION_LENGTH
The length in bytes of an SM9 KEM encapsulation: C = [r]Q_B, a G1 point written as x || y.
|
| Constructor and Description |
|---|
SM9KEMGenerator(int keyLenBits,
java.security.SecureRandom random) |
| Modifier and Type | Method and Description |
|---|---|
SecretWithEncapsulation |
generateEncapsulated(AsymmetricKeyParameter recipientKey)
Generate secret/encapsulation based on the recipient public key.
|
public static final int ENCAPSULATION_LENGTH
public SM9KEMGenerator(int keyLenBits,
java.security.SecureRandom random)
public SecretWithEncapsulation generateEncapsulated(AsymmetricKeyParameter recipientKey)
EncapsulatedSecretGeneratorgenerateEncapsulated in interface EncapsulatedSecretGenerator