Current public Python API¶
Method¶
The inventory combines API_CLI_CONTRACT.md, documentation imports, package
__all__ declarations, and static enumeration of public top-level classes and
functions in all four source trees. Imported third-party names that leak only
because a module lacks __all__ are implementation leakage, not an intentional
contract; v4 must close that leakage with explicit exports.
No current API is declared v4-stable by this baseline. “Rewrite” means preserve the product capability, not the current signature. “Labs” means move the API out of the stable wheel.
Package-root exports¶
cryptography_suite/__init__.py explicitly exports 111 names:
Group |
Exact current root names |
v4 disposition |
|---|---|---|
Symmetric and file encryption |
|
Primitive helpers to labs; current file formats decrypt/migrate-only |
KDFs |
|
Remove from root; internal policy-selected KDFs only |
Asymmetric and hybrid |
|
Labs or internal migration adapters |
Signatures |
|
Labs; provider-native signing is not a root primitive API |
Hashes |
|
Labs/ordinary application dependency |
Key/protocol helpers |
|
Labs; replace key lifecycle with provider/version/rotation objects |
Utilities and serialization |
|
Remove from root; retain only narrowly scoped internal utilities |
X.509 and audit |
|
X.509 to labs; rewrite audit as event sink interfaces |
Errors |
|
Replace with a small typed v4 error taxonomy |
Backend controls |
|
Replace with explicit provider configuration |
The grouped names above are the 111 entries in __all__. __version__ is also
public in practice, so the effective package-root surface is at least 112 names.
The excluded src/cryptography_suite/__init__.py declares a different
105-name list and dynamically aliases src/crypto_suite modules. It omits some
new root utilities/errors and is not a distributable contract.
Submodule surfaces¶
Module/namespace |
Current public surface |
v4 disposition |
|---|---|---|
|
|
Labs; caller-managed nonce/context API excluded |
|
|
Labs |
|
RSA key generation/loading/serialization/encrypt/decrypt; X25519/X448 generation/derivation; EC generation/encrypt/decrypt |
Labs |
|
Ed25519, Ed448, ECDSA, and RSA generate/sign/verify/serialize/load helpers |
Labs |
|
|
Labs |
|
|
Rewrite |
|
|
Labs |
|
|
Rewrite into explicit immutable configuration |
|
key/nonce/salt sizes and Scrypt/PBKDF2/Argon2 defaults |
Internal only |
|
|
Rewrite taxonomy |
|
structured logger configuration, correlation IDs, redaction helpers, |
Internal stable-core candidate after review |
|
retry policy, metrics, cancellation, subprocess wrapper |
Split: provider retry candidate; subprocess/metrics general tooling excluded |
|
|
Rewrite as provider contract |
|
verbose/redaction helpers, |
Tooling/labs |
|
guarded AES-GCM-SST, Ascon, FHE, Salsa20, Signal, and ZK namespaces |
Labs |
|
SHA-2/SHA-3/BLAKE2/BLAKE3 and Scrypt/PBKDF2 helpers |
Labs |
|
FHE availability, backend/parameter models, keygen/encrypt/decrypt/arithmetic/context serialization |
Labs |
|
|
Labs; do not treat as the v4 envelope |
|
|
Rewrite providers; mock remains tests; local remains development/migration only |
|
BLS, Ed448, and |
Remove or labs; not stable v4 legacy-envelope support |
|
|
Labs/remove from stable core |
|
|
Labs |
|
ML-KEM/Kyber generation/envelope helpers, Dilithium, SPHINCS+ |
Labs |
|
OTP, secret sharing, SPAKE2, key generation/rotation/file persistence, |
Labs/rewrite lifecycle concepts |
|
current file and one-shot AES, ChaCha/XChaCha, KDF helpers |
Labs plus explicit legacy-decrypt adapters |
|
PEM conversion, encrypted-message encoding, zeroization, comparisons, random/base62, |
Internal candidates only; remove broad public module |
|
three widgets and HTML export |
Labs |
|
CSR, self-signed certificate, certificate loading |
Labs |
|
Bulletproof and zk-SNARK |
Labs |
|
|
Delete duplicate or move to labs after compatibility proof |
|
handshake dataclasses, enum, negotiation, context/error |
Labs |
|
alternate |
Delete duplicate |
|
|
Evaluate internal implementation, then delete duplicate namespace |
|
demo backends, migration wizard/batch, audit logger/report |
Replace with real provider migration; demo to labs |
|
experimental-warning helper |
Delete duplicate |
Proposed v4 root¶
Phase 2 should specify a root no larger than high-level seal, open,
inspect, and rewrap, typed envelope/context/policy models, provider
interfaces, lifecycle operations, and a small error set. No current primitive,
nonce, KDF-parameter, raw-key, plugin-registration, or experimental symbol
should survive at the stable root merely for source compatibility.