skillfed

kasa-crypt

Fast kasa crypt

kasa-crypt v1.1.0 86.2K downloads/30d#13,880 on PyPI4
Permissive license Apache-2.0 Active released

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-crypt

uv

uv add kasa-crypt

poetry

poetry add kasa-crypt

Installing 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

Development Status :: 2 - Pre-AlphaIntended Audience :: DevelopersNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries

Tags

fast encryption decryptionjson encryption librarykasa cryptdata encryption pythonsymmetric encryption
encryptionjson-serializationkasa-ecosystem

More Libraries packages