This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
me
> 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
and
> 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
(ftp://ftp.auscert.org.au/pub/coast/tools/unix/des.tar.gz). Alternatively,
as suggested, use openssl:
openssl enc -in plaintext -out encrypted -pass stdin -e or similar to
encrypt
openssl enc -in encrypted -out plaintext -pass stdin -d or similar to
decrypt
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:
---BEGIN---
--- 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 @@
 {
+#ifdef BSD
   struct sgttyb        t_old;
+#endif
   FILE         *tf;
--END---

Regards
Chris

> Thanks for your help.
> Sanjay
> At 08:57 4-4-2002, Andrew Markebo wrote:
> >/ "Gupta, Sanjay" <SGupta@Epylon.com> wrote:
> >| I have read
http://lists.hellug.gr/pipermail/mcrypt-dev/2001/000087.html
> >| note and I have tried every thing which was mentioned here but did not
> help.
> >
> >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
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]