Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

No project description provided

Project description

Compact pure-Python RSA verification.

rsalette provides a compact, < 200 lines, pure-Python 2+3, single file RSA verification library that is compatible with JSON Web Key.

It includes a JSON Web Signature (JWS) / JSON Web Token (JWT) verifier that can be used for OpenID Connect.

It includes asn1lette, a limited asn.1 parser that can parse RSA public keys from PEM or DER data.

rsalette comes with no warranty, but if you’d like to do an audit, it’s short.

Usage:

import rsalette
verifier = rsalette.PublicKey.from_jwk({'kty':'RSA', 'e':'AQAB', 'n': ...})
verified_message = verifier.verify(message, signature)

For JSON Web Token:

openid_configuration = { ... } # value from .well-known/openid-configuration
id_token = '...' # value from OpenID Connect remote user
jwks = requests.get(openid_configuration['jwks_uri']).json()
payload = rsalette.verify_jwt(id_token, jwks)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for rsalette, version 0.4.2
Filename, size File type Python version Upload date Hashes
Filename, size rsalette-0.4.2-py2.py3-none-any.whl (4.7 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size rsalette-0.4.2.tar.gz (7.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page