Skip to content

Initial Release - CircuitPython_RSA

Compare
Choose a tag to compare
@brentru brentru released this 20 Aug 15:28
f253a47

CircuitPython_RSA is a port of Python-RSA, a pure-Python RSA implementation to CircuitPython.

Modifications from Python-RSA

  • Command-line-specific tools have been removed from the library to save space.
  • CPython Logging has been replaced with the Adafruit CircuitPython Logger Module.
  • Miller–Rabin Primality test algorithm modified to support library's fast_pow, CircuitPython's pow() does not support modular exponentiation.
  • CPython binascii and hashlib modules replaced with Adafruit_CircuitPython_binascii and Adafruit_CircuitPython_hashlib

Support for:

  • RSA Key pair (private/public) generation
  • Message encryption and decryption
  • Signature creation and verification
    • w/SHA-256, SHA-384, SHA-512 (using Adafruit_CircuitPython_hashlib, pure-python implementation. SHA-1 and MD5 are currently unsupported.)

Examples are provided for signature creation/verification, keypair generation and encryption/decryption, and a unit-test-like for testing future modifications to this library.

To use in CircuitPython, simply install the Adafruit CircuitPython bundle.

Read the docs for info on how to use it.