Skip to main content

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.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
'''

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

Uploaded Source

Built Distribution

rapidrsa-0.0.7-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file rapidrsa-0.0.7.tar.gz.

File metadata

  • Download URL: rapidrsa-0.0.7.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.8.3 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.5

File hashes

Hashes for rapidrsa-0.0.7.tar.gz
Algorithm Hash digest
SHA256 dd8eae93f7b38a4b16261609a8711f79d34c7da336794ab9b5b810320a4c5950
MD5 61b6aedc91562dfa5ad5bd5270679936
BLAKE2b-256 46a80b510684475fb41b2a7d912eea562e45f3765daa329eea2e57456289c50c

See more details on using hashes here.

File details

Details for the file rapidrsa-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: rapidrsa-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.8.3 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.5

File hashes

Hashes for rapidrsa-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 49dfad85b55adf905226e23f3afbe70236440cddb7721593ab04917629503587
MD5 6575cd4fd448408d5ee6fc4c879d69f6
BLAKE2b-256 716698cd430118fbbbf9796dd7f18f55227c46d51217d0c28e0a305f99f43eab

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