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

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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dane_jwe_jws-0.4-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file dane_jwe_jws-0.4.tar.gz.

File metadata

  • Download URL: dane_jwe_jws-0.4.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10

File hashes

Hashes for dane_jwe_jws-0.4.tar.gz
Algorithm Hash digest
SHA256 91a633c5b58cd40bf6c10c721cc6afad4670328c16c47d2f2205e2b74c01e19e
MD5 efd0b6344a388879fc5519e83dd2bb9c
BLAKE2b-256 3c852e7a0113192df1fc57e5404d99d32af53de08178e64ac1cf8bcf7651916a

See more details on using hashes here.

File details

Details for the file dane_jwe_jws-0.4-py3-none-any.whl.

File metadata

  • Download URL: dane_jwe_jws-0.4-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10

File hashes

Hashes for dane_jwe_jws-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0cf966a6e4e48140ec4de2b632ecf60fc9d8e01193825780a1775757416ebcf7
MD5 3b9b422ea9afea4e451b5e0106aecd8a
BLAKE2b-256 79d404e2f13abc815c784b68e68d06d32dab404a8324e9ca4de1527f3010c535

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page