Subject: Re: vnd, VOP_ and encrypted fs.
To: None <>
From: Jorgen Lundman <>
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.


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

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

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


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