Skip to main content

A library for using DANE for identity-secured JWE and JWS.

Project description

A library for using JWE and JWS with DANE for identity-secured messaging.

This library enables the easy generation of signed and encrypted messages, using TLSA records in DNS for public key discovery. This library places the DNS URI in the x5u protected header field. The receiving party uses this field for discovering the public key which is used for verifying message payload.

Note: Currently, only RSA public keys are supported (RSA-OAEP-256 for encryption and RS256 for signing)

Documentation Status https://circleci.com/gh/ValiMail/dane-jwe-jws.svg?style=shield Maintainability Test Coverage

Quick Start

Installation

pip install dane-jwe-jws

Encrypt a message using a DANE-represented identity

from dane_jwe_jws.encryption import Encryption
test_message = "hello world!!"
identity_name = "dns.name.where.cert.lives.in.a.tlsa.record"
encrypted = Encryption.encrypt(test_message, identity_name)
print(encrypted)

More examples

Changelog

v0.5

Fix

  • Fix issue where only PKIX-CD certs were retrieved for authentication. [Ash Wilson]

    Close #9

v0.4 (2021-05-28)

Changes

  • Improve flexibility of Utility.get_pubkey_from_dns(). [Ash Wilson]

    Unspecified dane_type argument for Util.get_pubkey_from_dns() will cause the first entity certificate of any type to be returned.

    Close #7

v0.3 (2021-05-19)

Changes

  • Update CHANGELOG.rst. [Ash Wilson]

  • Add strict mode support. [Ash Wilson]

    Closes #1

Other

v0.2 (2020-09-14)

Fix

  • Correct parsing of DNS URI for message verification. [Ash Wilson]

v0.1 (2020-08-05)

New

  • Initial commit. [Ash Wilson]

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

dane_jwe_jws-0.5.tar.gz (5.9 kB view hashes)

Uploaded Source

Built Distribution

dane_jwe_jws-0.5-py3-none-any.whl (6.9 kB view hashes)

Uploaded Python 3

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