Cryptography Suite ================== Policy-driven envelope encryption for Python. One small API seals data under a fresh key, wraps that key for every recipient you configure (a cloud key service, an offline escrow key, a quorum of custodians), binds the result to its context, and opens it only when every byte and every binding verifies. .. warning:: ``4.0.0rc1`` is a release candidate, a pre-release. The envelope format, the public API, the command line, and the JSON documents are frozen for 4.0. It is not independently audited, and it is under public review for at least 60 days before 4.0.0. Do not protect production data with it yet. Install it with ``pip install --pre cryptography-suite``; version 3.0.0 on PyPI is the retired v3 educational toolkit and is unrelated to this API. .. code-block:: python from cryptography_suite import EncryptionContext, Policy, Protector from cryptography_suite.providers.hpke import HpkeRecipientProvider, generate_private_key provider = HpkeRecipientProvider() key = provider.add_identity("invoices", generate_private_key()) protector = Protector(provider=provider, policy=Policy(), primary_key=key) context = EncryptionContext({"tenant": "acme"}, purpose="invoices") envelope = protector.seal(b"confidential", context=context) assert protector.open(envelope, context=context) == b"confidential" Start with the :doc:`quick start `, then :doc:`connect a key service `. The design is recorded in the RFCs and the architecture documents, listed in the sidebar. .. toctree:: :maxdepth: 1 :caption: Getting started guide/installation guide/quickstart guide/concepts .. toctree:: :maxdepth: 1 :caption: Guides guide/key-services guide/rotation-and-recovery guide/streaming guide/post-quantum guide/quorum-recovery guide/multi-tenant guide/audit-and-observability guide/policy guide/cose guide/cli guide/javascript guide/custom-providers guide/production guide/runbooks guide/migrating-from-v3 .. toctree:: :maxdepth: 1 :caption: Reference api/modules api/public_api_table reference/errors reference/support v4/spec/envelope-format v4/benchmarks .. toctree:: :maxdepth: 1 :caption: Security v4/security/threat-model v4/security/audit-scope v4/security/review-guide v4/security/risk-register v4/security/runbook-exercises v4/rfcs/RFC-0031-security-audit v4/release-readiness .. toctree:: :maxdepth: 1 :hidden: :caption: Design RFCs :glob: v4/rfcs/* .. toctree:: :maxdepth: 1 :hidden: :caption: Architecture :glob: v4/architecture/* .. toctree:: :maxdepth: 1 :hidden: :caption: Phase evidence :glob: v4/phase-2-summary v4/phase-3/* v4/phase-4a/* v4/baseline/*