Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 One way encryption

Author  Topic 

MGA
Starting Member

28 Posts

Posted - 2009-09-26 : 08:22:02
I am developing a datatbase for a web site for a commerical company and there are alot of columns that represents passwords for the users and other for the company employees and clients.
For privacy no one can see these passwords even me or the admin shouldent see them.
How can i encrypt these columns so that i cannot see them ?and how will i deal with them ?
There are a windows application that demostrate the database using C#.net and the web apllication olso with C# so is the encryption will be on th C# side or will be only one the database side ?
Thanks

asgast
Posting Yak Master

149 Posts

Posted - 2009-09-28 : 03:55:43
standard procedure is: use any one way encryption algorithm save result in the password field, in our C# front end convert user input through your encryption and compare it to the value in the password field.

This is just a general idea, I have never implemented such solution, but it should work.
It'' our decision where to encrypt the data in C3 or sql.
Go to Top of Page

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2009-09-28 : 06:44:58
You should read about MD5 which is a one-way hashing algorithm widely used for this purpose.

Here is a sql server implementation:
http://www.codeproject.com/KB/database/xp_md5.aspx

- Lumbago
http://xkcd.com/327/
Go to Top of Page

Yukite
Starting Member

3 Posts

Posted - 2009-09-28 : 07:32:21
MD5 can't be looked at as secure anymore. I'd at least a SHA-2 algorithm if security is of great importance.
Go to Top of Page
   

- Advertisement -