Class HybridKexBuilder.ClassicAgreement
java.lang.Object
zeroecho.sdk.builders.HybridKexBuilder.ClassicAgreement
- Enclosing class:
HybridKexBuilder
Configurator for the classic leg in
HybridKexBuilder.ClassicMode.CLASSIC_AGREEMENT
mode.
Required inputs before building:
algorithm(String)- classic algorithm id (for example"Xdh")privateKey(PrivateKey)- local classic private keypeerPublic(PublicKey)- peer classic public key (out-of-band)
Optional inputs:
spec(ContextSpec)- algorithm-specific context spec (for exampleXdhSpec.X25519)
After configuring the classic leg, continue with pqcKem() to
configure the PQC leg.
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionSets the classic agreement algorithm identifier.peerPublic(PublicKey key) Sets the peer public key for the classic leg.pqcKem()Continues with PQC (KEM adapter) leg configuration.privateKey(PrivateKey key) Sets the local private key for the classic leg.spec(ContextSpec spec) Sets the classic context spec (algorithm parameters).
-
Method Details
-
algorithm
Sets the classic agreement algorithm identifier.Example for X25519 in this project: use
"Xdh"withXdhSpec.X25519.- 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
-
privateKey
Sets the local private key for the classic leg.- Parameters:
key- private key (must not be null)- Returns:
- this configurator
- Throws:
NullPointerException- ifkeyis null- Since:
- 1.0
-
peerPublic
Sets the peer public key for the classic leg.In
HybridKexBuilder.ClassicMode.CLASSIC_AGREEMENTthis key is assumed to be obtained out-of-band.- Parameters:
key- peer public key (must not be null)- Returns:
- this configurator
- Throws:
NullPointerException- ifkeyis null- Since:
- 1.0
-
pqcKem
Continues with PQC (KEM adapter) leg configuration.- Returns:
- PQC configurator
- Since:
- 1.0
-