Solved

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

Posted on 2008-10-12
9
180 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

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 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

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
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.

821 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