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-1.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

deterministic_rsa_keygen-1.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file deterministic_rsa_keygen-1.0.tar.gz.

File metadata

  • Download URL: deterministic_rsa_keygen-1.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-48-generic

File hashes

Hashes for deterministic_rsa_keygen-1.0.tar.gz
Algorithm Hash digest
SHA256 03fe628ce0867f2ee878602a59f6c89eacf15bde0352dbc218b7313f8fe4328a
MD5 38199a784010eac1ec78385569cbce59
BLAKE2b-256 b5b355fa5b06dc25b727862cd8b07abf8db221166cfcfe2a122c5c195adb4f62

See more details on using hashes here.

File details

Details for the file deterministic_rsa_keygen-1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for deterministic_rsa_keygen-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b56b7a9c5fbd2797e277b139cce8c19b5577e64b6bda62b2309303170ea65848
MD5 ff98af78092ae10dae8cf8d5bc6260ce
BLAKE2b-256 833e3358134fd023415f7767ca5190b2db364db352df9606bbe63dd3fc5b113f

See more details on using hashes here.

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