Skip to main content

cryptiq

A lightweight, backend-agnostic cryptography abstraction layer for Python.

Overview

cryptiq provides a unified and strongly-typed interface over multiple cryptography backends.

It focuses on consistency, composability, and safe defaults while allowing flexibility between implementations such as cryptography and pycryptodome.


Features

  • Backend-agnostic cryptographic API
  • RSA key generation and loading
  • Unified encryption/decryption interface
  • Strong typing with overload-safe APIs
  • Support for multiple key formats (PEM/bytes/string)
  • Pluggable backend system (cryptography, pycryptodome)
  • Clean separation of crypto logic and type definitions

Installation

Using uv:

uv add cryptiq

Or pip:

pip install cryptiq

Usage

Key Generation

from cryptiq.enums import Backend
from cryptiq.rsa import generate_private

keypair = generate_private(Backend.CRYPTOGRAPHY)

Loading Keys

from cryptiq.keys import load_private
from cryptiq.enums import Backend

key = load_private(
    Backend.CRYPTOGRAPHY,
    path="private.pem",
    password=None,
)

Encryption

from cryptiq.rsa import encrypt
from cryptiq.enums import Backend

ciphertext = encrypt(
    key,
    "hello world"
)

Bytes Mode

ciphertext = encrypt(key, b"hello world")

Design Philosophy

cryptiq follows these principles:

  • Backend abstraction without leaking implementation details
  • Strong typing with explicit overloads
  • Consistent input/output behavior across APIs
  • Prefer safe defaults over flexible ambiguity
  • Keep crypto primitives simple and composable

Non-goals

cryptiq does NOT aim to:

  • Replace full-featured crypto libraries like cryptography
  • Implement low-level cryptographic primitives from scratch
  • Provide opinionated security policies (key storage, rotation, etc.)
  • Become a framework-level security system
  • Hide cryptographic behavior behind excessive abstraction

Architecture Notes

cryptiq is built around a backend dispatch model:

  • Backend enum selects implementation
  • Each backend returns its native key types
  • Public APIs normalize behavior through typed unions and overloads

This allows flexibility while keeping a consistent external API surface.

Metadata

Release files for cryptiq 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cryptiq 0.1.1
File Size Uploaded Provenance Actions
cryptiq-0.1.1.tar.gz 54.5 kB With provenance Details for cryptiq-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cryptiq 0.1.1
File Interpreter ABI Platform Actions
cryptiq-0.1.1-py3-none-any.whl Python 3 none any Details for cryptiq-0.1.1-py3-none-any.whl

Total release size: 78.7 kB

Release files / cryptiq-0.1.1.tar.gz

Download URL cryptiq-0.1.1.tar.gz
Size 54.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e46c31a912374e3602cb4750ebaa347df86606e5b15e1429303b64b22d64e508
BLAKE2b-256 checksum
How to use checksums
935b71e59ee485a81f34530b1b2d0d0f21e2b4c555cf338dbc8803f5945343cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 21, 2026.

Transparency log

Release files / cryptiq-0.1.1-py3-none-any.whl

Download URL cryptiq-0.1.1-py3-none-any.whl
Size 24.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4687b1879aa3aa76b26d61dd90186d92aad075e67e21b2aaf3c20520ff1dce98
BLAKE2b-256 checksum
How to use checksums
e7a8d2e155e394962f0195ae172042a6d45dcda4f85d22fda4689b0f81db3c28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 21, 2026.

Transparency log

Security for cryptiq 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cryptiq-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page