Re: Re[6]: encryption algs

From: Kevin Conaway (kevin.conaway_at_gmail.com)
Date: 02/03/05

  • Next message: Barrie Dempster: "RE: Spyware blocking with HOSTS file on DNS server"
    Date: Thu, 3 Feb 2005 08:33:37 -0500
    To: BoI base <postbase@mail.ru>
    
    

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


  • Next message: Barrie Dempster: "RE: Spyware blocking with HOSTS file on DNS server"

    Relevant Pages

    • zentara <zentara@highstream.net> (was: creating MD5 hashes for /etc/shadow entries?)
      ... > basically I'll let to generate an MD5 hash for a password like ... #The secret to getting crypt to work correctly is in providing ... #a salt starting with '$1$' and having 8 characters ... print crypt ($passwd, $salt), "\n"; ...
      (comp.unix.questions)
    • Re: Authenticate a User.
      ... > The passwd structure returned by 'getpwnam' gives 'x' in pw_passwd, ... (But somehow I fear that they get that portability ... > About crypt, if I take first 2 characters of the password hash stored ... > this salt, it is not the same as in the shodow file. ...
      (comp.os.linux.development.apps)
    • Re: [PHP] password hashing and crypt()
      ... so, the crypt function ... recommends to externally create a salt and to store that in a separate field ... The salt is actually contained in the crypted string as the first two characters, there's no need to store it separately. ...
      (php.general)
    • Re: creating MD5 hashes for /etc/shadow entries?
      ... >basically I'll let to generate an MD5 hash for a password like ... #The secret to getting crypt to work correctly is in providing ... #a salt starting with '$1$' and having 8 characters ... print crypt ($passwd, $salt), "\n"; ...
      (comp.unix.questions)
    • Re: verifying password
      ... Casper H.S. Dik wrote: ... >>hand this new sting to crypt(). ... > DO NOT COPY THE SALT. ... > to opinions held by my employer, Sun Microsystems. ...
      (comp.unix.programmer)