A modern cryptography utilities library for Python, providing ergonomic primitives for key management, encryption, hashing, signatures, tokens, and secret handling.
Project description
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:
Backendenum 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cryptiq-0.1.0.tar.gz.
File metadata
- Download URL: cryptiq-0.1.0.tar.gz
- Upload date:
- Size: 54.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c21716038c543f722890cdc6f4c60b7b5ceea7fa96fd7fc3ab1f7c15c8a2d1a5
|
|
| MD5 |
82e2a37a8df10e5bbb1162eacc93bbc0
|
|
| BLAKE2b-256 |
c8aead8d0e62d74cbc5e7b403097b481300ae6e714b58e4ae7613e543743e32b
|
Provenance
The following attestation bundles were made for cryptiq-0.1.0.tar.gz:
Publisher:
python-publish.yml on agrahub/cryptiq-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cryptiq-0.1.0.tar.gz -
Subject digest:
c21716038c543f722890cdc6f4c60b7b5ceea7fa96fd7fc3ab1f7c15c8a2d1a5 - Sigstore transparency entry: 1589609353
- Sigstore integration time:
-
Permalink:
agrahub/cryptiq-py@ee094e2952b3667ad05969cb4b74219099e42994 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/agrahub
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ee094e2952b3667ad05969cb4b74219099e42994 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cryptiq-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cryptiq-0.1.0-py3-none-any.whl
- Upload date:
- Size: 24.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f120030af3e414702fec9f1f40d8f686f3196f34c766a205ed9c21117594785
|
|
| MD5 |
5210e8f03ae5845e218b6177420f0985
|
|
| BLAKE2b-256 |
1b62e8273157b189544e5ec4bf9fce329fc4a3aa214602a6992ea1d33fa2dd72
|
Provenance
The following attestation bundles were made for cryptiq-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on agrahub/cryptiq-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cryptiq-0.1.0-py3-none-any.whl -
Subject digest:
5f120030af3e414702fec9f1f40d8f686f3196f34c766a205ed9c21117594785 - Sigstore transparency entry: 1589609433
- Sigstore integration time:
-
Permalink:
agrahub/cryptiq-py@ee094e2952b3667ad05969cb4b74219099e42994 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/agrahub
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ee094e2952b3667ad05969cb4b74219099e42994 -
Trigger Event:
release
-
Statement type: