Re: Encrypted configuration file?



mike3 <mike4ty4@xxxxxxxxx> wrote:
1. For authentication, upon saving out the config, we attach an MAC
generated with a user-supplied password, which also locks the
configuration program. [...]

2. For obscurity, we encrypt the config with a key stored in another
file somewhere else on the drive, [...]

How good is this system, given the purpose of it?

The obvious objection is that if someone can tamper with the configuration
file, why can't they tamper with the program? If they can tamper with
the program, then everything is trivially lost.

However, if you have an obscure sitation where the adversary cannot
tamper with the program, but can tamper with the configuration file,
the MAC trick will work. (Passwords are a problem, it would be better
to use something else, but it has to be stored securely. That may or
may not be difficult.)

The encryption trick is just obscurity, as you know. Make sure you encrypt
after you MAC, _not_ before, since if the adversary can tamper with the
key, he may be able to modify the decryption in a sensible way.

--
Kristian Gjøsteen
.



Relevant Pages

  • Re: Encrypted configuration file?
    ... For obscurity, we encrypt the config with a key stored in another ... The obvious objection is that if someone can tamper with the configuration ... Is the user-supplied password changed with each change to the file? ...
    (sci.crypt)
  • Re: Unable to create virtual directory from file
    ... the exported configuration file has never been encrypted -- you ... will always get a valid XML file for export. ... What "encrypt configuration ... I'm trying to export/import a virtual directory in IIS6 running on a Windows ...
    (microsoft.public.inetserver.iis)
  • Re: Error with Encrypting identity section of web.config
    ... You cannot use protected configuration to encrypt the configProtectedData section of a configuration file. ... You also cannot use protected configuration to encrypt the configuration sections that do not employ a section handler or sections that are part of the managed cryptography configuration. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • RE: ??? Which Key Encrypts .Config Files ???
    ... encryption and decryption key is stored when you encrypt the configuration ... mechanism, to encrypt the configurations. ... machine level key container by default. ... When we decrypt the configuration information, ...
    (microsoft.public.dotnet.framework)
  • RE: Asp.net 2.0 deployment with encryption
    ... As for the ASP.NET 2.0 configuration section protection, ... encryption which use a single shared session key to encrypt and decrypte ... The RSA approach is just based on RSA asymmetric data encryption/decryption ...
    (microsoft.public.dotnet.framework.aspnet)