skip to navigation
skip to content

pyXMLSecurity 0.9

pure Python XML Security

Latest Version: 0.17

python XML Security

This is a python implementation of XML-Security - XML-DSIG only right now. There are no dependencies except lxml currently.

This code was inspired by (this implementation is a refactor and extension of that implementation) and includes a pure-python RSA implementation by and with permission from Andrew Yates.

In order to sign with a PKCS#11-module you need to install pykcs11 (

This package is available under the NORDUnet BSD license (cf LICENSE.txt)


  • only support for enveloped signatures
  • only support for RSA-SHA1 signatures
  • no encryption support

Some of those limitations might be addressed. Patches and pull-requests are most welcome!



Release date: UNRELEASED


Release date: Mon Aug 27 12:42:45 CEST 2012

  • more rubust algorithm uri parsing
  • support for “#”-style IDs
  • partial support for <Transform/> elts with child-elements
  • make all exceptions an XMLSecException
  • first draft: sign
  • various cleanups


Release date: Tue Aug 28 09:46:47 CEST 2012

  • handle #-style references (remove top-level comments and PIs)
  • don’t unescape &amp; &lt; and &gt;
  • don’t give empty inclusive ns prefix list to c14n
  • move exception to separate file
  • first version of the pkcs11 shim layer


Release date: Wed Aug 29 12:43:05 CEST 2012

  • starting on tests
  • cleanup pkcs11 layer
  • various bugfixes and cleanup


Release date: Wed Sep 5 11:52:58 CEST 2012

  • Fix bug when signing using non-p11 keys
  • More robust PEM-unfolding


Release date: Fri Nov 30 10:29:03 CET 2012


Release date: Mon Feb 4 15:53:32 CET 2013

  • Minor fixes


Release date: Wed Apr 3 09:05:53 CEST 2013

  • Multiple bugfixes
  • More SAML and P11 testcases


Release date: Mon Jun 24 11:24:20 CEST 2013

  • Bugfixes
  • Protection against wrapping attacks (new API!)
File Type Py Version Uploaded on Size
pyXMLSecurity-0.9.tar.gz (md5) Source 2013-06-24 47KB