public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* mcrypt issue
@ 2012-07-16 20:16 Nellis, Kenneth
  2012-07-16 22:06 ` Aaron Schneider
  0 siblings, 1 reply; 4+ messages in thread
From: Nellis, Kenneth @ 2012-07-16 20:16 UTC (permalink / raw)
  To: cygwin

I am seeing an mcrypt problem with short plaintext strings. 
I don't have a Linux box to compare results, so I don't 
know if this is an upstream or a Cygwin issue.

$ mcrypt --version
Mcrypt v.2.6.8 (i686-pc-cygwin)
Linked against libmcrypt v.2.5.8
Copyright (C) 1998-2002 Nikos Mavroyanopoulos (nmav@gnutls.org)
$ 

Longer strings seem to work:

$ echo abcdef | mcrypt -q -k xyz | mcrypt -dq -k xyz
abcdef
$ 

But shorter ones not so much:

$ echo abcde | mcrypt -q -k xyz | mcrypt -dq -k xyz
ab▒$

--Ken Nellis

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mcrypt issue
  2012-07-16 20:16 mcrypt issue Nellis, Kenneth
@ 2012-07-16 22:06 ` Aaron Schneider
  2012-07-18 15:26   ` Nellis, Kenneth
  0 siblings, 1 reply; 4+ messages in thread
From: Aaron Schneider @ 2012-07-16 22:06 UTC (permalink / raw)
  To: cygwin

On 16/07/2012 22:16, Nellis, Kenneth wrote:
> I am seeing an mcrypt problem with short plaintext strings.
> I don't have a Linux box to compare results, so I don't
> know if this is an upstream or a Cygwin issue.
>
> $ mcrypt --version
> Mcrypt v.2.6.8 (i686-pc-cygwin)
> Linked against libmcrypt v.2.5.8
> Copyright (C) 1998-2002 Nikos Mavroyanopoulos (nmav@gnutls.org)
> $
>
> Longer strings seem to work:
>
> $ echo abcdef | mcrypt -q -k xyz | mcrypt -dq -k xyz
> abcdef
> $
>
> But shorter ones not so much:
>
> $ echo abcde | mcrypt -q -k xyz | mcrypt -dq -k xyz
> abб▒$
>
> --Ken Nellis
>
> --
> 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
>
>
>
The commands you show work correctly with older version of the software. 
Specifically, I've tried this:

mcrypt-2.6.7-1.tar.bz2
libmcrypt4-2.5.8-1.tar.bz2
libmcrypt-2.5.8-1.tar.bz2

Although on Ubuntu 12.04 LTS latest versions of mcrypt and libmcrypts 
work with these two commands.


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: mcrypt issue
  2012-07-16 22:06 ` Aaron Schneider
@ 2012-07-18 15:26   ` Nellis, Kenneth
  2012-07-18 19:10     ` Aaron Schneider
  0 siblings, 1 reply; 4+ messages in thread
From: Nellis, Kenneth @ 2012-07-18 15:26 UTC (permalink / raw)
  To: cygwin

-----Original Message-----
From: Aaron Schneider

On 16/07/2012 22:16, Nellis, Kenneth wrote:
> I am seeing an mcrypt problem with short plaintext strings.
> I don't have a Linux box to compare results, so I don't
> know if this is an upstream or a Cygwin issue.
>
> $ mcrypt --version
> Mcrypt v.2.6.8 (i686-pc-cygwin)
> Linked against libmcrypt v.2.5.8
> Copyright (C) 1998-2002 Nikos Mavroyanopoulos (nmav@gnutls.org)
> $
>
> Longer strings seem to work:
>
> $ echo abcdef | mcrypt -q -k xyz | mcrypt -dq -k xyz
> abcdef
> $
>
> But shorter ones not so much:
>
> $ echo abcde | mcrypt -q -k xyz | mcrypt -dq -k xyz
> ab▒$
>
> --Ken Nellis
>
> --
> 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
>
>
>
The commands you show work correctly with older version of the software. 
Specifically, I've tried this:

mcrypt-2.6.7-1.tar.bz2
libmcrypt4-2.5.8-1.tar.bz2
libmcrypt-2.5.8-1.tar.bz2

Although on Ubuntu 12.04 LTS latest versions of mcrypt and libmcrypts 
work with these two commands.
-----END Original Message-----

It looks like this could be a Cygwin issue then.

As alternatives, it seems that ccrypt and openssl work just fine:

$ echo "abcde" | ccrypt -u -K xyz | ccrypt -d -u -K xyz
abcde
$ echo "abcde" | openssl des -k xyz | openssl des -d -k xyz
abcde
$ 

crypt, OTOH, seems also to be broken, if I'm using it correctly (no
man page or --help option):

$ echo "abcde" | crypt xyz | crypt xyz
abA7GTEBsFqY6
$ 

If these utilities are broken, maybe they should be fixed or
removed from the distribution.

--Ken Nellis

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mcrypt issue
  2012-07-18 15:26   ` Nellis, Kenneth
@ 2012-07-18 19:10     ` Aaron Schneider
  0 siblings, 0 replies; 4+ messages in thread
From: Aaron Schneider @ 2012-07-18 19:10 UTC (permalink / raw)
  To: cygwin

On 18/07/2012 17:25, Nellis, Kenneth wrote:
> -----Original Message-----
> From: Aaron Schneider
>
> On 16/07/2012 22:16, Nellis, Kenneth wrote:
>> I am seeing an mcrypt problem with short plaintext strings.
>> I don't have a Linux box to compare results, so I don't
>> know if this is an upstream or a Cygwin issue.
>>
>> $ mcrypt --version
>> Mcrypt v.2.6.8 (i686-pc-cygwin)
>> Linked against libmcrypt v.2.5.8
>> Copyright (C) 1998-2002 Nikos Mavroyanopoulos (nmav@gnutls.org)
>> $
>>
>> Longer strings seem to work:
>>
>> $ echo abcdef | mcrypt -q -k xyz | mcrypt -dq -k xyz
>> abcdef
>> $
>>
>> But shorter ones not so much:
>>
>> $ echo abcde | mcrypt -q -k xyz | mcrypt -dq -k xyz
>> abб▒$
>>
>> --Ken Nellis
>>
>> --
>> 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
>>
>>
>>
> The commands you show work correctly with older version of the software.
> Specifically, I've tried this:
>
> mcrypt-2.6.7-1.tar.bz2
> libmcrypt4-2.5.8-1.tar.bz2
> libmcrypt-2.5.8-1.tar.bz2
>
> Although on Ubuntu 12.04 LTS latest versions of mcrypt and libmcrypts
> work with these two commands.
> -----END Original Message-----
>
> It looks like this could be a Cygwin issue then.
>
> As alternatives, it seems that ccrypt and openssl work just fine:
>
> $ echo "abcde" | ccrypt -u -K xyz | ccrypt -d -u -K xyz
> abcde
> $ echo "abcde" | openssl des -k xyz | openssl des -d -k xyz
> abcde
> $
>
> crypt, OTOH, seems also to be broken, if I'm using it correctly (no
> man page or --help option):
>
> $ echo "abcde" | crypt xyz | crypt xyz
> abA7GTEBsFqY6
> $
>
> If these utilities are broken, maybe they should be fixed or
> removed from the distribution.
>
> --Ken Nellis
>
> --
> 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
>
>
>
I believe crypt and mcrypt are based on the same, for information given 
by ubuntu:
--------
crypt -h
Unix crypt(1) emulation program using mcrypt(1).

Usage: crypt password <file_in >file_out
Usage: crypt <file_in >file_out


echo abcde | crypt xyz | crypt xyz
Unix crypt(1) emulation program using mcrypt(1).

Use crypt -h for more help.
Unix crypt(1) emulation program using mcrypt(1).

Use crypt -h for more help.
Warning: It is insecure to specify keywords in the command line
Warning: It is insecure to specify keywords in the command line
Stdin was encrypted.
abcde
Stdin was encrypted.
--------

Both commands
	echo abcde | mcrypt -q -k xyz | mcrypt -dq -k xyz
	echo abcde | crypt xyz | crypt xyz

- Work on FreeBSD 9.0 and Ubuntu 12.04
- Fail on Cygwin, gentoo and gentoo-based OS like funtoo and sabayon.

It's been reported to gentoo: https://bugs.gentoo.org/show_bug.cgi?id=426914
	

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-07-18 19:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-16 20:16 mcrypt issue Nellis, Kenneth
2012-07-16 22:06 ` Aaron Schneider
2012-07-18 15:26   ` Nellis, Kenneth
2012-07-18 19:10     ` Aaron Schneider

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).