<?xml version="1.0" encoding="windows-1252"?>
<node id="767084" title="Re^2: Where should I have configuration information in a file or database" created="2009-05-30 19:10:44" updated="2009-05-30 19:10:44">
<type id="11">
note</type>
<author id="747201">
afoken</author>
<data>
<field name="doctext">
&lt;blockquote&gt;sections in the config file to store sensitive content that must be encrypted ie the connection string and must be decrypted by the application.&lt;/blockquote&gt;
&lt;p&gt;This may give you a warm fuzzy feeling that you have used encryption and so everything simply just &lt;b&gt;must&lt;/b&gt; be safe.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;But&lt;/b&gt; this is just a little annoyance for anyone trying to get the data: The application must contain the decryption code, and it must contain the decryption key. Both can be extracted, and with the addition of a few simple print statements, you can see the "protected" information in plain text. If the decryption code is burried in the runtime environment, things become even easier for an attacker: Just find the key, call the runtime environment's decryption routine in your own ten line script, and print what it returns when processing the "protected" information.&lt;/p&gt;
&lt;p&gt;Oh, and I almost forgot: How does it help to encrypt information in a config file that are afterwards transmitted in clear through the network, e.g. when connecting to a MySQL or FTP server?&lt;/p&gt;
&lt;p&gt;Alexander&lt;/p&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-747201"&gt;
--&lt;br&gt;
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
766845</field>
<field name="parent_node">
766896</field>
</data>
</node>
