Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2008-10-12
9
Medium Priority
?
190 Views
Last Modified: 2010-03-19
Thanks
0
Comment
Question by:turbot_yu
  • 4
  • 4
9 Comments
 
LVL 60

Accepted Solution

by:
Kevin Cross earned 1600 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 60

Assisted Solution

by:Kevin Cross
Kevin Cross earned 1600 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 400 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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
 

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 60

Assisted Solution

by:Kevin Cross
Kevin Cross earned 1600 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 60

Assisted Solution

by:Kevin Cross
Kevin Cross earned 1600 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

963 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