Re: SQL Server 2005 encryption with databound controls

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"Alberto Poblacion" <earthling-quitaestoparacontestar@xxxxxxxxxxxxx> skrev i meddelelsen news:#Slp46cZKHA.228@xxxxxxxxxxxxxxxxxxxxxxx
"Finn Stampe Mikkelsen" <stampe@xxxxxxx> wrote in message news:e4rwa5XZKHA.5608@xxxxxxxxxxxxxxxxxxxxxxx
I'm looking for ways to encrypt data in my MDF database (SQL Express) and i wonder if anybody had some examples on how to use it, especially in conjunction with databound controls using dataset's..

When you say "databound controls using datasets", I presume that the controls are bound to a dataset and that you transfer the contents of the dataset from/to the database using a DataAdapter. If you want the contents of the data encrypted inside the database (but not inside the dataset or when travelling from the client to the database), then you can encapsulate all the encryption and decryption inside stored procedures, and you can configure the DataAdapter to use those SPs, rather than the sql queries themselves.
Inside the SPs, you would pass your data through the standard SQL Server 2005 functions for encryption and decryption (EncryptByKey and DecryptByKey) before writing or reading the actual table.

If you were using Sql Server 2008 I would suggest the much simpler avenue of using Transparent Data Encryption, but unfortunately this is not available in the Express version.


Hi

You are quite correct in your assumption. I cannot use SQL 2008, so that is not an option.

Your solution using SP, would that not leave the data vulnerable?? I mean the SP would not itself be encrypted and would the possible hacker of the MDF file be able to decrypt the data by just using this SP??

Pls. excuse me, cause i'm not familiar with the server functions you mentioned, so i'm not sure how they are used. A code example would really help me see the light, so to speak.. ;-))

/Finn
--
Der er 10 slags mennesker - Dem som forstår binær og dem som ikke gør.
There are 10 kinds of people. Those who understand binary and those who don't.
Es gibt 10 Arten von Menschen. Die, die Binär verstehen, bzw. die, die es nicht tuhen.

.



Relevant Pages

  • Re: CREATE SYMMETRIC KEY
    ... AES is only supported by SQL Server on Windows 2003. ... To test it out using encryption, I created a database, TestEncrypt, ... CREATE SYMMETRIC KEY SSN_Key_01 ... DECRYPTION BY CERTIFICATE HumanResources037; ...
    (microsoft.public.sqlserver.security)
  • Re: SQL-Server and Content encryption
    ... SQL Server does not have any encryption features built in like that. ... the encryption and decryption in the application. ... > read the data stored in the SQL-Server database? ...
    (microsoft.public.sqlserver.security)
  • Re: SQL-Server and Content encryption
    ... SQL Server 2000 didn't directly tackle the content encryption problem. ... "Andrew J. Kelly" wrote in message ... >>> the encryption and decryption in the application. ...
    (microsoft.public.sqlserver.security)
  • Re: Example code Help!
    ... Dan has planted a bomb in my heart, ... >between SQL Server versions/service packs and break your ... >> I am searching for example codes for encryption and ... >> decryption of a value for a column in SQL Server 2000. ...
    (microsoft.public.sqlserver.server)
  • Re: SQL or Access DB
    ... As far as encryption goes though... ... with Sql Server you can use SQL DMO and encrypt your stored procedures ... installation - Security was absolutely critical and in most instances, ... > then we create a nice gui around this database and sell it to automotive ...
    (microsoft.public.dotnet.languages.vb)