Mail Archives: cygwin/2002/03/25/09:22:51
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 -