Class HybridKexBuilder.ClassicPairMessage
java.lang.Object
zeroecho.sdk.builders.HybridKexBuilder.ClassicPairMessage
- Enclosing class:
HybridKexBuilder
Configurator for the classic leg in
HybridKexBuilder.ClassicMode.PAIR_MESSAGE mode.
Required inputs before building:
algorithm(String)- classic algorithm id (for example"Xdh")keyPair(KeyPairKey)- local classic key pair wrapped asKeyPairKey
Optional inputs:
spec(ContextSpec)- algorithm-specific context spec (for exampleXdhSpec.X25519)
In this mode, the classic leg contributes a public-key message (typically
SPKI bytes) to the hybrid peer message. The peer public key is therefore
learned from HybridKexContext.setPeerMessage(byte[]) rather than
being supplied out-of-band.
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionSets the classic agreement algorithm identifier.keyPair(KeyPairKey keyPair) Sets the local classic key pair.pqcKem()Continues with PQC (KEM adapter) leg configuration.spec(ContextSpec spec) Sets the classic context spec (algorithm parameters).
-
Method Details
-
algorithm
Sets the classic agreement algorithm identifier.- Parameters:
algId- algorithm id (must not be null)- Returns:
- this configurator
- Throws:
NullPointerException- ifalgIdis null- Since:
- 1.0
-
spec
Sets the classic context spec (algorithm parameters).- Parameters:
spec- spec (may be null if the algorithm provides a default)- Returns:
- this configurator
- Since:
- 1.0
-
keyPair
Sets the local classic key pair.The key pair is wrapped into
KeyPairKeyto match thePAIR_MESSAGEcapability registered in core.- Parameters:
keyPair- key pair wrapper (must not be null)- Returns:
- this configurator
- Throws:
NullPointerException- ifkeyPairis null- Since:
- 1.0
-
pqcKem
Continues with PQC (KEM adapter) leg configuration.- Returns:
- PQC configurator
- Since:
- 1.0
-