Encrypt data before sending to SQL by VB.NET : <p>I need to create an application where most of the data written to DB is encrypted. For that sake it shouldn't be visible/obtainable by any of the super users who can access that DB Server. Which is ok because the data is to be encrypted. The problem is that I should not have a way to see it or way to obtain it neither, however the manager user should be able to see it.</p>

<p>The application will be authenticating users using LDAP however I could grab the password when it's inputed to the form by the user and use that password as an encryption key so all data gets saved to DB encrypted and can be decrypted with that same password.</p>

<p>I have few concerns with this idea:</p>

<ol>
<li>What if the user forgets password and gets a new one by doing password reset on LDAP?</li>
<li>How can I give access to this data to manager user?</li>
</ol>

<p>I am thinking I could store the first password inputed by the user in DB encrypted with some built in function and use the encrypted string without decrypting. I could then give the manager users a way to decrypt this data using those keys but again that means I know how it works so I can take those keys from DB and decrypt if I wanted to.</p>

<p>What is the best approach here?</p>

<p>Regards
Matt</p>
