Package zeroecho.core.alg.ecdh
package zeroecho.core.alg.ecdh
Elliptic Curve Diffie-Hellman (ECDH) key agreement integration.
This package provides the ECDH algorithm descriptor, named-curve selection, and a key-pair builder backed by the JCA. It wires ECDH into the core agreement SPI through a generic JCA-based agreement context and reuses EC key importers shared with ECDSA where appropriate.
Scope and responsibilities
- Register a canonical ECDH algorithm and declare its agreement capability.
- Expose a curve specification for standard NIST curves suitable for ECDH.
- Provide a key-pair builder that generates EC keys on the selected curve using JCA primitives.
- Reuse EC public/private key importers to avoid duplication.
Components
- EcdhAlgorithm: registers the
"ECDH"algorithm, binds the agreement capability to a JCA-backed context, and wires EC key builders/importers. - EcdhCurveSpec: immutable enum of named curves providing the JCA curve name and auxiliary metadata.
- EcdhKeyGenBuilder: generates EC key pairs for ECDH on the requested curve.
Design notes
- Algorithm descriptors are immutable and thread-safe; agreement contexts they produce are stateful and not thread-safe.
- Key import paths are shared between ECDH and ECDSA, as the encoding and curve parameters are identical at the key level.
- Since:
- 1.0
-
ClassDescriptionElliptic Curve Diffie-Hellman (ECDH) AlgorithmStandardized ECDH Curve SpecificationsECDH Key Pair Generator