Date: Wed, 22 Dec 2010 14:31:56 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: freebsd-questions@freebsd.org Subject: Re: DES Cipher Message-ID: <4D120BDC.1050009@infracaninophile.co.uk> In-Reply-To: <AANLkTinZRmX2YWppkjz8MjA%2B%2Bz5pVkPjoMzeB78GXpsT@mail.gmail.com> References: <AANLkTinZRmX2YWppkjz8MjA%2B%2Bz5pVkPjoMzeB78GXpsT@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB3D0977FD4E9AF03BCB596FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 22/12/2010 14:20, Mohammad Hedayati wrote: > Can anyone please show me a sample code for ciphering using DES in Free= BSD? To encrypt, something like: openssl enc -e -des -in plaintext.txt -a -out encrypted.asc Decrypt like so: openssl enc -d -dex -in encrypted.asc -a -out plaintext.txt Note: completely untested. You may well need to supply various extra arguments to make it all work. See 'openssl enc help' for hints. Note 2: DES is pretty trivial to crack nowadays. Don't use this for anything serious. You can encrypt using AES or any of a host of other ciphers by using a very similar openssl command line. Note 3: If you're actually after DES "encrypted" passwords, then see crypt(3). From the commandline you can use the Perl crypt function: 'perldoc -f crypt' for details. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matthew@infracaninophile.co.uk Kent, CT11 9PW --------------enigB3D0977FD4E9AF03BCB596FB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0SC+MACgkQ8Mjk52CukIw0DgCfVbp6NC9mvSbwnFLhZsDAdz1Y qKoAmwbYjM7BFSFEJaVYW2Mg8kpAE4X7 =v7mn -----END PGP SIGNATURE----- --------------enigB3D0977FD4E9AF03BCB596FB--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D120BDC.1050009>