semvec/pypi-packages huggingface dataset:
irene-crypto 0.1.1
Encrypt an arbitrary list of messages into one ciphertext and decrypt back (AEAD)
Requires Python: >=3.8

# multimsg-aead

Rust library (exposed to Python via **pyo3 + maturin**) that encrypts an arbitrary list of messages
into a single authenticated ciphertext and decrypts it back.

- AEAD ciphers: **AES-256-GCM** (default) or **ChaCha20-Poly1305**
- Self-describing envelope: `[version | alg | noncelen | nonce | ciphertext+tag]`
- Optional **AAD** binds context and header for integrity
- Enforces **>= 3 messages**
- Cross-platform: pure Rust crypto crates (Linux/Windows)

## Build (dev install into current venv)
```bash
pip install maturin
maturin develop --release
```

## Use from Python
```python
from multimsg_aead import generate_key, encrypt_texts, decrypt_texts

key = generate_key()  # 32 random bytes
msgs = ["hello", "from", "rust+python"]
aad = b"example-context"           # optional

ct = encrypt_texts(msgs, key, algorithm="aes256gcm", aad=aad)
print("ciphertext len:", len(ct))

roundtrip = decrypt_texts(ct, key, aad=aad)
print(roundtrip)                    # ['hello', 'from', 'rust+python']
```

## Notes
- Do **not** reuse a (key, nonce) pair. Nonce is random & included in the envelope.
- If decryption fails, you likely used the wrong key/AAD or the data was corrupted.
- Import name is `multimsg_aead` (underscore); pip package is `multimsg-aead` (hyphen).