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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03fe628ce0867f2ee878602a59f6c89eacf15bde0352dbc218b7313f8fe4328a |
|
MD5 | 38199a784010eac1ec78385569cbce59 |
|
BLAKE2b-256 | b5b355fa5b06dc25b727862cd8b07abf8db221166cfcfe2a122c5c195adb4f62 |
File details
Details for the file deterministic_rsa_keygen-1.0-py3-none-any.whl
.
File metadata
- Download URL: deterministic_rsa_keygen-1.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-48-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b56b7a9c5fbd2797e277b139cce8c19b5577e64b6bda62b2309303170ea65848 |
|
MD5 | ff98af78092ae10dae8cf8d5bc6260ce |
|
BLAKE2b-256 | 833e3358134fd023415f7767ca5190b2db364db352df9606bbe63dd3fc5b113f |