DINAMO Networks is now aDINAMO cyber security company!
Java API
HSM DINAMO
Loading...
Searching...
No entry found
KemEncapsResult Class Reference

Result of the KEM (Key Encapsulation Mechanism) encapsulation operation. More...

Public Methods

byte[] getSharedSecret ()
 Returns the shared secret generated during the encapsulation operation.
 
byte[] getCiphertext ()
 Returns the KEM (key-encapsulated material) ciphertext.
 

Detailed description

Result of the KEM (Key Encapsulation Mechanism) encapsulation operation.

Returned by Dinamo#kemEncaps(int, byte, String, byte[], int, int, byte[]). Contains the ciphertext that must be sent to the party that will decapsulate it, and when the operation is TacNDJavaLib#DN_KEM_OP_SHARED_SECRET, the generated shared secret.

See also
TacNDJavaLib.DN_KEM_OP_SHARED_SECRET
TacNDJavaLib.DN_KEM_OP_DIRECT_KEY
TacNDJavaLib.DN_KEM_OP_X9_63_SHA256
TacNDJavaLib.DN_KEM_ENCAPS_OPT_ML_KEM

Function documentation

◆ getSharedSecret()

byte[] getSharedSecret ( )

Returns the shared secret generated during the encapsulation operation.

Not null only when the operation specified in bOp is TacNDJavaLib#DN_KEM_OP_SHARED_SECRET. For the operations TacNDJavaLib#DN_KEM_OP_DIRECT_KEY and TacNDJavaLib#DN_KEM_OP_X9_63_SHA256 , the key is created directly in the HSM, and this field will return an empty array.

Returns
Shared secret or empty array when the key is created in the HSM.

◆ getCiphertext()

byte[] getCiphertext ( )

Returns the KEM (key-encapsulated material) ciphertext.

This value must be transmitted to the party that will perform the decapsulation using the private key corresponding to the public key used in the encapsulation.

Returns
KEM ciphertext.