public class SAKKEKEMExtractor extends java.lang.Object implements EncapsulatedSecretExtractor
The extraction process follows these steps (RFC 6508, Section 6.2.2):
Constructor and Description |
---|
SAKKEKEMExtractor(SAKKEPrivateKeyParameters privateKey)
Initializes the extractor with cryptographic parameters from the receiver's private key.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
extractSecret(byte[] encapsulation)
Extracts the shared secret value (SSV) from encapsulated data as per RFC 6508.
|
int |
getEncapsulationLength()
Return the length in bytes of the encapsulation.
|
public SAKKEKEMExtractor(SAKKEPrivateKeyParameters privateKey)
privateKey
- The receiver's private key containing public parameters
(curve, prime, generator, etc.) and the Receiver Secret Key (RSK).
Must not be null
.public byte[] extractSecret(byte[] encapsulation)
extractSecret
in interface EncapsulatedSecretExtractor
encapsulation
- The encapsulated data containing:
java.lang.IllegalStateException
- If: Validation of R_(b,S) failspublic int getEncapsulationLength()
EncapsulatedSecretExtractor
getEncapsulationLength
in interface EncapsulatedSecretExtractor