Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
25 views

Data Protection API (DPAPI) : what algorithm is used to encrypt the data [duplicate]

In document only mentioned that "It provides protection using the user or machine credentials to encrypt or decrypt data." but there is no explanation about what algorithm is used to encrypt ...
Jojo Peter's user avatar
0 votes
0 answers
101 views

Why is RsaCryptoServiceProvider.FromXmlString throwing a WindowsCryptographicException about a file being in use?

I am using the RSACryptoServiceProvider class from .NET 6 to do some signing operations and am running into an unknown WindowsCryptoGraphicException when loading key information from an XML string. ...
DeveloperJC's user avatar
2 votes
1 answer
330 views

RSACryptoServiceProvider.VerifyData doesn't work properly on different Windows versions

Introduction I have a digital code signing logic in my application. I use custom signing tool which signs dll files and create .sig text files with signed hash values. This tool runs on .NET 6, gets ...
Dmitry Grebennikov's user avatar
0 votes
1 answer
191 views

Does .NET 6.0 have its own cryptography libs that will enable more secure ciphers than the OS supports?

Does .NET 6.0 have its own libraries that will allow support for later more secure cryptography ciphers for TLS that are not currently support on Windows 2012? Eg TLS 1.3 or 1.2 with GCM or POLY1305 ...
Joel Duckworth's user avatar
0 votes
0 answers
1k views

CryptDecodeObjectEx fails with CRYPT_E_ASN1_BADTAG

I am trying to verify a HMAC but CryptDecodeObjectEx is returning an error. First, I have exported a PEM from a PFX. I export via .NET using pem = Convert.ToBase64String(x509Cert.Export(...
barneyAgumble's user avatar
0 votes
0 answers
172 views

Can I decrypt a .gpg file by using Windows CNG store?

I'm creating this tool in C# that would take a .gpg file and decrypt it using Windows CNG. I get a .gpg file as my input parameter and it is encrypted with my key using WinPT. Decrypting it works with ...
Tomaz Leopold's user avatar
0 votes
1 answer
2k views

Using ProtectedData.Protect() for files

I'm working on some code that ideally can encrypt a file using the Windows DPAPI. This is fine if the file can be read directly into memory, but if it can't I cannot encrypt it. ProtectedData.Protect ...
John's user avatar
  • 638
1 vote
1 answer
66 views

My decrypted password is 1 character to short

So I have this encryption / decryption code: private string Crypt(string strData, string strPassword, bool bEncrypt) { byte[] u8_Salt = new byte[] { xxx }; PasswordDeriveBytes i_Pass ...
Andrew Truckle's user avatar
-1 votes
1 answer
35 views

Hashing a password in .net

I'd like to store passwords in a database. How secure is the following code: static string ComputeHash(string password, string salt, int iteration) { Rfc2898DeriveBytes hash = new ...
synergetic's user avatar
  • 8,026
2 votes
1 answer
228 views

Correct CryptoAPITransform use? Memory leak

I've ported an old piece of unmanaged code that used Crypto API to 100% managed .NET code. The code used DES algorithm, and had to maintain it for several reasons. Since the CryptoAPITransform ...
Neverbirth's user avatar
  • 1,032
2 votes
1 answer
4k views

Windows CNG custom key storage provider

How to register a custom key storage provider in CNG with its own key BLOB format, etc? What I really want to do is to provide an ability to handle a custom CNG key BLOB format in .NET. I've read in ...
wilkexx's user avatar
  • 113
3 votes
3 answers
9k views

What's a simple way to encrypt and decrypt strings with a user-supplied password that works in both native Win32 and .NET?

I have a native Win32 client application, and a .NET web application. I'd like to be able to encrypt a string on the client (given a user supplied password), and to be able to decrypt this string on ...
Troy's user avatar
  • 1,257
7 votes
2 answers
4k views

Translating Win32 Crypto API calls to C# with System.Security.Cryptography

I have been given an assignment to drop one of our product's dll and replace it with a pure C# one. The old DLL is a .NET 2.0 Managed C++ (C++\CLI) which wraps calls to the Win32 native Crypto API. ...
OmriSela's user avatar
  • 566
-1 votes
1 answer
238 views

Shared but Secure Memory between 3 Different Apps (Windows)

We are writing a set of application for windows which contains IE toolbar, Firefox toolbar and Windows Desktop client. Before using any of these components user provides his secret code and says that ...
Mubashar's user avatar
  • 12.6k