|
Bouncy Castle Cryptography Library 1.81 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bouncycastle.crypto.kems.SAKKEKEMExtractor
Implements the receiver side of the SAKKE (Sakai-Kasahara Key Encryption) protocol as defined in RFC 6508. This class extracts the shared secret value (SSV) from encapsulated data using the receiver's private key.
The extraction process follows these steps (RFC 6508, Section 6.2.2): Parse encapsulated data into R_(b,S) and H Compute pairing result w = <R_(b,S), K_(b,S)> Recover SSV via SSV = H XOR HashToIntegerRange(w, 2^n) Validate R_(b,S) by recomputing it with derived parameters
Constructor Summary | |
SAKKEKEMExtractor(SAKKEPrivateKeyParameters privateKey)
Initializes the extractor with cryptographic parameters from the receiver's private key. |
Method Summary | |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
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 .Method Detail |
public byte[] extractSecret(byte[] encapsulation)
extractSecret
in interface EncapsulatedSecretExtractor
encapsulation
- The encapsulated data containing:
R_(b,S): Elliptic curve point (uncompressed format, 257 bytes)
H: Integer value (n/8 bytes)
java.lang.IllegalStateException
- If: Validation of R_(b,S) failspublic int getEncapsulationLength()
EncapsulatedSecretExtractor
getEncapsulationLength
in interface EncapsulatedSecretExtractor
|
Bouncy Castle Cryptography Library 1.81 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |