It sounds like lasso_provider_get_public_key() function is not constructing the public key correctly. BTW, which crypto library do you use? If it is not one of openssl/nss/mscrypto then it is possible that writing key to XML was not implemented by the authors of the xmlsec-crypto port. Aleksey