Simpler to use implementation of the pycryptodome RSA algorithm
Project description
RapidRSA
Simpler to use implementation of the pycryptodome RSA algorithm
Example Use
message = "Example Text"
rsa = rsa()
e = rsa.encrypt(message)
d = rsa.decrypt(e)
Easily Create and Verify Signatures
message = "Example Text"
rsa = rsa()
e = rsa.encrypt(message)
signature, digest = rsa.create_signature(message)
if rsa.verify_signature(signature, digest):
d = rsa.decrypt(e)
Required Dependences From PyPi
pycryptodome == 3.14.1
Documentation
'''
Classes:
rsa(key_size=2048, public_key=None, private_key=None)
Can be fully functional and secure without passing any arguments
Methods:
keygen(self, key_size: int) -> bytes and bytes
Generates Keys for Encryption/Decryption. The 'key_size' will determine the security
and speed of your data (bigger is more secure, but slower)
encrypt(self, data: str or bytes, public_key=None) -> bytes
Only requires a public key if you don't want to use the class generated key
decrypt(self, encrypted_text: bytes, private_key=None) -> str or bytes
Only requires a private key if you don't want to use the class generated key
create_signature(self, data: str, private_key=None) -> bytes and object
Creates a signature for later verifcation that the data hasn't been tampered
with during transport
verify_signature(self, signature: bytes, digest: object, public_key=None) -> bool
Verifies the signature of the data, ensuring the data hasn't been tampered with
generate_password(self, length=64) -> str
Generates a random password to share with the client/server for symmetric cryptography
'''
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
rapidrsa-0.0.5.tar.gz
(4.8 kB
view details)
Built Distribution
File details
Details for the file rapidrsa-0.0.5.tar.gz
.
File metadata
- Download URL: rapidrsa-0.0.5.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18dcff900827c5744ca2284e64b9c8fc6ac6b955ff0eae0eba1d93ec92b57867 |
|
MD5 | 77c66de3f56188ab5f88455dd2080112 |
|
BLAKE2b-256 | 4dfdad5d540eee412680d797137b237e1e154e9f1f2a478667c6f7873efaae97 |
File details
Details for the file rapidrsa-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: rapidrsa-0.0.5-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f95636f0f792ead50fd2fbe93c5fe5daa19da676112a0daf66c829171712d046 |
|
MD5 | e73a9f26aa93aac2b2d695d8e26f8758 |
|
BLAKE2b-256 | e584cf329e81ea6ad22d254c2abe392f5667836513fdf48774356466e93be937 |