RapidRSA
Simpler to use implementation of the pycryptodome RSA algorithm
Example Use
from rapidrsa import rsa
rsa = rsa()
e = rsa.encrypt("Example Text")
d = rsa.decrypt(e)
Easily Create and Verify Signatures
from rapidrsa import rsa
rsa = rsa()
e = rsa.encrypt("Example Text")
signature, digest = rsa.create_signature(message)
if rsa.verify_signature(signature, digest):
d = rsa.decrypt(e)
Required Dependences From PyPi
pycryptodome >= 3.15.0
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
'''
Metadata
Release files for rapidrsa 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rapidrsa-1.0.0.tar.gz | 5.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rapidrsa-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.5 kB
Release files / rapidrsa-1.0.0.tar.gz
| Download URL | rapidrsa-1.0.0.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30bb6393dacfe33328ec566f5c8d552228899e77091c77d7b6ab81456719961e
|
|
BLAKE2b-256 checksum How to use checksums |
b4dc472bb8a9925d952e59161df02ff92015773cfa7d0c916a55642e7179788d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|
Release files / rapidrsa-1.0.0-py3-none-any.whl
| Download URL | rapidrsa-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6e59094b2760534074cf282af5eebac8bd2d9281bc4e1c2809635e6a78e34574
|
|
BLAKE2b-256 checksum How to use checksums |
09a90c0b51e91626485d7c71dd44f4e2d2b9749eb986a2cb39461ecead44e6fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|