delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/03/25/09:22:51

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Message-ID: <DF08E278E10FC14F87CE7E802ABFD04BF01798@EXCHANGE01.air2web.com>
From: Richard Campbell <richard DOT campbell AT air2web DOT com>
To: cygwin AT cygwin DOT com
Subject: RE: crypt command
Date: Mon, 25 Mar 2002 09:22:28 -0500
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)

I looked at it.  The crypt that comes with cygwin appears to do something
different than [I, Sanjay] expected, at least on at least Sanjay's system 
and mine.

Output from crypt seems to stop at 14 bytes:

bash-2.05a$ man apropos >out
bash-2.05a$ crypt mypass <out >encryptedout
bash-2.05a$ ls -la
total 22
drwxrwxrwx    2 1303     513             0 Mar 25 08:42 .
drwxrwxrwx   78 Administ 544         20480 Mar 21 11:18 ..
-rw-rw-rw-    1 campbe_r Domain U       14 Mar 25 08:42 encryptedout
-rwxrwxrwx    1 Administ Domain U      533 Mar 25 08:42 out
bash-2.05a$ cat out | crypt mypass >encryptedout
bash-2.05a$ ls -la
total 22
drwxrwxrwx    2 1303     513             0 Mar 25 08:42 .
drwxrwxrwx   78 Administ 544         20480 Mar 21 11:18 ..
-rw-rw-rw-    1 campbe_r Domain U       14 Mar 25 08:42 encryptedout
-rwxrwxrwx    1 Administ Domain U      533 Mar 25 08:42 out
bash-2.05a$

This is a very suspicious size, since after looking at the crypt code 
that is the size of the retkey array:
(encrypt.c, line 253).
  static char retkey[14];

After looking further, I see that encrypt.c's "crypt" function, which
returns
the ultimate printed out values, returns the retkey array only.

I further notice that crypt does not read any stdin input.

I conclude that this crypt is designed to only print out a key for a given
salt/password.

Am I correct?

If so, what is this utility generally used for?

To Sanjay - it looks like compiling mcrypt would be your best bet, as it 
has a backwards compatibility mode with older crypt(1)s.
http://mcrypt.hellug.gr/

-Richard Campbell

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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