I have read extensively on SO and on the .NET but still do not think I have a workable solution or I have not considered something.
I am looking at an application that as part of its functionality has to write a document to disk on the web server.
Now assuming the worst and the web server is penetrated and the attacker gets to the file system or due to a misconfiguration of the web server the file is available via HTTP. It seems that encrypting the file would be sensible.
- However would you suggest I use symmetric or asymmetric encryption?
- At some level there will be a secret password that is accessed by the C# code. How do you obfusticate that? Or put another way how to you deal with using secret keys in code in a secure fashion?
All help and pointers greatly appreciated.