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
2
votes
3 answers
Securing a symmetric encryption key in memory
I have an application where I am retrieving the symmetric encryption key present in the disk and using it to encrypt data. The encryption key is retrieved from the disk when the program starts and is stored as an array of bytes in a private class…

hecate
- 620
- 1
- 8
- 33
2
votes
1 answer
How to encrypt string in Java using Windows DPAPI using the system context instead of the user context?
I'm trying to encrypt a password to be stored across multiple instances of my program, but it needs to be able to be decrypted by all users on the machine. I have already looked around for options, and had javaDPAPI recommended to me. However, this…

Samuel Grubbs
- 21
- 2
2
votes
1 answer
Which encryption algorithm does the ProtectData class use?
I'm aware that the ProtectedData class ends up calling Windows's Data Protection API (DPAPI). The documentation on the DPAPI function provides details like where the key is stored, who can decrypt the data, etc. However, I haven't been able to find…

EJoshuaS - Stand with Ukraine
- 11,977
- 56
- 49
- 78
2
votes
1 answer
Can keychains in IOS be compared to DPAPI in Windows?
On iOS, I am looking for an API equivalent to the encrypt/decrpyt DPAPI functions available on Windows (with CRYPTPROTECT_LOCAL_MACHINE flag not set).
The objective is to persist some application data locally and making its access restricted to the…

Starbuck3000
- 31
- 3
2
votes
1 answer
Protecting connection strings during dev
We need to protect connection strings during development. On servers we use DPAPI which works fine. DPAPI is not an option during dev since the connection strings will need to be decrypted on many machines.
Some of the user names/password used for…

Christoph
- 4,251
- 3
- 24
- 38
2
votes
0 answers
En-/decrypt a (custom) ConfigurationSection with user credentials (non machine specific)
I'm developing a .NET 4.5 desktop-application (wpf). I successfully created a custom section from which I can load/edit data in the App.config. Now I want to encrypt this section and managed to do so with the DPAPI:
SectionInformation secInfo =…

Stacker234
- 33
- 4
2
votes
1 answer
RSA 2048 Ransomware
This is my first post! Here's the thing. CryptoDefense (Cryptolocker's competitor) swept the Internet at the end of February this year. Since it generates text files in all folders it encrypts, I even planned of using the first text file's timestamp…

user3462249
- 21
- 4
2
votes
2 answers
ProtectedData.Unprotect on an IIS application - fails to work after IISRESET
I need to store and retrieve sensitive data from a local database - this data is used by a web application.
In order to protect said data I've opted to make use of the ProtectedData class.
The IIS application is running using a specific AD user…

MBender
- 5,395
- 1
- 42
- 69
2
votes
1 answer
CryptographicException - Unable to update the password
I have some data I wish to protect, so I am using ProtectedData to encrypt it onto a file.
When I am attempting to read and decrypt the data I am getting the strangest exception:
CryptographicException - Unable to update the password. The value…

Nadavrbn
- 175
- 2
- 13
2
votes
1 answer
Can I use DPAPI (or something like it) in VBA?
another in my beginnerish series of questions about VBA.
I am in the process of writing an Excel add-in in VBA, and the add-in uses a local configuration file.
This file needs to contain a password for a remote service.
Obviously, it is less than…

Josh
- 4,412
- 7
- 38
- 41
1
vote
1 answer
How can I decrypt a string using CryptUnprotectData
I have been trying to decrypt some encrypted data (AES key encrypting chrome cookies) via the c++ CryptUnprotectData function for a short while now, but I cant seem to get it working. Currently the function will fail and return an error code of 13…

rando314
- 11
- 2
1
vote
1 answer
Decrypt Secure Strings in Windows DPAPI using Python
Given a Windows DPAPI file with values stored as Secure Strings How would one decrypt those values in Python? The secure string is created with PowerShell like this.
$global:Credentials.AuthToken = Read-Host -AsSecureString -Prompt…

user19736286
- 21
- 5
1
vote
1 answer
C# DPAPI DataProtector equivalent in python 3
I have code written in C# that creates DataProtector which then is used to protect tokens in config
C# code
//constructor code
var appLocalDir = Directory.CreateDirectory(Path.Combine(localApplicationData, ""));
var provider =…

Zenek
- 70
- 5
1
vote
1 answer
DPAPI ProtectedMemory.Protect is not encrypting byte array
I was beginning to explore the DPAPI and my very first sample code does not work. What I expected was for my byte array to change after a call to [ProtectedMemory]::Protect(). However, the byte array was exactly the same before and after the call.…

nickdmax
- 539
- 2
- 4
- 11
1
vote
1 answer
Data Protection in .NET6 with multiple web applications
I have 2 load balanced IIS servers - mirrored.
Each server has multiple .NetFramework web applications.
Each app is running under different pool user and the code is placed in different folders.
Now I need to migrate these apps to .NET6
I have MSSQL…

Boris Maslennikov
- 115
- 7