Subject: Re: vnd, VOP_ and encrypted fs.
To: None <tech-kern@netbsd.org>
From: Jorgen Lundman <lundman@lundman.net>
List: tech-kern
Date: 11/01/2001 17:46:10
Ok I am now finished with my first version. Wouldn't mind if people
wanted to try it out and test it, but not sure what the procedure is for
that - do I mail someone with them?

So far there is only xor and blowfish ciphers to chose from.

Example:

Configure a plain vnd device:

sun# ./vnconfig -c /dev/vnd0 /tmp/diskimage

after newfs the first block looks like:

00000000:  64656661 756C7420 6C616265 6C000000   |default label...|
00000010:  00000000 00000000 00000000 00000000   |................|

To set one up using XOR cipher, and a random key of 8 bytes:

sun# ./vnconfig -C xor -N 8 -c /dev/vnd0 /tmp/diskimage
Generating 8 bytes of random...
--key encoding: base64
fSRPHtmkpGw=

and after newfs the first block looks like:

00000000:  1941297F ACC8D04C 11452D7B B5A4A46C   |.A)....L.E-{...l|
00000010:  7D244F1E D9A4A46C 7D244F1E D9A4A46C   |}$O....l}$O....l|


and with blowfish, and a random key of 128

sun# ./vnconfig -C blowfish -N 128 -c /dev/vnd0 /tmp/diskimage
Generating 128 bytes of random...
--key encoding: base64
KUDZFhrsLgQDGV4iqjExwZt1czWpNo3wu4PV4n1N3MTzgXiOlWDjP0SiMwgsJmcUSw3lYJ88rR8
7RfAoiW31d4iJ6p25LkaS8BJPnDa4RyJsnqSxStq88cpzuXLNI7LNxjYzcNA//S8VCCqr5larGd
JcDV0rH5VJ1ueOiwOeTaA=

newfs and first block:

00000000:  ECC79E51 AEA85D5E FE3F76E8 75FBA084   |...Q..]^.?v.u...|
00000010:  D5AF7BD8 B0D79E68 4490A0EF C5F8BA09   |..{....hD.......|




I've copied files to it and mess around, I've done make build of a
couple of packages, and created large files.


I've not done any performance hit tests yet - are there any good utils
for that ready to use? Tested on a Sun-ss5 and i386 both NetBSD-1.5.

code change include vnd.c, vndvar.c and vnconfig.c


Lundy


-- 
Jorgen "Lord" Lundman <lundman@lundman.net>
Technology Manager, Unix Administrator
Phone: +44 (0)20-86591860  Mobile: +44 (0)79-58642918
Pager: 07958642918@one2one.net
"Rare is the person who can weigh the faults of others 
 without putting his thumb on the scales": Byron J. Langenfeld