This is the mail archive of the
mailing list for the Cygwin project.
Re: mcrypt commnad
> Michael,Andrew,Christopher and Corinna
> Thanks very much for your response.
> I have openssl installed, but I would really appreciate, if you can tell
> how to use for my requirement.
> My requirement is, I have a simple text file which has some sensitive
> information, and I want encrypt this file this file using some password
> similarly decrypt the file using the same password. The vi -x filename,
> command will not work because these steps should be done in shell scripts.
> Is it possible to do the same in openssl ?.
The crypt command (the one you were thinking off) is in no way secure enough
for this. See section 8.4 in the sci.crypt FAQ for more information
(http://www.faqs.org/faqs/cryptography-faq/part08/). Crypt is only really
useful for doing stupid things like encoding your password in a script so
someone looking over your shoulder while you're editing it can't read it and
stuff like that. It's not strong enough for encrypting files by a long shot.
If you are looking for a command to do secret key encryption you could try
something like des
as suggested, use openssl:
openssl enc -in plaintext -out encrypted -pass stdin -e or similar to
openssl enc -in encrypted -out plaintext -pass stdin -d or similar to
Remember, however, that if you're encrypting files like this, the encryption
is only as strong as your password.
You'll need this small patch to compile des:
--- alo-getpass.c.orig Thu Apr 4 23:52:54 2002
+++ alo-getpass.c Thu Apr 4 23:54:38 2002
@@ -15,3 +15,5 @@
struct sgttyb t_old;
> Thanks for your help.
> At 08:57 4-4-2002, Andrew Markebo wrote:
> >/ "Gupta, Sanjay" <SGupta@Epylon.com> wrote:
> >| I have read
> >| note and I have tried every thing which was mentioned here but did not
> >Any special reason for wanting crypt/mcrypt, maybe choose pgp or
> >gpg(?) (the gnu-version of pgp) that is available on many platforms..
> If compatibility with Solaris crypt is not an issue, then I recommend to
> use OpenSSL - this comes with a command-line tool, appropriately called
> "openssl". No porting required - just install the latest openssl package
> using setup.exe.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html