Skip to main content

Kinetic Effective Key

Project description

KEK

Python Python License Status Documentation Status

Kinetic Encryption Key


This library provides symmetric, asymmetric (public key), hybrid (symmetric + asymmetric) encryption.

It was build using cryptography library and has uncomplicated interface.

Algorithms:

  • AES in CBC mode (128-256 bit)

  • RSA (2048-4096 bit)


Read the documentation on ReadTheDocs!


Installation

Use the package manager pip to install KEK.

pip install gnukek

Usage

Import key objects:

from KEK.hybrid import PrivateKEK, PublicKEK

To generate key:

private_key = PrivateKEK.generate()

To generate public key object:

public_key = private_key.public_key

To encrypt data:

encrypted = public_key.encrypt(b"byte data")

You can also encrypt data using private key object: private_key.encrypt()

To decrypt data:

decrypted = private_key.decrypt(encrypted) # b"byte data"

To sign data:

data = b"byte data"
signature = private_key.sign(data) 

To verify signature:

public_key.verify(signature, data) # True

Both private and public keys can be serialized in PEM encoded PKCS8 format:

serialized_key = private_key.serialize()
loaded_private_key = PrivateKEK.load(serialized_key)

Hybrid encryption

How it works?

Encrypted data consists of:

License

GPLv3 license

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

gnukek-1.0.0b3.tar.gz (19.0 kB view hashes)

Uploaded Source

Built Distribution

gnukek-1.0.0b3-py3-none-any.whl (21.3 kB view hashes)

Uploaded Python 3

Supported by

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