Skip to main content

Cryptographic utility package

An easy and simplified cryptographic utility package (fernet, RSA, hashes...) with some common encryption stuff already programmed (very simple and with common secure parameters by default). It uses the 'cryptography' module

Installation

pip install crypt-utilities

Modules

Symmetric

def encrypt ...
def encrypt_file ...
def decrypt_file ...

Hashes

def derive(data:bytes, salt:bytes, length:int=32, iterations=400000) -> bytes:...

Asymmetric

def rsa_encrypt (...
def generate_rsa_key_pairs (...
def generate_private_key (...
def serialize_pem_public_key (...
def load_pem_private_key (...

Usage Example

# Encrypt with RSA (asymmetric)
# -- John
secret_msg = "Very secret msg to send"
public_key = load_pem_public_key(file_path="./public_key")
encrypted:bytes = rsa_encrypt(secret_msg.encode(), public_key)
...
# Decrypt with RSA (asymmetric)
# -- Michael
private_key_path = str(input(" -> Introduce your private key file path: "))
password = str(input(" -> Introduce the private key password (blank if None was used): "))
if password == "":
    password = None
try:
    private_key = load_pem_private_key(file_path=private_key_path, password=password)
except :
    print("[!] Wrong Password"); exit(1)
secret_msg_sent_by_john = rsa_decrypt(encrypted, private_key).decode()

Metadata

Release files for crypt-utilities 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for crypt-utilities 0.0.7
File Interpreter ABI Platform Actions
crypt_utilities-0.0.7-py3-none-any.whl Python 3 none any Details for crypt_utilities-0.0.7-py3-none-any.whl

Release files / crypt_utilities-0.0.7-py3-none-any.whl

Download URL crypt_utilities-0.0.7-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2300f0f4f7fdc6632652c6c2e9fb332c9d836b094d6f41df4ca79ddc0e4370ec
BLAKE2b-256 checksum
How to use checksums
70998cdaf782ec2564a11170579bbd05e823bdbdb5b0259dd9f13fb58c0926ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

Security for crypt-utilities 0.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page