Package zeroecho.core.alg.saber
package zeroecho.core.alg.saber
SABER post-quantum key encapsulation integration.
This package wires the SABER KEM into the core layer. It provides the algorithm descriptor, a runtime KEM context, a key-generation specification selecting parameter variants, and encoded key specifications for import and export. Provider details are encapsulated behind small factories while roles and metadata remain explicit to higher layers.
Scope and responsibilities
- Register SABER under a canonical identifier and declare ENCAPSULATE and DECAPSULATE roles, with an optional message-style agreement adapter built on KEM.
- Provide a
KemContextbound to a public key (encapsulation) or a private key (decapsulation). - Expose immutable key-generation specifications and defensively copying encoded-key carriers with compact marshalling helpers; private-key carriers are destroyable.
- Validate presence of a suitable PQC provider before performing operations.
Components
- SaberAlgorithm: algorithm descriptor that wires KEM and, when needed, a message-agreement adapter, and registers asymmetric key builders.
- SaberKemContext: runtime context implementing encapsulate and decapsulate using provider primitives.
- SaberKeyGenSpec: immutable selection of SABER parameter variants with simple factory methods.
- SaberPublicKeySpec and SaberPrivateKeySpec: wrappers over X.509 and PKCS#8 encodings with defensive copying and marshalling helpers.
Design notes
- Algorithm descriptors are immutable and safe to share across threads.
- KEM contexts are stateful and not thread-safe; create one per operation.
- Key specifications preserve the provided encodings without internal parsing and clone byte arrays on input and output.
- Since:
- 1.0
-
ClassDescriptionImplements the SABER post-quantum key encapsulation mechanism for the crypto catalog and wires it to the Bouncy Castle PQC provider.KEM context for SABER supporting encapsulation with a public key and decapsulation with a private key.Key generation specification for the SABER post-quantum KEM algorithm.Enumeration of SABER parameter set variants.Encoded private key specification for the SABER post-quantum KEM algorithm.Encoded public key specification for the SABER post-quantum KEM algorithm.