On xmlsec side, you need functions that deal with EVP_PKEY http://www.aleksey.com/xmlsec/api/xmlsec-openssl-evp.html Sorry, I can't help you with openssl side because I did this kind of thing once or twice many years ago. Best, Aleksey