This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Weird behavior of crypt

On 29/01/2016 12:18, Alexandre Garnier wrote:
I'm trying to do SHA-512 password encryption, but the result is really
weird on Cygwin:

# On Cygwin(either 32 or 64) 2.4.1-1, latest updates with crypt 1.1-1,
libcrypt0 1.1-1, libcrypt-devel 1.1-1
$ crypt '$6$7dl4B0fKUimdnR$' test_value

$ python -c 'import crypt; print crypt.crypt("test_value",
"$6$7dl4B0fKUimdnR$")' # Python 2.7.10

$ perl -e 'print crypt("test_value", "\$6\$7dl4B0fKUimdnR\$")."\n"' #
Perl v5.22.1

Am I missing something?

On other system, I get a more expected result:

# On Ubuntu 15.04
$ mkpasswd --method=SHA-512 test_value 7dl4B0fKUimdnR

Not SHA-512, see

This is the DES-crypt package Version 1.1

It provides a static library libcrypt.a as well as a shared library
cygcrypt-0.dll together with a link lib libcrypt.dll.a, which export
the functions


The passwords created by crypt(3) are 56 bit DES encrypted and are
100% identical to those created by the Linux crypt().

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]