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

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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=HDLpaYq1Zzsgh65s
zEfEmDZ7sNGwDm5ees1qnTAWkhZtzvm7bEM+C326h8MOSrmiryh6CYDGhMVZdCeb
BOf1pj/rHOnr6WDyIHk8giTRUX4fV1Vlp7ugwgUCnInSyYE2uLADxvdaUgMpynxY
iuYmKcLAQrMluhBIf1v61KciIQI=
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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=P5f/Lsi/MEP+iDVnyitNmQ
0rM/M=; b=bKYcL/ixtcIgfadZXBPJZKvXHlsOffMDpKXGBCotMlQyrRzybtuI98
z2dUBpVji6W0pFcuLjzma8M7hb6gVYbeGF45nnvXRGxeqkGkbSSe2TO6I+ZWGsPo
zH8ODERa/0phhKCxyR85bcJujRWZuo+KFrkjMdFba7tJSxKWdNDZY=
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=-0.0 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,LIKELY_SPAM_BODY,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=DES, 2710, $6wos, UD:UudC.lLOSB1G3D1bIboWxlixzBy2xO
X-HELO: mail-wm0-f52.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=SikWyvBR/euef9k6PQ+Ohi+C5IMc0gdGfS8tmMXWOAQ=; b=c5WIonoQAAo0dJ3mk2Bx4adzsCa6UKJaJ62fmsphmk6fNzNM+5nzcNbXEDa3MshJs3 KgP1QKKflM6i3PyLOoE4y6b4zg7egvHLZKj7OGknVNCDZWlJX3xEsC1k0ff92pqMIHob IVhVdPweKRUzMsU+orJGIH1pT8I0k6KVKws++EdVrVZM8UPWSM0I2f7iLGcMJmqO0Icj 0vA8Bhnz7/08CZBpEY3uqmfM+9ky9NNZGUKccht2UkI5f1pi31QIClZ5c9S1R7UElBKF gvXyYKYPEUbbmohHPuWIbxynTHS0RhsvLoN6uZGm0PvxWgvWY15uyIgdZwp9h7dfdNjl IYdQ==
X-Gm-Message-State: AG10YOT2gs494U79LxUr4VxzguDl94gfnBldmD1t7dT/JMyqLvsLBXiXY4m38J+XSX1d9w==
X-Received: by 10.28.52.195 with SMTP id b186mr8306576wma.40.1454067565266; Fri, 29 Jan 2016 03:39:25 -0800 (PST)
Subject: Re: Weird behavior of crypt
To: cygwin AT cygwin DOT com
References: <CAFFOgCUoiL06QNFvXOJ-E46FOmpG4S_K4O52k+rt_Ysxpw2aag AT mail DOT gmail DOT com>
From: Marco Atzeri <marco DOT atzeri AT gmail DOT com>
Message-ID: <56AB4F64.3070807@gmail.com>
Date: Fri, 29 Jan 2016 12:39:16 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1
MIME-Version: 1.0
In-Reply-To: <CAFFOgCUoiL06QNFvXOJ-E46FOmpG4S_K4O52k+rt_Ysxpw2aag@mail.gmail.com>
X-IsSubscribed: yes


On 29/01/2016 12:18, Alexandre Garnier wrote:
> 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.
>

Not SHA-512, see
/usr/share/doc/crypt/crypt.README

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

         crypt(3)
         encrypt(3)
         setkey(3)

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

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