I have not used the keystore myself, but you may want to consider xmlsec and pyxmlsec. See... http://www.aleksey.com/xmlsec/ http://pyxmlsec.labs.libre-entreprise.org/