kasa-crypt
Fast kasa crypt
What it is and what it does
kasa-crypt is a lightweight encryption library that wraps fast cryptographic operations for encrypting and decrypting data, particularly JSON payloads. It exposes two main functions—encrypt() and decrypt()—and automatically prepends a 4-byte header to encrypted output that must be stripped before decryption. The package is distributed as pre-compiled wheels for Python 3.9 through 3.14 across major platforms (Linux, macOS, Windows, ARM), reducing installation friction on supported systems.
The library is in pre-alpha development but actively maintained, with no known security vulnerabilities. It has no runtime dependencies beyond the Python standard library, making it lightweight to integrate. The minimal API surface and straightforward usage pattern suggest it is designed for simple, fast encryption tasks rather than complex key management or authenticated encryption scenarios.
Use it for:
- Encrypt JSON configuration or API payloads before transmission over untrusted channels.
- Quick data obfuscation in Python scripts without external crypto dependencies.
- Protect sensitive strings in application logs or temporary storage.
- Fast symmetric encryption for IoT or embedded Python environments (kasa device context).
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides fast encryption and decryption functions for JSON and other data, with a 4-byte header prepended to encrypted output.
Yes, if you need simple, fast symmetric encryption for JSON or string data and are comfortable with pre-alpha software. The permissive Apache-2.0 license, zero runtime dependencies, and active maintenance are positive signals. However, verify the underlying algorithm meets your security requirements and audit the 4-byte header behavior before using in production. Not recommended for cryptographically sensitive applications without security review.
Install
kasa-crypt on PyPI
pip
pip install kasa-cryptuv
uv add kasa-cryptpoetry
poetry add kasa-cryptInstalling kasa-crypt
Before you install
Medium install friction due to compiled wheels across multiple Python versions and platforms (3.9–3.14, x86_64, ARM, Windows, macOS, Linux variants). Repository is active with recent commits; pre-alpha status suggests ongoing development.
License in practice
Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions.
Quickstart
pip install kasa-crypt
from kasa_crypt import encrypt, decrypt
encrypted = encrypt('{"hello":"world"}')
decrypted = decrypt(encrypted[4:]) # Skip 4-byte header
print(decrypted)
Requires Python >=3.9; compiled wheels available for common platforms but may require compilation on unsupported architectures.
Verify before relying
- What encryption algorithm (AES, ChaCha20, etc.) is used internally.
- Whether the 4-byte header encodes metadata or is purely structural.
- Performance benchmarks relative to other Python crypto libraries.
- Security audit status or cryptographic review history.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 314 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 86,221/month — #13,880 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: kasa_crypt-1.1.0-cp310-cp310-macosx_10_9_x86_64.whl; kasa_crypt-1.1.0-cp310-cp310-macosx_11_0_arm64.whl; kasa_crypt-1.1.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; kasa_crypt-1.1.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; kasa_crypt-1.1.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl; kasa_crypt-1.1.0-cp310-cp310-musllinux_1_2_aarch64.whl; kasa_crypt-1.1.0-cp310-cp310-musllinux_1_2_armv7l.whl; kasa_crypt-1.1.0-cp310-cp310-musllinux_1_2_x86_64.whl; kasa_crypt-1.1.0-cp310-cp310-win32.whl; kasa_crypt-1.1.0-cp310-cp310-win_amd64.whl; kasa_crypt-1.1.0-cp311-cp311-macosx_10_9_x86_64.whl; kasa_crypt-1.1.0-cp311-cp311-macosx_11_0_arm64.whl; kasa_crypt-1.1.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; kasa_crypt-1.1.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; kasa_crypt-1.1.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl; kasa_crypt-1.1.0-cp311-cp311-musllinux_1_2_aarch64.whl; kasa_crypt-1.1.0-cp311-cp311-musllinux_1_2_armv7l.whl; kasa_crypt-1.1.0-cp311-cp311-musllinux_1_2_x86_64.whl; kasa_crypt-1.1.0-cp311-cp311-win32.whl; kasa_crypt-1.1.0-cp311-cp311-win_amd64.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
chacha20poly1305-reuseableProvides a reusable ChaCha20Poly1305 AEAD…
permissive · top 15,000 on PyPI
pyAesCryptEncrypts and decrypts files and binary streams…
permissive · top 15,000 on PyPI
aws-encryption-sdkEncrypts and decrypts data using AWS KMS keys…
permissive · top 5,000 on PyPI
sopsySOPSy wraps the SOPS command-line tool to…
permissive · top 15,000 on PyPI
fnv-hash-fastComputes FNV-1a 32-bit hashes using a C++…
permissive · top 15,000 on PyPI
pywidevineImplements Widevine Content Decryption Module…
copyleft · top 15,000 on PyPI
xxteaxxtea is a Python extension that implements the…
permissive · top 15,000 on PyPI
ansible-vaultReads and writes Ansible vault-encrypted YAML…
copyleft · top 15,000 on PyPI
scryptPython bindings for the scrypt key derivation…
permissive · top 15,000 on PyPI
aws-encryption-sdk-cliCommand-line tool to encrypt and decrypt files…
permissive · top 15,000 on PyPI