Luke Ross

xmlsec_pgp

2 branches 3 releases 7 commits xmlsec_pgp-master-2018-06-09.tar.gz git clone https://lukeross.name/projects/xmlsec_pgp.git/

xmlenc and xmldsig with PGP keys.

master /

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

README.rst

xmlsec_pgp
==========

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.