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.
Source Distribution
Built Distribution
File details
Details for the file rsalette-0.4.2.tar.gz
.
File metadata
- Download URL: rsalette-0.4.2.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
104536d2e74733d7118a6044d52926cc45cce42424d59d9f80322f0bc273cc0b
|
|
MD5 |
dc9ffeb9fa8b8570fa583674562c3a87
|
|
BLAKE2b-256 |
78031ca74b88b9e9d16ef27de5973b4a878463a89a3a0600b1d985907a53b51d
|
File details
Details for the file rsalette-0.4.2-py2.py3-none-any.whl
.
File metadata
- Download URL: rsalette-0.4.2-py2.py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
abd0e1d6e80aa329e36bbebcb8fc2e9928c743eb01a1f654d650d819dae43c1a
|
|
MD5 |
338b9bc3e930f902ecd006d9a630e90d
|
|
BLAKE2b-256 |
b2b4ad267e37b99f89a6e426aa3dafda5d845a7508aff583745046a1b915a429
|