Skip to main content

A special encryption algorithm created for K9Crypt.

Project description

K9Crypt

K9Crypt is a powerful Python library that provides multi-layer encryption. It securely protects your data using five different AES-256-based encryption modes.

Features

  • 5-layer AES-256 encryption (GCM, CBC, CFB, OFB, CTR)
  • Strong key derivation with PBKDF2
  • HMAC-SHA512 verification at each layer
  • Brotli compression support
  • Asynchronous (async/await) API
  • Protection against timing attacks

Installation

pip install k9crypt

Usage Example

from k9crypt import K9Crypt
import asyncio

async def test():
    secret_key = "VeryLongSecretKey!@#1234567890"
    encryptor = K9Crypt(secret_key)
    plaintext = "Hello, World!"

    try:
        encrypted = await encryptor.encrypt(plaintext)
        print("Encrypted data:", encrypted)

        decrypted = await encryptor.decrypt(encrypted)
        print("Decrypted data:", decrypted)
    except Exception as error:
        print("Encryption error:", str(error))

asyncio.run(test())

Security Features

  1. Multi-Layer Encryption: Each layer uses a different AES-256 mode
  2. HMAC Verification: Integrity check at each layer
  3. Strong Key Derivation: 600,000 iterations with PBKDF2
  4. Secure Comparison: Protection against timing attacks
  5. Salt and Pepper: Unique salt used for each encryption

Requirements

  • Python 3.7+
  • cryptography>=41.0.7
  • brotli>=1.1.0

License

MIT License

Contribution

  1. Fork this repository
  2. Create a new branch (git checkout -b feature/new-feature)
  3. Commit your changes (git commit -am 'Added new feature')
  4. Push your branch (git push origin feature/new-feature)
  5. Create a Pull Request

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

k9crypt-0.1.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

k9crypt-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file k9crypt-0.1.0.tar.gz.

File metadata

  • Download URL: k9crypt-0.1.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for k9crypt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f68aed785c6970cb00c49194ea9613a3ab13f0c97204745361b35fa507fb9999
MD5 62327985ae6c601cd2fa58fb429b24c0
BLAKE2b-256 591bdc7638b922b01dc0a66e4fad3ff4e71bf3a61ca6291cf3ec6cf7dc350b38

See more details on using hashes here.

File details

Details for the file k9crypt-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: k9crypt-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for k9crypt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 06b0ff5a7b375a790c9274562e5727bcd3e0b7d01b5c8842bf181d07fb42f363
MD5 07b8ac617ae2c25231f050e963064034
BLAKE2b-256 b3b6665b693354733e6889df64aa5729ad79ccff7136f9b9b7bba0b5ab007dc6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page