Pkcs11Interop / Pkcs11Interop.X509Store

Easy to use PKCS#11 based X.509 certificate store
Apache License 2.0
33 stars 18 forks source link

Using ECDSA with SignedXML #27

Closed zosocanuck closed 2 years ago

zosocanuck commented 2 years ago

Hi,

I'm getting the following error when attempting to sign XML with an ECDSA keypair:

Unhandled exception. System.Security.Cryptography.CryptographicException: Failed to create signing key.
   at System.Security.Cryptography.Xml.SignedXml.ComputeSignature()

Any ideas?

jariq commented 2 years ago

After taking a look at the reference source of System.Security.Cryptography.Xml.SignedXml class I would say it currently supports only RSA and DSA algorithms. However quick DuckDuckGo search pointed me to blogpost ECDSA and Custom XML Signatures in .NET that may help you.

jariq commented 2 years ago

You might also take a look at https://github.com/dotnet/runtime/issues/36103

jariq commented 2 years ago

Closing because of 14+ days without a response.