Package org.bouncycastle.crypto.kems
Class SM9KEMGenerator
- java.lang.Object
-
- org.bouncycastle.crypto.kems.SM9KEMGenerator
-
- All Implemented Interfaces:
EncapsulatedSecretGenerator
public class SM9KEMGenerator extends java.lang.Object implements EncapsulatedSecretGenerator
SM9 key encapsulation mechanism - encapsulation side (GM/T 0044.4-2016, clause 6). Given a recipient identity and the encryption master public key, produces a shared key K and its encapsulation C = [r]Q_B (a G1 point, encoded x||y).
-
-
Constructor Summary
Constructors Constructor Description SM9KEMGenerator(int keyLenBits, java.security.SecureRandom random)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SecretWithEncapsulationgenerateEncapsulated(AsymmetricKeyParameter recipientKey)Generate secret/encapsulation based on the recipient public key.
-
-
-
Method Detail
-
generateEncapsulated
public SecretWithEncapsulation generateEncapsulated(AsymmetricKeyParameter recipientKey)
Description copied from interface:EncapsulatedSecretGeneratorGenerate secret/encapsulation based on the recipient public key.- Specified by:
generateEncapsulatedin interfaceEncapsulatedSecretGenerator- Returns:
- An SecretWithEncapsulation derived from the recipient public key.
-
-