Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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: From: Richard Campbell 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) Content-Type: text/plain; charset="iso-8859-1" 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 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/