DPAPI is the API in Windows that allows a program to store "secrets", like passwords. It is used by Microsoft in IE and storing WiFi passwords and private keys for EFS, and also by Chrome for Windows and Safari for Windows, to store website credentials.
Questions tagged [dpapi]
150 questions
3
votes
1 answer
Does DPAPI automatically do Dynamic Salt?
I'm looking into using Windows' Data Protection API (DPAPI) to encrypt some data. One requirement I have is to use a Dynamic Salt when encrypting values.
I have noticed through testing that if I encrypt the same string multiple times, I get a…

XenoPuTtSs
- 1,254
- 1
- 11
- 31
3
votes
1 answer
IIS - AddDataProtection PersistKeysToFileSystem not creating
I've developing an asp.net core application to tun on a web far, and I'm using "AddDataProtection" to protect for key encryption at rest like, the documentation recommends, but when I deploy my application and run directly from IIS with AppPool…

AndrePinto-NET
- 51
- 2
- 6
3
votes
4 answers
DPAPI NG - NCryptProtectSecret returns NTE_ENCRYPTION_FAILURE
I am trying to encrypt data using DPAPI-NG but it fails on execution of NCryptProtectSecret, it returns:
0x80090034 (NTE_ENCRYPTION_FAILURE)
I have created NCryptCreateProtectionDescriptor with local user…

Zeljko
- 250
- 1
- 2
- 12
3
votes
1 answer
Use DPAPI (Data Protector API) to unprotect data on different computer
I am using DPAPI (Data Protector API) to protect and unprotect data. I am reading data from the file.
C:\Users\nandkishore.sharma\AppData\Local\Google\Chrome\User
Data\Default\WebData.
I am able to read the data from the file (WebData) if I…

user3051870
- 31
- 3
3
votes
1 answer
Would using SecureString in this situation improve security?
My custom .Net process maps a drive with a different account than the current context. The password is stored in the config file, DPAPI encrypted with the machine key.
The code works, but I'm wondering if usage of SecureString would offer…

user640118
- 803
- 2
- 13
- 25
3
votes
0 answers
System.Security.Cryptography Unable to update the password
Reading through this reference article: https://msdn.microsoft.com/en-us/library/xh68ketz(v=vs.110).aspx
Also found the same question asked here: CryptographicException - Unable to update the password
However, there is no answer.
In attempting to…

Hydra IO
- 1,537
- 1
- 13
- 28
3
votes
1 answer
Pass Powershell SecureString to C++ program?
I have a native program that takes a password that is passed in on command line. That password is showing up in server logs so I want to obfuscate it by encrypting it before putting on the command line. I would then decrypt it in the program and use…

RyanL
- 33
- 4
3
votes
1 answer
ProtectedMemory.Unprotect outputs garbage
I've got this code to store and recover an authorization token (which is alphanumeric):
public static void Store (string token)
{
byte[] buffer = Encoding.UTF8.GetBytes (token.PadRight (32));
ProtectedMemory.Protect (buffer,…

miniBill
- 1,743
- 17
- 41
3
votes
1 answer
How to scale SignalR using Azure Worker Role and OWIN
SignalR scales fabulously using Azure Web Roles. However, when I use a self-hosted OWIN project inside an Azure Worker Role, SignalR will begin to exhibit problems when multiple instances are added. For the record, my project uses Redis for the…

Mike
- 2,035
- 1
- 16
- 16
3
votes
2 answers
Getting Access Denied when trying to protect data with DPAPI
I am developing a c# .net 3.5 application on Windows 8.
I need to encrypt data using DPAPI. it works ok on all of my machine except from one machine where I get the following exception: System.Security.Cryptography.CryptographicException Message:…

user844541
- 2,868
- 5
- 32
- 60
3
votes
3 answers
Why to use RSA for DPAPI web farm encryption?
We are about to use DPAPI to encrypt the connection string in our ASP.NET web config file.
But I am confused between using RSA or DPAPI for our web cluster (farm).
The following MSDN links clearly say that we need to use RSA provider if we want to…

Narendra Naidu
- 403
- 2
- 5
- 17
2
votes
1 answer
Using DPAPI for signing and verifying data
I am currently trying to undertand how best to implement signing/verification in a .NET 4.0 C# environment.
My requirment is to be able to sign data within my system as one 'user', at some point later that data needs to be verified by a consumer.
To…

user935653
- 143
- 7
2
votes
0 answers
Using Data Protection API as a key manager for JWT
I'm using JWT as a container for access tokens, and want to add the rotation of the signing keys. I found that Data Protection API provides this functionality out-of-the-box.
While DP API is the interface to (symmetric) encrypt/decrypt the data, JWT…

dr11
- 5,166
- 11
- 35
- 77
2
votes
0 answers
ASPNET CORE: Data Protection takes over 3 minutes when first time startup
My ASPNET CORE MVC startup is too slow, when I check the log file, there was a task that take over 3 mins as below. Could anyone give me some advice?
INFO 2020-10-03 11:06:28,471 [1 ] taProtection.KeyManagement.XmlKeyManager - User profile is…

Hoang Tran
- 886
- 3
- 13
- 32
2
votes
0 answers
Check if the legacy CSP supports 'PP_KEYSET_SEC_DESCR' flag
I imported a pfx in windows certificate store via GUI. When I checked the output of 'certutil -store my CN'
it showed CSP as 'Microsoft Enhanced Cryptographic Provider v1.0' which is legacy CSP not the new CNG one. I'm using windows 2012 server.
( I…

Suraj
- 184
- 1
- 14