delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/01/29/06:19:18

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:date:message-id:subject:from:to
:content-type; q=dns; s=default; b=mcmA90xqlgfO3tQUVp8BvQgNce92n
UC4erZCBUg4WKD/b+D2pOvsV8RAIsNrYfJMSx4s6VYOOKD11OcWeRXduiLy/xg7h
g+ze0JEb2vPeNIrlM3QUxuEeOt3UrDJcruYdGpOiH8u745UQJhnVJu7Uw9fzhjJv
sJXgjupgdDtxAY=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:date:message-id:subject:from:to
:content-type; s=default; bh=CAebiR1rwY2kr1zkDKgjqYmoDEs=; b=fti
eAuw4OTTEBEIs9WywyVS1VmxBxunrdtslIY/xN+9Uf6VW7LvQOcKNs1xl+j3N8wv
psgwtClyboatCI9Vf5wwAIwfLN+SiiqO22cpR9HCH2EASsgyjJ3QFrTtiyTmXw5A
vunfDSWssk0EusRKknMcuaQLGmd0Yr0o8t1jruvM=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=1.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,LIKELY_SPAM_BODY,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=66, 6.6, Hx-languages-length:1554, 2710
X-HELO: mail-wm0-f43.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=/kktwv7o+//99Ufv7tbV/ru7jZpS2NDJG6ouLhWpfiQ=; b=foNG7wdB2MouQzFFMp2BHExrjCAIaz8Q/QiraB1vdYVrgdTJkkb8ZIbzomXRzySREF Gj7+qWnM/ADeRiQW3SowJvezRTS1Ku9T1F68baapizLS2kkZ1cl1mYPDpqdJOWH3Evcw Rsy5pCyHeYZgeBoavYGM2+8xs1tqp+38Ojtb4XP+RNFGJBSCscoN/HT6orFUJetwFVoa iEImvyQHIstiwtawK8L0SXhjuuj3m7cnetMZj9JdyVlh4ymTsZEco75NCuavpRs9b6pX FYTaIER2FSGY66uZgMuS0XYki3dw71DrwQkyzf7oWLSCsbCPkcnVZifesY/2g3f5y1IL /xJA==
X-Gm-Message-State: AG10YOTbtlE1miDdeEOa7VxRrOKNZZ7hB11yWN82rbTFBaf1mUWsj2XN+RcmKhUH0FUqzx6e77Xooj093HdThA==
MIME-Version: 1.0
X-Received: by 10.194.93.102 with SMTP id ct6mr9640798wjb.157.1454066334565; Fri, 29 Jan 2016 03:18:54 -0800 (PST)
Date: Fri, 29 Jan 2016 12:18:54 +0100
Message-ID: <CAFFOgCUoiL06QNFvXOJ-E46FOmpG4S_K4O52k+rt_Ysxpw2aag@mail.gmail.com>
Subject: Weird behavior of crypt
From: Alexandre Garnier <zigarn AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

Hello.
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
$6wOs/zKP2jDM

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

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

Am I missing something?

On other system, I get a more expected result:

# On Ubuntu 15.04
$ mkpasswd --method=SHA-512 test_value 7dl4B0fKUimdnR
$6$7dl4B0fKUimdnR$f6gCu.3IfrxhsnJKFnusDH.UudC.lLOSB1G3D1bIboWxlixzBy2xO/3rCKHmzfwekCTvmQd11bPdcsJOaLkCJ.

$ python -c 'import crypt; print crypt.crypt("test_value",
"$6$7dl4B0fKUimdnR$")' # Python 2.7.10
$6$7dl4B0fKUimdnR$f6gCu.3IfrxhsnJKFnusDH.UudC.lLOSB1G3D1bIboWxlixzBy2xO/3rCKHmzfwekCTvmQd11bPdcsJOaLkCJ.

$ perl -e 'print crypt("test_value", "\$6\$7dl4B0fKUimdnR\$")."\n"' #
Perl v5.20.2
$6$7dl4B0fKUimdnR$f6gCu.3IfrxhsnJKFnusDH.UudC.lLOSB1G3D1bIboWxlixzBy2xO/3rCKHmzfwekCTvmQd11bPdcsJOaLkCJ.


# On RHEL 6.6
$ python -c 'import crypt; print crypt.crypt("test_value",
"$6$7dl4B0fKUimdnR$")' # Python 2.6.6
$6$7dl4B0fKUimdnR$f6gCu.3IfrxhsnJKFnusDH.UudC.lLOSB1G3D1bIboWxlixzBy2xO/3rCKHmzfwekCTvmQd11bPdcsJOaLkCJ.

$ perl -e 'print crypt("test_value", "\$6\$7dl4B0fKUimdnR\$")."\n"' #
Perl v5.10.1
$6$7dl4B0fKUimdnR$f6gCu.3IfrxhsnJKFnusDH.UudC.lLOSB1G3D1bIboWxlixzBy2xO/3rCKHmzfwekCTvmQd11bPdcsJOaLkCJ.

-- 
Alex

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019