swarmauri_cipher_suite_cnsa20 0.2.0.dev3
CNSA 2.0 policy cipher suite with classical and post-quantum algorithms
Requires Python: <3.13,>=3.10
Keywords: swarmauri, sdk, standards, cipher, suite, cnsa20, cryptography, CNSA 2.0, Commercial National Security Algorithm Suite, CNSS Advisory 02-23, NSA, ES384, PS384, ML-DSA, SLH-DSA, ML-KEM, A256GCM, RFC 7518, NIST SP 800-38D, FIPS 197

![Swarmauri Logo](https://github.com/swarmauri/swarmauri-sdk/blob/master/assets/swarmauri.brand.theme.svg)

<p align="center">
    <a href="https://pypi.org/project/swarmauri_cipher_suite_cnsa20/">
        <img src="https://img.shields.io/pypi/dm/swarmauri_cipher_suite_cnsa20" alt="PyPI - Downloads"/></a>
    <a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/standards/swarmauri_cipher_suite_cnsa20/">
        <img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/standards/swarmauri_cipher_suite_cnsa20.svg"/></a>
    <a href="https://pypi.org/project/swarmauri_cipher_suite_cnsa20/">
        <img src="https://img.shields.io/pypi/pyversions/swarmauri_cipher_suite_cnsa20" alt="PyPI - Python Version"/></a>
    <a href="https://pypi.org/project/swarmauri_cipher_suite_cnsa20/">
        <img src="https://img.shields.io/pypi/l/swarmauri_cipher_suite_cnsa20" alt="PyPI - License"/></a>
    <a href="https://pypi.org/project/swarmauri_cipher_suite_cnsa20/">
        <img src="https://img.shields.io/pypi/v/swarmauri_cipher_suite_cnsa20?label=swarmauri_cipher_suite_cnsa20&color=green" alt="PyPI - swarmauri_cipher_suite_cnsa20"/></a>
</p>

---

# Swarmauri Cipher Cnsa20

CNSA 2.0-aligned cipher suite skeleton for high-assurance deployments.

## Features

- Enumerates classical (ES384/PS384) and post-quantum (ML-DSA, SLH-DSA, ML-KEM)
  selections from the CNSA 2.0 profile
- Surfaces NIST security level metadata for ML-DSA, SLH-DSA, and ML-KEM
  algorithms to support downstream policy checks
- Provides consistent normalization across signing, encryption, and key
  encapsulation operations with JWA and provider dialect mappings

## Installation

### pip

```bash
pip install swarmauri_cipher_suite_cnsa20
```

### Poetry

```bash
poetry add swarmauri_cipher_suite_cnsa20
```

### uv

To add the dependency to a `pyproject.toml` managed by `uv`:

```bash
uv add swarmauri_cipher_suite_cnsa20
```

Or install it into the active environment:

```bash
uv pip install swarmauri_cipher_suite_cnsa20
```

## Usage

```python
from swarmauri_cipher_suite_cnsa20 import Cnsa20CipherSuite

suite = Cnsa20CipherSuite(name="demo-cnsa20")

# Inspect the available operations and defaults
print(suite.features()["ops"].keys())

# Normalize a post-quantum signing request
descriptor = suite.normalize(op="sign", alg="ML-DSA-65")
print(descriptor["alg"], descriptor["constraints"]["nistLevel"])  # -> 3
```

The suite returns normalized descriptors that include canonical algorithm names,
per-dialect mappings, and policy metadata so providers can focus on execution.

## Entry Point

The suite registers under the `swarmauri.cipher_suites` entry point as `Cnsa20CipherSuite`.

## Contributing

If you want to contribute to swarmauri-sdk, read up on our
[guidelines for contributing](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md)
that will help you get started.