On Wednesday 16 January 2002 11:45 am, [EMAIL PROTECTED] wrote:
> Hello,
> I'm using a nice little GDBM file for authentication. It just stores users
> and passwords as SHA1 hashes. When I need to authenticate someone (fewer
> than 15 lines in the dbm file) I just tie it and compare the SHA'd user
> input against the hex value in the dbm file. (The file is not publicly
> readable.)
>
> It has been suggested, however, that this is not adequately secure and that
> the passwords would be better stored crypted or some such. I don't really
> see the difference between a SHA password and a crypted password in this
> context. Wouldn't they be equally difficult to crack?
>
> Oh, I should add that the authenticator runs as part of a server daemon on
> a remote system, and so authentication is performed as the same user each
> time.
>
> Just wanted to collect some opinions before I go further. (I'm perfectly
> willing to accept the possibility I'm wrong--if I weren't I wouldn't
> ask--so fire away.)
>
> Thanks,
> John

Do you mean hash the password then encrypt the file that lists the hashes, or 
keep the passwords plaintext and encrypt the file?

A few concerns I can see would be if the hashes where plaintext and the file 
was encrypted would be if you broke that, then you'd have all the passwords.  
Also if someone had an account, they'd know their own username/password and 
may help with a known clear-text attack.

If the passwords where hashed, then stored in a plaintext file (like the 
passwd file on Unix/Linux systems), then that would leave them more open to 
dictionary attacks.  But you said it wasn't world-readable, so I guess that 
would make it more like shadow passwords, but still, if someone got the file, 
they could use a dictionary attack (like the crack program).

If you hashed the passwords then encrypted the file, it would make it more 
difficult to crack, but then you'd have to decrypt the entire file everytime 
you wanted to check a password (probably more pain than it's worth, 
especially if it really starts slowing down authentication).

There are tons of different options, but limiting it to these options, I'd 
probably suggest that you hash the passwords, then limit who has access to 
the file.

There's tons of webpages on encryption and subjects like this.  I'd check 
them out too.  (can't think of any of the top of my head).


Steven

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to