Solved

Is it possible to encrypt the login table (username and password) with AES or DES

Posted on 2008-10-12
9
174 Views
Last Modified: 2010-03-19
Thanks
0
Comment
Question by:turbot_yu
  • 4
  • 4
9 Comments
 
LVL 59

Accepted Solution

by:
Kevin Cross earned 400 total points
ID: 22697773
I usually do this from the application that logging into.  And I have never tried with username, but in theory should work the same as password.

What the methodology is using encryption/hashing is to NOT try to decrypt the data in the database, but instead encrypt/hash the data coming in from user and compare to database.

So what application platform are you using?  Each has their own API for this.
0
 
LVL 59

Assisted Solution

by:Kevin Cross
Kevin Cross earned 400 total points
ID: 22697785
For encryption within SQL server itself, which would allow you to use the same mechanism from application to application without having to copy code or use a shared web service like I use:

http://www.example-code.com/sql/aes_stringEncryption.asp
http://aspnet.4guysfromrolla.com/articles/022107-1.aspx
0
 
LVL 22

Assisted Solution

by:dportas
dportas earned 100 total points
ID: 22697822
Encrypting passwords is bad practice. Better to generate a password hash and verify that at login. Hashing should be used in conjunction with password complexity rules to guard against dictionary-based attacks.
0
 

Author Comment

by:turbot_yu
ID: 22699893
The client side will be a PDA, windows mobile 6.

The server side will be a server, windows xp or windows server 2003, not fixed yet.

They request for AES or DES.
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

Author Comment

by:turbot_yu
ID: 22700033
http://www.example-code.com/sql/aes_stringEncryption.asp

Is it just work on the server side, the client just call the sql-pro?
Since I am quite new, may you give more details how it works.
0
 
LVL 59

Assisted Solution

by:Kevin Cross
Kevin Cross earned 400 total points
ID: 22707390
That procedure would work on the SQL server side, that is correct.  If you made this procedure take in a password as parameter and return you the encrypted/hashed version you could then utilize this procedure to hash the password before it is stored into database and then on your login process your username and password would be sent and this same procedure could be used to hash the client supplied password and then compare hash with value stored in database.

I too do not ever decrypt the passwords for this purpose, which is why I refer to as a has even though you are encrypting.  I would basically ignore the decrypt side of this. :)

What you will find is this is just protecting exposure of that data from attacks on the backend.  If you are transmitting this data from PDA to SQL server clear text (non-SSL) connection, then exposure is in the points between PDA and server (if goal here is security just thought I would mention).

Hope that helps.

Regards,
Kevin
0
 

Author Comment

by:turbot_yu
ID: 22708137
Hi Kevin

If I want to encrypt the password transfer between the cllient and server, do it mean I need to encrypt and decrypt the password at client side. Is there any way to do it, thanks.
0
 
LVL 59

Assisted Solution

by:Kevin Cross
Kevin Cross earned 400 total points
ID: 22708201
Are you talking about SSL communication?  As for encrypt/decrypt client side it would be up to the abilities of the program created to run on PDA.  Would be based on the language used and ability to use certain API/SDK toolsets on a mobile device.
0
 

Author Comment

by:turbot_yu
ID: 22710501
I am trying to encrypt the password in client device and send it into SQL server.

Also I will try to get the password from the server and decrypt it in the client device.

Is it possible, thanks.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now