Welcome to MSDN Blogs Sign in | Join | Help

Decrypt my World

Cryptography, Security, Debugging and more!

News

  • Any of my posts is supported under any Microsoft standard support program or service. They are provided "AS IS" without warranty of any kind, and confer no rights.

Where are my readers?

Locations of visitors to this page

Favorite Posts

Browse by Tags

All Tags » RSACryptoServiceProvider   (RSS)
Default Provider Type for CspParameters has changed
Hi all, Before .NET Framework 3.5 SP1 , the default provider type for CspParameters was PROV_RSA_FULL (1) . Now it's PROV_RSA_AES (24) for all operating systems which support Microsoft Enhanced RSA and AES Cryptographic Provider (WinXP and higher). So Read More...
RSACryptoServiceProvider fails if we delete a user from the machine
Hi all, The other day a customer of mine had an interesting issue: a specific user runs their application for the first time without problem on a machine. Any other user can run the app without problems on the same machine, too. If that specific user Read More...
RSACryptoServiceProvider.Encrypt returns "Key not valid for use in specified state" error
Hi all, When executing RSACryptoServiceProvider.Encrypt method (see How to generate key pairs, encrypt and decrypt data with .NET (C#) for an example), you may get a System.Security.Cryptography.CryptographicException . According to MSDN , this is to Read More...
How to generate key pairs, encrypt and decrypt data with .NET (C#)
Hi all, The other day a colleague of mine asked me if I had a .NET version of the C++ sample in How to generate key pairs, encrypt and decrypt data with CryptoAPI post. C++ sample calls CryptoAPI directly (and you know we can do the same thing in .NET 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...
How to Sign and Verify the signature with .NET and a certificate (C#)
Hi all, Today I'm posting a sample which shows how to sign a text with a certificate in my Personal store (this cert will have public and private key associated to it) and how to verify that signature with a .cer file (for i.e. WinForms) applications Read More...
How to sign an XML and verify the signature with .NET (VB.NET)
Hi all, Today I'm posting a sample which signs an XML with or without a certificate (PFX file) and verifies the signature, all that with .NET and its SignedXml class. I won't include in the sample the code that VS designer includes when I add the textboxes 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...
RSACryptoServiceProvider fails when used with mandatory profiles
Hi, welcome back, I will talk today about a very common issue we face when we try to use .NET's RSACryptoServiceProvider ( http://msdn2.microsoft.com/en-us/library/system.security.cryptography.rsacryptoserviceprovider.aspx ) class with mandatory profiles Read More...
Page view tracker