diff --git a/lib/src/main/java/zeroecho/core/alg/chacha/package-info.java b/lib/src/main/java/zeroecho/core/alg/chacha/package-info.java
index b482ce8..7dc97ba 100644
--- a/lib/src/main/java/zeroecho/core/alg/chacha/package-info.java
+++ b/lib/src/main/java/zeroecho/core/alg/chacha/package-info.java
@@ -33,56 +33,83 @@
* POSSIBILITY OF SUCH DAMAGE.
******************************************************************************/
/**
- * Classic McEliece (CMCE) KEM integration and utilities.
+ * ChaCha algorithm implementation and runtime wiring.
*
*
- * 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.
+ * This package provides the ChaCha capability set for the core layer, including
+ * the stream cipher ChaCha20 and the AEAD construction ChaCha20-Poly1305. The
+ * module contains algorithm descriptors, streaming cipher contexts, immutable
+ * specifications, optional header codecs for runtime parameters, and symmetric
+ * key import/generation specifications. The design favors safe defaults
+ * (12-byte nonces, 128-bit AEAD tag), explicit role-to-context binding, and a
+ * clear separation between static configuration and per-operation parameters.
*
*
- * 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: {@link zeroecho.core.alg.cmce.CmceAlgorithm}
- * declares {@code ENCAPSULATE}/{@code DECAPSULATE} KEM roles and wires an
- * {@code AGREEMENT} role through a KEM-based adapter. It also registers
- * asymmetric key builders for generation and import. The provider requirement
- * is the Bouncy Castle PQC provider under the standard name
- * {@code "BCPQC"}.
- * - Runtime context: {@link zeroecho.core.alg.cmce.CmceKemContext}
- * holds state for encapsulation or decapsulation depending on which constructor
- * is used.
- * - Key generation spec: {@link zeroecho.core.alg.cmce.CmceKeyGenSpec}
- * selects a CMCE parameter set (variant) used by the key-pair builder.
- * - Key import specs: {@link zeroecho.core.alg.cmce.CmcePublicKeySpec}
- * wraps X.509 public keys and {@link zeroecho.core.alg.cmce.CmcePrivateKeySpec}
- * wraps PKCS#8 private keys; both are immutable and defensively copy their byte
- * arrays.
+ * - Algorithm descriptors: {@link ChaChaAlgorithm} registers ENCRYPT
+ * and DECRYPT roles for the ChaCha20 stream cipher;
+ * {@link ChaCha20Poly1305Algorithm} registers the AEAD counterpart. Both share
+ * a common base that wires symmetric key builders for generation and import.
+ *
+ *
+ * - Streaming contexts: {@link ChaChaCipherContext} and
+ * {@link ChaCha20Poly1305CipherContext} implement {@code InputStream}-to-
+ * {@code InputStream} transforms. The abstract parent
+ * {@link AbstractChaChaCipherContext} handles nonce lifecycle, optional header
+ * injection/parsing, and construction of a pull-based cipher stream.
+ *
+ * - Static configuration (specs): {@link ChaChaSpec} captures the
+ * initial counter and optional header codec for ChaCha20;
+ * {@link ChaCha20Poly1305Spec} binds the optional header codec for AEAD. The
+ * sealed marker {@link ChaChaBaseSpec} unifies both.
+ *
+ * - Header codecs (optional): {@link ChaChaHeaderCodec} writes/reads a
+ * compact header carrying the 12-byte nonce and a packed stream counter;
+ * {@link ChaCha20Poly1305HeaderCodec} writes/reads the 12-byte nonce and an
+ * optional SHA-256 of AAD to assert out-of-band AAD integrity.
+ *
+ * - Key specifications: {@link ChaChaKeyGenSpec} defines parameters
+ * for generating 256-bit ChaCha keys; {@link ChaChaKeyImportSpec} wraps
+ * externally supplied raw keys. Generation and import are registered by the
+ * algorithm base.
*
*
- * Provider requirements
+ * Runtime parameters and context exchange
*
- * The algorithm expects the Bouncy Castle PQC provider to be installed before
- * use; the descriptor verifies this when generating or importing keys.
+ * Streaming contexts exchange ephemeral parameters through a Conflux session
+ * context using namespaced keys. For ChaCha20 and ChaCha20-Poly1305, a 12-byte
+ * nonce is required for each operation. On encryption, if the session context
+ * does not provide a nonce, the context generates a fresh value and stores it
+ * back into the session; on decryption the nonce must already be present and
+ * have the correct length. ChaCha20 also uses an initial counter sourced from
+ * {@link ChaChaSpec} and optionally overridden by the session context. When a
+ * header codec is configured and a session context is set, encryption prepends
+ * a minimal header and decryption reads it first to hydrate the session before
+ * initializing the cipher.
*
*
+ * Safety and validation
+ *
+ * - Nonce uniqueness: Applications must ensure nonces are unique per
+ * key. The contexts will generate nonces for encryption, but cross-process
+ * uniqueness is the caller's responsibility. Decryption fails if a nonce is
+ * missing or has an unexpected size.
+ *
+ * - Counter policy (ChaCha20): The default initial counter is 1. A
+ * context may override the spec value through the session key dedicated to
+ * counter exchange; consistency is enforced at attach time.
+ *
+ * - AEAD tag and AAD (ChaCha20-Poly1305): The effective tag length is
+ * 128 bits. If AAD is supplied, it is included in authentication; when enabled,
+ * the header codec can store SHA-256(AAD) to verify that decrypt-time AAD
+ * matches encrypt-time AAD.
+ *
+ *
* Thread-safety
*
- * - Algorithm descriptors are immutable and safe to share across
- * threads.
- * - Runtime contexts are stateful and not thread-safe.
+ * - Algorithm descriptors are immutable and safe to share.
+ * - Streaming contexts are stateful and not thread-safe.
*
*
* @since 1.0
diff --git a/lib/src/main/java/zeroecho/core/alg/cmce/package-info.java b/lib/src/main/java/zeroecho/core/alg/cmce/package-info.java
index e1491cf..b68d290 100644
--- a/lib/src/main/java/zeroecho/core/alg/cmce/package-info.java
+++ b/lib/src/main/java/zeroecho/core/alg/cmce/package-info.java
@@ -33,70 +33,58 @@
* POSSIBILITY OF SUCH DAMAGE.
******************************************************************************/
/**
- * Classic McEliece (CMCE)
+ * Classic McEliece (CMCE) KEM integration and utilities.
*
*
- * This package integrates the Classic McEliece cryptosystem, one of the oldest
- * and most studied code-based public-key cryptosystems. Originally proposed by
- * Robert McEliece in 1978, it is based on the hardness of decoding random
- * binary Goppa codes. Despite large public key sizes, the scheme has withstood
- * decades of cryptanalysis and remains unbroken by both classical and quantum
- * computers.
+ * 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.
*
*
- * Post-quantum KEM
+ * 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: {@link zeroecho.core.alg.cmce.CmceAlgorithm}
+ * declares {@code ENCAPSULATE}/{@code DECAPSULATE} KEM roles and wires an
+ * {@code AGREEMENT} role through a KEM-based adapter. It also registers
+ * asymmetric key builders for generation and import. The provider requirement
+ * is the Bouncy Castle PQC provider under the standard name
+ * {@code "BCPQC"}.
+ * - Runtime context: {@link zeroecho.core.alg.cmce.CmceKemContext}
+ * holds state for encapsulation or decapsulation depending on which constructor
+ * is used.
+ * - Key generation spec: {@link zeroecho.core.alg.cmce.CmceKeyGenSpec}
+ * selects a CMCE parameter set (variant) used by the key-pair builder.
+ * - Key import specs: {@link zeroecho.core.alg.cmce.CmcePublicKeySpec}
+ * wraps X.509 public keys and {@link zeroecho.core.alg.cmce.CmcePrivateKeySpec}
+ * wraps PKCS#8 private keys; both are immutable and defensively copy their byte
+ * arrays.
+ *
+ *
+ * Provider requirements
*
- * Classic McEliece has been selected by NIST in the post-quantum cryptography
- * standardization process for key encapsulation. Its primary appeal is
- * long-term confidence: no efficient attacks are known even in the quantum
- * setting. It provides IND-CCA2 security through a well-studied transform and
- * is especially suited for use cases where large public keys are acceptable but
- * extremely strong security margins are desired.
+ * The algorithm expects the Bouncy Castle PQC provider to be installed before
+ * use; the descriptor verifies this when generating or importing keys.
*
*
- * Contents
+ * Thread-safety
*
- * - {@link zeroecho.core.alg.cmce.CmceAlgorithm} – algorithm adapter exposing
- * CMCE as a KEM and agreement primitive.
- * - {@link zeroecho.core.alg.cmce.CmceKemContext} – runtime context for
- * encapsulation and decapsulation.
- * - {@link zeroecho.core.alg.cmce.CmceKeyGenSpec} – enumeration of
- * standardized CMCE parameter sets (variants).
- * - {@link zeroecho.core.alg.cmce.CmcePublicKeySpec} – wrapper for
- * X.509-encoded public keys.
- * - {@link zeroecho.core.alg.cmce.CmcePrivateKeySpec} – wrapper for
- * PKCS#8-encoded private keys.
+ * - Algorithm descriptors are immutable and safe to share across
+ * threads.
+ * - Runtime contexts are stateful and not thread-safe.
*
*
- * Security properties
- *
- * - Underlying assumption: hardness of decoding binary Goppa codes.
- * - Selected as a NIST post-quantum KEM standard (2022).
- * - Public keys are large (hundreds of kilobytes), but ciphertexts and
- * secrets are compact.
- * - Considered quantum-resistant and secure against known attacks.
- *
- *
- * Usage
{@code
- * // Select a variant (e.g., 8192128F for 256-bit security)
- * CmceKeyGenSpec spec = CmceKeyGenSpec.mceliece8192128f();
- * CmceAlgorithm alg = new CmceAlgorithm();
- * KeyPair kp = alg.asymmetricKeyBuilder(CmceKeyGenSpec.class).generateKeyPair(spec);
- *
- * // Encapsulation (sender)
- * try (CmceKemContext ctx = new CmceKemContext(alg, kp.getPublic())) {
- * KemResult kem = ctx.encapsulate();
- * byte[] ct = kem.ciphertext();
- * byte[] secret = kem.secret();
- * }
- *
- * // Decapsulation (recipient)
- * try (CmceKemContext ctx = new CmceKemContext(alg, kp.getPrivate())) {
- * byte[] secret = ctx.decapsulate(ct);
- * }
- * }
- *
* @since 1.0
*/
package zeroecho.core.alg.cmce;