Click here to Skip to main content
16,004,977 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Saving password to registry? Pin
darkbyte25-Aug-04 10:36
darkbyte25-Aug-04 10:36 
GeneralRe: Saving password to registry? Pin
David Crow25-Aug-04 10:52
David Crow25-Aug-04 10:52 
GeneralRe: Saving password to registry? Pin
darkbyte26-Aug-04 5:00
darkbyte26-Aug-04 5:00 
AnswerRe: Saving password to registry? Pin
cmk25-Aug-04 13:22
cmk25-Aug-04 13:22 
AnswerRe: Saving password to registry? Pin
l a u r e n25-Aug-04 15:45
l a u r e n25-Aug-04 15:45 
GeneralRe: Saving password to registry? Pin
ThatsAlok25-Aug-04 21:53
ThatsAlok25-Aug-04 21:53 
GeneralRe: Saving password to registry? Pin
darkbyte26-Aug-04 4:46
darkbyte26-Aug-04 4:46 
AnswerRe: Saving password to registry? Pin
JimmyRopes26-Aug-04 9:33
professionalJimmyRopes26-Aug-04 9:33 
You should never save a password, even an encrypted one, especially in the registry. You should, instead, save a cryptographic hash value that results from the password, and user name if you want to be really secure.

The way this works is that different passwords and/or usernames will produce different consistant hash values and you can not reverse engineer a password and/or user name from the hash value. When a user enters a password you can compare the resulting hash value to the saved value and determine if the password is correct without ever storing the actual password in a data store. If the hash values match you can say with a high degree of certainty that the user entered the correct password.

A 160 bit hash value is currently considered to be the standard for a secure system.

MD5 produces a 128 bit hash value, which is a bit undersized by todays standards, and, additionally, has been known to contain theoretical flaws which have recently been shown to be exploitable for applications like you are describing. It is still a viable hashing algorythm for certain types of applications but not for your application.

I would recommend SHA256 at a minimum (256 bit hash value) or for extreme security SHA384 or SHA512. SHA384 or SHA512 require 64 bit arithmetic and you must be carefull if you are implementing them on a 32 bit processor due to the difference in the way numbers are stored on different architectures. Therefore, since SHA256 exceeds the current standard for security and can be implemented with 32 bit arithmetic I would recommend that you use it as your hashing algorythm.
GeneralDesign question (working with ATL OLE DB classes).... Pin
CherezZaboro25-Aug-04 7:32
CherezZaboro25-Aug-04 7:32 
GeneralRe: Design question (working with ATL OLE DB classes).... Pin
Doug Mitchell25-Aug-04 8:44
Doug Mitchell25-Aug-04 8:44 
GeneralRe: Design question (working with ATL OLE DB classes).... Pin
CherezZaboro25-Aug-04 15:55
CherezZaboro25-Aug-04 15:55 
GeneralRe: Design question (working with ATL OLE DB classes).... Pin
Ryan Binns25-Aug-04 18:31
Ryan Binns25-Aug-04 18:31 
GeneralRe: Design question (working with ATL OLE DB classes).... Pin
CherezZaboro26-Aug-04 3:34
CherezZaboro26-Aug-04 3:34 
GeneralRe: Design question (working with ATL OLE DB classes).... Pin
palbano25-Aug-04 19:50
palbano25-Aug-04 19:50 
GeneralRe: Design question (working with ATL OLE DB classes).... Pin
CherezZaboro26-Aug-04 3:45
CherezZaboro26-Aug-04 3:45 
GeneralRe: Design question (working with ATL OLE DB classes).... Pin
palbano26-Aug-04 4:34
palbano26-Aug-04 4:34 
GeneralWin32 console application - stop window from displaying Pin
BlackDice25-Aug-04 7:22
BlackDice25-Aug-04 7:22 
GeneralRe: Win32 console application - stop window from displaying Pin
jmkhael25-Aug-04 7:46
jmkhael25-Aug-04 7:46 
GeneralProblem using RichTextBox Pin
SuperTank25-Aug-04 6:09
SuperTank25-Aug-04 6:09 
GeneralRe: Problem using RichTextBox Pin
Tom Wright25-Aug-04 6:21
Tom Wright25-Aug-04 6:21 
GeneralRe: Problem using RichTextBox Pin
BlackDice25-Aug-04 7:43
BlackDice25-Aug-04 7:43 
GeneralRe: Problem using RichTextBox Pin
David Crow25-Aug-04 10:21
David Crow25-Aug-04 10:21 
GeneralRe: Problem using RichTextBox Pin
SuperTank25-Aug-04 10:40
SuperTank25-Aug-04 10:40 
GeneralDeriving from a CStatic Pin
act_x25-Aug-04 6:01
act_x25-Aug-04 6:01 
GeneralRe: Deriving from a CStatic Pin
Michael P Butler25-Aug-04 6:28
Michael P Butler25-Aug-04 6:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.