Welcome to MSDN Blogs Sign in | Join | Help

Decrypt my World

Cryptography, Security, Debugging and more!

Browse by Tags

All Tags » CryptoAPI » System.Security   (RSS)
Access Violation exception when loading a certificate in .NET (Windows Server 2003)
Hi all You may get an Access Violation exception when loading a certificate into a X509Certificate2 object, only after installing KB 938397 hotfix ( crypt32.dll v5.131.3790.4095 ) at Applications that use the Cryptography API cannot validate an X.509 Read More...
Working with CNG in .NET 3.5
Hi all, Do you want to work with CNG and .NET 3.5 and don't want to P/Invoke into CryptoAPI & CNG API ? Check out Security.Cryptography.dll library at CLR Security : " Security.Cryptography.dll provides a new set of algorithm implementations to augment Read More...
CryptographicException: The data to be decrypted exceeds the maximum for this modulus of 0 bytes
Hi all, Some time ago a customer of mine was getting the following CryptographicException when calling EncryptedXml.DecryptDocument method to decrypt an XmlDocument in their .NET app: [System.Security.Cryptography.CryptographicException] = {" The data Read More...
X509Certificate creates temporary files which are never deleted
Hi all, When creating an X509Certificate object in your .NET application (" X509Certificate cert = new X509Certificate(certBytes); ") you may see that two 0kb files are created in the Temp folder of your Windows Server 2003 , and are never deleted . After Read More...
How to view a certificate programatically (C#)
Hi all, The following C# sample shows a dialog to view a certificate and its properties . This is the same dialog that appears when we double-click on the cert file in Explorer. I'll use CryptUIDlgViewCertificate API and its CRYPTUI_VIEWCERTIFICATE_STRUCT Read More...
CryptographicException: Unable to open the access token of the current thread
Hi all, When working with RSACryptoServiceProvider , we may get an exception like the following: System.Security.Cryptography. CryptographicException : Unable to open the access token of the current thread at System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 Read More...
Threading issues with RSACryptoServiceProvider
Hi all, When using RSACryptoServiceProvider in i.e. ASP.NET you may get the following exception under a heavy load scenario: "System.Security.Cryptography.CryptographicException: CryptoAPI cryptographic service provider (CSP) for this implementation could Read More...
RSACryptoServiceProvider fails when used with ASP.NET
Hi, welcome back, I will talk today about a very common issue we face when we try to use .NET's RSACryptoServiceProvider class in ASP.NET . When we try to create a new RSACryptoServiceProvider object in this scenario, we may get the following exception: Read More...
Page view tracker