Security Basics mailing list archives

Re: Re[6]: encryption algs


From: Kevin Conaway <kevin.conaway () gmail com>
Date: Thu, 3 Feb 2005 08:33:37 -0500

I am fairly sure thats how it works.

ftp://ftp.gnu.org/gnu/glibc/glibc-crypt-2.1.tar.gz

Read the post by Ghaith Nasrawi in this thread for an explanation of
what the salt does.

Kevin


On Thu, 3 Feb 2005 13:20:03 +0300, BoI base <postbase () mail ru> wrote:

KC> As far as I can tell, here is how crypt() works:
KC> crypt(salt,plaintext) -> salt+HASH(plaintext)

KC> It takes a two character salt and a plaintext.  For this example lets use:

KC> salt = 'AA';
KC> plaintext = 'kevinconaway';

KC> The digest that crypt() returns consists of the salt appended with the
KC> digest of the first 8 bytes of the plaintext..
KC> So the digest will be 'AA' + HASH('kevincon')

Are you sure? And what the role of salt in your scheme?
HASH('kevincon') is constant. So, we have crypt() results:
AA???????????
AB???????????
where '???????????' is the same string for both salts/

KC> where HASH is DES or MD5 depending on how the implentation of crypt()
KC> (the GNU implementation allows you to use MD5 by passing in a special
KC> salt).

Could you send me implementation of crypt() on C/C++ (maybe from
Linux sources)?

--
Best regards, Xanders  mailto:postbase () mail ru




Current thread: