Home All Groups Group Topic Archive Search About
Author
17 Aug 2006 7:35 PM
Vikas Manghani
Hi
I have to encrypt and decrypt some data for which I have to use a symmetric
algorithm. I want to store the key securely.
I know this can be done in hardware as well as software. But I am only
considering
the software implementation.
Can anyone guide me as to how can I store the key securely as well as retrieve
it easily in code. I am using .Net 1.1

Thanks in advance
Vikas Manghani

Author
18 Aug 2006 5:21 PM
Eric Chaves
Hi Vikas,

    Search for DPAPI in google;

Cheers,

Eric.

Show quote
"Vikas Manghani" <VikasMangh***@discussions.microsoft.com> wrote in message
news:E95CE6F5-8FF1-4D3B-A0CF-E6DA3896921F@microsoft.com...
> Hi
> I have to encrypt and decrypt some data for which I have to use a
> symmetric
> algorithm. I want to store the key securely.
> I know this can be done in hardware as well as software. But I am only
> considering
> the software implementation.
> Can anyone guide me as to how can I store the key securely as well as
> retrieve
> it easily in code. I am using .Net 1.1
>
> Thanks in advance
> Vikas Manghani
>
Author
18 Aug 2006 11:06 PM
Carl Daniel [VC++ MVP]
"Vikas Manghani" <VikasMangh***@discussions.microsoft.com> wrote in message
news:E95CE6F5-8FF1-4D3B-A0CF-E6DA3896921F@microsoft.com...
> Hi
> I have to encrypt and decrypt some data for which I have to use a
> symmetric
> algorithm. I want to store the key securely.
> I know this can be done in hardware as well as software. But I am only
> considering
> the software implementation.
> Can anyone guide me as to how can I store the key securely as well as
> retrieve
> it easily in code. I am using .Net 1.1

Under .NET 2.0 you can use System.Security.Cryptography.ProtectData.  Under
1.x, you'll have to implement similar functionality yourself by directly
interacting with DPAPI.

Here's a place to start:

http://www.pinvoke.net/default.aspx/crypt32/CryptProtectData.html

-cd

AddThis Social Bookmark Button