Skip to main content

Python Easy RSA

Upload Python Package

Python Easy RSA is a wrapper that allows decryption, encryption, signing, and verifying signature simpler. You can load your keys from a file or from a string. It is easy to use, fast and free!

Generating Public and Private Key

# the directory where the keys are to be stored
# in this case we are using the current file directory
path = Path(__file__).absolute().parent

# initialize the encrypter
encryption = Encryption(path, name=('public_key.pem', 'private1.pem'))

# generates both private and public keys
encryption.generate_keys()

Loading Existing Private and Public Key

# the directory where the keys are to be stored
# in this case we are using the current file directory
path = Path(__file__).absolute().parent

# initialize the encrypter
encryption = Encryption(path, name=('public_key.pem', 'private1.pem'))

# loads both private and public keys
encryption.load_keys()

# at this point both public and private keys are loaded in memory
# check example below to encrypt using the load or generate keys

Encrypting a message

# the directory where the keys are to be stored
# in this case we are using the current file directory
path = Path(__file__).absolute().parent

# initialize the encrypter
encryption = Encryption(path, name=('public_key.pem', 'private1.pem'))

# generates or load both private and public keys
encryption.load_keys() # or encryption.generate_keys()

encrypted = encryption.encrypt('hello world')

# return encrypted string

decrypted = encryption.decrypt(encrypted)

# returns a decrypted message 
# 'hello world'

Encrypt with a custom key from a custom file

# one time encryption

# load a public key file
file_content = open('file.pem')

encryption = Encryption()

encrypted = encryption.encrypt('hello world', file_content)

Decrypt with a custom key from a custom file

# one time decryption

file_content = open('file.pem')

encryption = Encryption()

encrypted_message = 'somethin encrypted'

decrypted = encryption.decrypt('hello world', file_content)

# returns a decrypted message

Sign and Verify Message

# loads key from file
encryption = Encryption(path, name=('public_key.pem', 'private1.pem'))

# generates or load both private and public keys
encryption.load_keys() # or encryption.generate_keys()

# sign a string with a private key
hash = encryption.sign('hello world') # or encryption.sign('hello world', private_key_rfrom_file)
# returns a signed hash 

# verify if a message is signed by a private key using its counter public key 
verified = encryption.verify_sign('hello world', hash) # or encryption.verify_sign('hello world', hash, public_key_from_file)
# returns bool

Metadata

Release files for python-easy-rsa 1.0.1

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

Source distribution (sdist)

Source distribution for python-easy-rsa 1.0.1
File Size Uploaded Provenance Actions
python_easy_rsa-1.0.1.tar.gz 4.6 kB Without provenance Details for python_easy_rsa-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for python-easy-rsa 1.0.1
File Interpreter ABI Platform Actions
python_easy_rsa-1.0.1-py3-none-any.whl Python 3 none any Details for python_easy_rsa-1.0.1-py3-none-any.whl

Total release size: 8.9 kB

Release files / python_easy_rsa-1.0.1.tar.gz

Download URL python_easy_rsa-1.0.1.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
46381133e1c8917d7913b47a0a06f9e09a86699622efbbf5ab2e13d7026173ee
BLAKE2b-256 checksum
How to use checksums
a15d1b05825f443b716a98c037c9171d1f91608a92fbd6e41c717ae1c5e47fe2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

Release files / python_easy_rsa-1.0.1-py3-none-any.whl

Download URL python_easy_rsa-1.0.1-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fce485dc7a334d58c02d04e315490a051bd755d2db03c6c2edb0d1ad221377d9
BLAKE2b-256 checksum
How to use checksums
4949044c29986b5563c7557c48dd97576d41d94a2536d77de16702b2f589ae58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

Security for python-easy-rsa 1.0.1

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.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

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