Luke Ross


2 branches 3 releases 7 commits xmlsec_pgp-master-2018-06-09.tar.gz git clone

xmlenc and xmldsig with PGP keys.

master /

.gitignore Initial commit 2 years ago
LICENSE Update year 2 months ago
README.rst some change 2017-06-01 12:34:45 Make description work on pypi 2 months ago



Ability to encrypt XML and add XML signatures to documents using PGP keys.

Requires the following python libraries:

- xmlsec
- PGPy
- cryptography

``xmlsec_pgp`` provides a replacement SignatureContext(), EncryptionContext()
and KeysManager() which can accept PGPy keys, and can then sign, verify,
encrypt and decrypt as normal.

There is also the call ``xmlsec_pgp.add_pgp_data(key_info_node)`` to make
``<PGPData>`` tags which are filled out with the PGP key ID and PGP public key.

There appear to be very few implementations of this specification, so
interoperability testing has been minimal and feedback is welcome.

LibreOffice implements document signing using PGP+xmldsig, but the generated
signatures do not appear to verify using this module, or with the ``xmlsec1``
command line tool (and a suitable PEM-encoded public key to bridge the gap).
More investigation is required to identify whether the issue is in how
libxmlsec handles the document, or whether the LibreOffice document format is
incorrecly encoding the signature format, causing a mismatch.

This software is licensed under the MIT license. Please see the accompanying
``LICENSE`` file.