From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 58020 invoked by alias); 29 Jan 2016 11:39:30 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 58006 invoked by uid 89); 29 Jan 2016 11:39:30 -0000 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 Received: from mail-wm0-f52.google.com (HELO mail-wm0-f52.google.com) (74.125.82.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 29 Jan 2016 11:39:28 +0000 Received: by mail-wm0-f52.google.com with SMTP id l66so50574811wml.0 for ; Fri, 29 Jan 2016 03:39:27 -0800 (PST) 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) Received: from [172.21.188.188] ([149.6.156.42]) by smtp.googlemail.com with ESMTPSA id g3sm15273299wjw.31.2016.01.29.03.39.24 for (version=TLSv1/SSLv3 cipher=OTHER); Fri, 29 Jan 2016 03:39:24 -0800 (PST) Subject: Re: Weird behavior of crypt To: cygwin@cygwin.com References: From: Marco Atzeri Message-ID: <56AB4F64.3070807@gmail.com> Date: Fri, 29 Jan 2016 12:09:00 -0000 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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-01/txt/msg00463.txt.bz2 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