synta 0.2.5

ASN.1 parser, decoder, and encoder library with DER/BER support and C FFI
Documentation
# Cargo Features


## synta-python (\_synta.abi3.so)

The `synta-python` crate exposes the following Cargo features:

| Feature | Default | Description |
|---------|---------|-------------|
| `extension-module` | yes (maturin) | Required by PyO3 for native extension module builds; set automatically by maturin |
| `abi3-py38` | yes (maturin) | Targets the stable Python 3.8 ABI; compatible with CPython 3.8–3.14+ |
| `openssl` | yes | OpenSSL-backed crypto: PKCS#12 decryption (`load_pkcs12_certificates` with password, `create_pkcs12` with password), CMS `EnvelopedData.create` / `EnvelopedDataBuilder.build`, `EncryptedData.create` / `decrypt`, `PrivateKey.to_pkcs8_encrypted` / `from_pkcs8_encrypted`, `synta.x509` chain verification |
| `pqc` | no | Enable composite ML-DSA key generation and signing in the OpenSSL backend (18 composite variants from draft-ietf-lamps-pq-composite-sigs-19, OID sub-arcs 37–54). Activates `cfg(ossl_mldsa)` guards; requires `openssl` feature and OpenSSL 3.3 or later. The NSS backend supports composite ML-DSA without this flag |
| `nss` | no | NSS-backed signature verification and key-identifier hashing; excluded when `openssl` is also enabled (OpenSSL takes priority). Also enables composite ML-DSA signing and verification via the NSS backend, subject to NSS limitations: SHAKE256 variants (sub-arc 51) unsupported; Brainpool curve variants (sub-arcs 47, 50) unsupported |
| `deprecated-pkcs12-algorithms` | no | Enables legacy PKCS#12 decryption algorithms (3DES, RC2) — requires `openssl` |

### Crate dependencies

| Crate | Role |
|-------|------|
| `synta` | Core ASN.1 encoder/decoder |
| `synta-certificate` | X.509 PKI types + OID constants + OpenSSL signature verifier |
| `synta-x509-verification` | RFC 5280 / CABF certificate chain validation (`synta.x509`) |
| `synta-python-common` | Shared rlib: `SyntaErr`, `install_submodule`, `opt_py_list` |
| `pyo3` 0.26 | Python/Rust interop (abi3-py38 feature) |
| `openssl` 0.10 | OpenSSL bindings for signature verification (`synta.x509`, `synta.cms`) |

## synta-python-krb5 (\_krb5.abi3.so)

Registers `synta.krb5` and `synta.spnego`.

| Feature | Default | Description |
|---------|---------|-------------|
| `openssl` | yes | Enables OpenSSL-dependent code paths inherited from `synta-certificate` |

### Crate dependencies

| Crate | Role |
|-------|------|
| `synta` | Core ASN.1 encoder/decoder |
| `synta-certificate` | OID constants, algorithm identification |
| `synta-krb5` | Kerberos V5 / PKINIT / FAST / SPNEGO types |
| `synta-python-common` | Shared rlib: `SyntaErr`, `install_submodule`, `opt_py_list` |
| `pyo3` 0.26 | Python/Rust interop (abi3-py38 feature) |

## synta-python-mtc (\_mtc.abi3.so)

Registers `synta.mtc`.

| Feature | Default | Description |
|---------|---------|-------------|
| `openssl` | yes | Enables OpenSSL-dependent code paths inherited from `synta-certificate` |

### Crate dependencies

| Crate | Role |
|-------|------|
| `synta` | Core ASN.1 encoder/decoder |
| `synta-certificate` | OID constants |
| `synta-mtc` | Merkle Tree Certificate types |
| `synta-python-common` | Shared rlib: `SyntaErr`, `install_submodule`, `opt_py_list` |
| `pyo3` 0.26 | Python/Rust interop (abi3-py38 feature) |

## Building with optional features

```bash
# Default build for _synta (openssl enabled by default)
maturin develop

# Build _synta without any crypto backend (disables PKCS#12 password support, x509 verification, CMS crypto)
maturin develop --no-default-features --features extension-module,abi3-py38

# Build _synta with legacy PKCS#12 algorithm support
maturin develop --features deprecated-pkcs12-algorithms

# Build with NSS as the sole crypto backend (replaces openssl)
maturin develop --no-default-features --features extension-module,abi3-py38,nss

# Build with NSS backend and legacy PKCS#12 algorithm support
maturin develop --no-default-features --features extension-module,abi3-py38,nss,deprecated-pkcs12-algorithms

# Build subsystem modules (openssl enabled by default)
cargo build --release -p synta-python-krb5
cargo build --release -p synta-python-mtc
```

See [Installation](../getting-started/installation.md) for standard build instructions
and [Development](development.md) for test and benchmark workflows.