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 » CryptAcquireContext   (RSS)
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...
CryptAcquireContext fails with NTE_BAD_KEYSET
Hi all, When we try to access a key container, CryptAcquireContext may return NTE_BAD_KEYSET (or error # 0x80090016 or -2146893802 or "Keyset does not exist") for the following two reasons: 1) key container doesn't exist . You may repeat the call to CryptAcquireContext, Read More...
CryptAcquireContext fails with ERROR_FILE_NOT_FOUND
Hi all, welcome back, CryptAcquireContext API will fail with error #2 or ERROR_FILE_NOT_FOUND if: 1) the user's profile is not loaded, as we saw in my post RSACryptoServiceProvider fails when used with ASP.NET . 2) AppData registry value in the following Read More...
How to select which Smart Card reader to perform actions on
Hi all, welcome back, Most of the time we only have a smart card reader in our machine, and we only use one smart card to perform crypto operations. But what if we have several readers and cards , and those cards share the same CSP (Cryptographic Service 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...
How to trace CryptoAPI calls (2)
Hi, welcome back, Let's try to understand a bit better what's going on my CryptoAPI Tracer script . Let's take a look to one of the most important breakpoints I set on a CryptoAPI function: bm Advapi32!CryptAcquireContextW ".printf \"\\n>>>>>>>>>>>>>>>>>>>>>>\\n\\nCryptAcquireContextW 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