Cryptography.

B

Bala Nagarajan

Hello,
I am using .NET's cryptography classes(Symmetric algorithm) to
encrypt/decrypt strings and streams. I want to know the place i should store
the Key and the IV values for the algorithms?Since these values are
sensitive information i definitely cannot store them in the code or config
files. Please elucidate me on this.

Thanks
 
B

Brock Allen

Yeah, key management is a big problem. The way many of the built-in keys
are managed for ASP.NET is to encrypt them per-machine with yet another key
and let that key be managed by the LSA. This sounds odd, but I think it's
the best thing we have. So, look into the DPAPI (DataProtected API) in Win32.
I think Dominick has a managed wrapper for v1.x and IIRC there's a managed
wrapper built into v2.0.
 
B

Bala Nagarajan

Thanks a lot guys for helping me out.
My situation is as follows.

My application will require users to logon to the system by supplying their
windows credentials.Since i will have a loaded user profile can i use
DPAPI user specific key to encrypt and decrypt data?Is this a correct
approach?

I want to actually encrypt the whole configuration file during set up. I
intend to encrypt the configuration file and save the encrypted contents to
a different file and delete config file during the set up. Is this a good
appproach? If so how can perform this step (namely file delete and save)
during my set up process?


Thanks

-Bala
 
M

[MSFT]

Hello,

Why do you need to encrypt the whole config file? An asp.net app couldn't
live without a config file and it still was exposed to installation user
after setup.

Luke
 
B

Bala Nagarajan

I am sorry for not saying this first. My application is an windows
application.So my application can live without the config file. Will my
approach make sense now?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,124
Latest member
JuniorPell
Top