Metadata-Version: 2.4
Name: swarmauri_cipher_suite_fips1403
Version: 0.1.0.dev38
Summary: FIPS 140-3 policy cipher suite for Swarmauri
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: swarmauri,sdk,standards,cipher,suite,fips1403,cryptography,FIPS 140-3,NIST SP 800-38D,FIPS 186-5,RFC 7518,PS256,PS384,ES256,ES384,A256GCM,RSA-OAEP-256,A256KW,P-256,P-384,SHA256,SHA384
Author: Jacob Stewart
Author-email: jacob@swarmauri.com
Requires-Python: >=3.10,<3.13
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Development Status :: 3 - Alpha
Classifier: Topic :: Security :: Cryptography
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Dist: swarmauri_base
Requires-Dist: swarmauri_core
Description-Content-Type: text/markdown

![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_fips1403/">
        <img src="https://img.shields.io/pypi/dm/swarmauri_cipher_suite_fips1403" alt="PyPI - Downloads"/></a>
    <a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/standards/swarmauri_cipher_suite_fips1403/">
        <img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/standards/swarmauri_cipher_suite_fips1403.svg"/></a>
    <a href="https://pypi.org/project/swarmauri_cipher_suite_fips1403/">
        <img src="https://img.shields.io/pypi/pyversions/swarmauri_cipher_suite_fips1403" alt="PyPI - Python Version"/></a>
    <a href="https://pypi.org/project/swarmauri_cipher_suite_fips1403/">
        <img src="https://img.shields.io/pypi/l/swarmauri_cipher_suite_fips1403" alt="PyPI - License"/></a>
    <a href="https://pypi.org/project/swarmauri_cipher_suite_fips1403/">
        <img src="https://img.shields.io/pypi/v/swarmauri_cipher_suite_fips1403?label=swarmauri_cipher_suite_fips1403&color=green" alt="PyPI - swarmauri_cipher_suite_fips1403"/></a>
</p>

---

# Swarmauri Cipher FIPS 140-3

Policy-enforcing cipher suite that restricts operations to NIST FIPS 140-3
validated algorithms and parameter settings.

## Features

- Enforces RSA minimum modulus sizes, approved elliptic curves, and SHA hashes
- Provides FIPS-aligned defaults for AES-GCM, RSA-OAEP, and RSA-PSS operations
- Shares structured policy metadata so calling services understand enforced
  constraints
- Can be swapped with the JWA or COSE suites for tenants that require
  FIPS-only cryptography

## Installation

### pip

```bash
pip install swarmauri_cipher_suite_fips1403
```

### Poetry

```bash
poetry add swarmauri_cipher_suite_fips1403
```

### uv

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

```bash
uv add swarmauri_cipher_suite_fips1403
```

Or install it into the active environment:

```bash
uv pip install swarmauri_cipher_suite_fips1403
```

## Usage

```python
from swarmauri_cipher_suite_fips1403 import FipsCipherSuite

suite = FipsCipherSuite(name="fips-mode")

# Describe a compliant RSA-PSS signing request
descriptor = suite.normalize(op="sign", alg="PS256")
print(descriptor["params"]["saltBits"])   # -> 256 enforced default
print(descriptor["constraints"]["minKeyBits"])  # -> 2048 minimum RSA modulus
```

If an unsupported algorithm is requested, the suite raises `ValueError`
immediately, making it straightforward for upstream services to surface a
policy violation.

## Entry Point

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

## Want to help?

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.

