question

SUBRAMANIANPrabhakaran-8794 avatar image
0 Votes"
SUBRAMANIANPrabhakaran-8794 asked SUBRAMANIANPrabhakaran-8794 edited

How to use Microsoft software Key Storage Provider in Windows 10 and Windows Server 2016?

Hi Team,

I want to protect my application configuration file through Microsoft Key Storage Provider (Cryptography API: Next Generation (CNG)) mechanism.
How to use Microsoft Key Storage Provider in Windows 2010 and Windows Server 2016 Operating Systems?
Could you please help me on this?

I have gone through the below link which is supports only in Windows Server 2008 and Windows Vista.

https://docs.microsoft.com/en-us/windows/win32/seccng/key-storage-and-retrieval


Regards,
Prabhakaran

dotnet-csharpwindows-apidotnet-runtime
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

XiaopoYang-MSFT avatar image
0 Votes"
XiaopoYang-MSFT answered SUBRAMANIANPrabhakaran-8794 edited

It seems Windows Server 2008 and Windows Vista is the Minimum supported server and client. And for using CNG, please refer to the segment.

· 8
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,
Thanks for your information.
Can i protect a file(like text file, ini file, etc..) through key storage provider?
if it is possible, how can i achieve it in C#.Net?

0 Votes 0 ·
XiaopoYang-MSFT avatar image XiaopoYang-MSFT SUBRAMANIANPrabhakaran-8794 ·

Yes. The file data is the equivalent of rgbPlaintext. Using CNG is the same as Calling Native Functions from Managed Code.

0 Votes 0 ·

Thanks for your response.
I don't understand about CNG and Key storage provider.
What is CNG? Why does it required?
What is different between CNG and Key storage provider?

My requirement is :
i have a C#.Net console application which collects some important data from a configuration file (.ini file). I want to protect/secure this configuration file in Windows operating system by using key storage provider.
How can i achieve it?

0 Votes 0 ·
Show more comments
XiaopoYang-MSFT avatar image XiaopoYang-MSFT SUBRAMANIANPrabhakaran-8794 ·
0 Votes 0 ·

Thanks for your response.

Could you please share C# Code of SignHash the file and then VerifySignature.?
Your link code implemented in C++ language.

0 Votes 0 ·
Show more comments