Forums, Documentation & Knowledge Base - ComponentSpace

SAMLSignatureException: Failed to generate XML signature. Invalid algorithm specified

By ondrod - 7/20/2017


We have upated to ComponentSpace.SAML2.dll version from older verion of

This upgrade broke our existing integration, because of :
"SAMLSignatureException: Failed to generate XML signature. Invalid algorithm specified". 

I seen you have covered the topic in forum posts:

We were generating self signed certificates for our integrations by code (not using openssl nor makecert),  with Cryptographic Service Provider (CSP) set to "Microsoft Base Cryptographic Provider v1.0", instead of "Microsoft Enhanced RSA and AES Cryptographic Provider". We are using one of SHA256, SHA384 and SHA512 signature algorithms.

I have two questions:
    • Why this was not an issue in version ""? 
    • Is there any way we can upgrade our already generated certificates to use correct CSP, and do not break existing integrations?

Thank you for the answers.

Best Regards
By ComponentSpace - 12/8/2022

The EncryptedAssertion constructor defaults the symmetric key encryption method to "" and the data encryption method to "".

What version of the SAML library are you using?

What version of the .NET framework are you using?

Have you tried the same code but specifying the "sp.cer" certificate that we include with the example projects? This will help identify whether the issue is related to your certificate.

If there's still an issue, please enable SAML trace and send the generated log file as an email attachment to [email protected] mentioning your forum post.