delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/04/04/17:55:59

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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: <00ee01c1dc2c$284fe180$0100a8c0@advent02>
From: "Chris January" <chris AT atomice DOT net>
To: <cygwin AT cygwin DOT com>
References: <657B20E93E93D4118F9700D0B73CE3EA0D397222 AT goofy DOT epylon DOT lan>
Subject: Re: mcrypt commnad
Date: Thu, 4 Apr 2002 23:57:54 +0100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000

> 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 AT Epylon DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019