Class HybridKexBuilder.PqcKem
java.lang.Object
zeroecho.sdk.builders.HybridKexBuilder.PqcKem
- Enclosing class:
HybridKexBuilder
Configurator for the PQC leg (KEM adapter).
Required inputs differ by role:
- Initiator requires
peerPublic(PublicKey)(recipient PQC public key). - Responder requires
privateKey(PrivateKey)(recipient PQC private key).
The PQC leg is always message-based: initiator produces a peer message (ciphertext) and responder consumes it. The hybrid context transports this payload as the PQC part of the hybrid message.
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionSets the PQC algorithm identifier.Builds an initiator-sideHybridKexContextusing the current builder configuration.Builds a responder-sideHybridKexContextusing the current builder configuration.peerPublic(PublicKey key) Sets the recipient PQC public key for initiator-side construction.privateKey(PrivateKey key) Sets the recipient PQC private key for responder-side construction.spec(ContextSpec spec) Sets the PQC context spec (algorithm parameters).
-
Method Details
-
algorithm
Sets the PQC algorithm identifier.- Parameters:
algId- algorithm id (must not be null)- Returns:
- this configurator
- Throws:
NullPointerException- ifalgIdis null- Since:
- 1.0
-
spec
Sets the PQC context spec (algorithm parameters).- Parameters:
spec- spec (may be null if the algorithm provides a default)- Returns:
- this configurator
- Since:
- 1.0
-
peerPublic
Sets the recipient PQC public key for initiator-side construction.- Parameters:
key- recipient public key (must not be null)- Returns:
- this configurator
- Throws:
NullPointerException- ifkeyis null- Since:
- 1.0
-
privateKey
Sets the recipient PQC private key for responder-side construction.- Parameters:
key- recipient private key (must not be null)- Returns:
- this configurator
- Throws:
NullPointerException- ifkeyis null- Since:
- 1.0
-
buildInitiator
Builds an initiator-sideHybridKexContextusing the current builder configuration.- Returns:
- initiator context
- Throws:
IllegalStateException- if required configuration for initiator role is missing- Since:
- 1.0
-
buildResponder
Builds a responder-sideHybridKexContextusing the current builder configuration.- Returns:
- responder context
- Throws:
IllegalStateException- if required configuration for responder role is missing- Since:
- 1.0
-