Skip to main content

generate deterministic RSA key pair and perform encrypt and decrypt operations

Project description

deterministic-rsa-keygen

Use pycryptodome to generate a deterministic RSA key pair and perform encrypt and decrypt operations

Install

pip install deterministic-rsa-keygen

Ussage

from rsa import generate_key, encrypt, decrypt

# as alternatives you can use a bit39 phrase or another key as seed
secret_key = generate_key("the derived key cannot be stronger than this seed")

private_key = secret_key.exportKey("PEM")
public_key = secret_key.publickey().exportKey("PEM")

secret = encrypt("secret", public_key)
assert decrypt(secret, private_key) == bytes("secret", 'utf-8')

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

deterministic-rsa-keygen-0.0.1.tar.gz (6.2 kB view hashes)

Uploaded Source

Built Distribution

deterministic_rsa_keygen-0.0.1-py3-none-any.whl (6.8 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