Subject: Re: seeking advice on encrypting file systems
To: VaX#n8 <vax@carolina.rr.com>
From: Stefan Schumacher <stefan@net-tex.de>
List: netbsd-users
Date: 02/14/2004 01:55:30
--98e8jtXdkpgskNou
Content-Type: multipart/mixed; boundary="HcAYCG3uE/tztfnV"
Content-Disposition: inline


--HcAYCG3uE/tztfnV
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* VaX#n8 (vax@carolina.rr.com) wrote:

> Tips?  Comments?  Suggestions?

Back in 1.5 Days I used a simple shellskript on my Alpha, because CFS
was unavailable (I guess CFS has problems with 64 bit archs).

The skript en-/decrypts the files in another directory with OpenSSL

usage: ./dir-enc.sh {e,d} encrypted_data/ password


--=20
I don't need your civil war
It feeds the rich while it buries the poor
Your power hungry sellin' soldiers
In a human grocery store        - GUNS 'N ROSES

--HcAYCG3uE/tztfnV
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="dir-enc.sh"

#!/bin/sh
#encrypt
if [ $1 = 'e' ]
then
	rm -rf $2/*.enc
	for i in $2/*
	do
		openssl aes-256-ecb -in $i -out $i.enc -e -salt -k $3
		rm -Prf $i
	done
	echo "files encrypted and originals removed"
#decrypt
elif [ $1 = 'd' ]
	for i in $2/*.enc
	do
		openssl aes-256-ecb -d -salt -in $i -out $2/`basename $i .enc` -k $3
	done
	rm -rf $2/*.enc
	echo "files decrypted"
then
fi

--HcAYCG3uE/tztfnV--

--98e8jtXdkpgskNou
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)

iD8DBQFALWPyEfTEHrP7rjMRApm8AKCwpxacTzDxfl82gh0UF26lJJiDJwCgpzJr
b3WQEeuURCXpw2RZut1upbY=
=icB4
-----END PGP SIGNATURE-----

--98e8jtXdkpgskNou--