Package zeroecho.core.alg.cmce
package zeroecho.core.alg.cmce
Classic McEliece (CMCE) KEM integration and utilities.
This package adapts the Bouncy Castle PQC CMCE primitives to the core SPI. It provides the algorithm descriptor, a runtime KEM context, and key specifications for generation and import. The design keeps provider-specific details encapsulated behind factories while exposing clear roles and metadata to the higher layers.
Scope and responsibilities
- Expose a concrete algorithm descriptor that registers CMCE KEM roles and a KEM-backed message-agreement adapter.
- Provide a runtime context that performs encapsulation and decapsulation.
- Define key specifications for key-pair generation and for importing X.509 and PKCS#8 encodings.
Components
- Algorithm descriptor:
CmceAlgorithmdeclaresENCAPSULATE/DECAPSULATEKEM roles and wires anAGREEMENTrole through a KEM-based adapter. It also registers asymmetric key builders for generation and import. The provider requirement is the Bouncy Castle provider under the standard name"BC". - Runtime context:
CmceKemContextholds state for encapsulation or decapsulation depending on which constructor is used. - Key generation spec:
CmceKeyGenSpecselects a CMCE parameter set (variant) used by the key-pair builder. - Key import specs:
CmcePublicKeySpecwraps X.509 public keys andCmcePrivateKeySpecwraps PKCS#8 private keys; both defensively copy their byte arrays, and the private-key form is destroyable.
Provider requirements
The algorithm expects the Bouncy Castle provider to be installed before use; the descriptor verifies this when generating or importing keys.
Thread-safety
- Algorithm descriptors are immutable and safe to share across threads.
- Runtime contexts are stateful and not thread-safe.
- Since:
- 1.0
-
ClassDescriptionClassic McEliece (CMCE) algorithm adapterClassic McEliece (CMCE) KEM contextCMCE key generation specificationEnumeration of supported CMCE parameter set variants.Classic McEliece (CMCE) private key specificationClassic McEliece (CMCE) public key specification