Commit Graph

17 Commits

Author SHA1 Message Date
Alfred Perlstein
44956c9863 Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
2003-01-21 08:56:16 +00:00
Poul-Henning Kamp
acb161b16f Optimize the size of the work-items by letting the mapping function
decide the largest size which stays inside the zone and does not
collide with a lock sector.
2003-01-02 19:29:49 +00:00
Poul-Henning Kamp
1e90b74683 Solve another bug in the mapping code: correctly skip lock sectors.
Make sure sector zero is protected if it contains metadata.

Lower WARNS for gbde to 3 on non-i386 archs.  rijndael-fst is evil
but appearntly does the right thing and passes the test-vectors.

MFC Candidate.
2002-12-18 22:11:54 +00:00
Poul-Henning Kamp
88806cc28c Fix two blunders in the mapping functions which can lead to corrupt data,
for request sizes larger than the sectorsize or for multi-key setups.

See warning mailed to current@ for details of recovery.

Found by:	Marcus Reid <marcus@blazingdot.com>
2002-12-18 19:57:27 +00:00
Poul-Henning Kamp
ef7b370b00 Fix spelling in comment. 2002-12-13 21:10:59 +00:00
Poul-Henning Kamp
19c61e97fb Conceiveably, there may exist an algorithm which can tell if a sequence of bytes
are the output of AES/128/CBC or ARC4RANDOM.  Encrypt the random data with which
we wipe when we get a BIO_DELETE to make such an algorithm useful.

Sponsored by:	DARPA & NAI Labs
Approved by:	re (blanket)
2002-12-01 15:50:48 +00:00
Poul-Henning Kamp
3a4c5955ce Use unsigned for an index.
Sponsored by:	DARPA & NAI Labs.
Approved by:	re (blanket).
2002-12-01 15:47:49 +00:00
Poul-Henning Kamp
e6e142398f Straighten up the geom.ctl config interface definitions.
Sponsored by:	DARPA & NAI Labs
2002-11-06 20:05:15 +00:00
Poul-Henning Kamp
5afa461402 Run a revision on the GBDE encryption facility.
Replace ARC4 with SHA2-512.
Change lock-structure encoding to use random ordering rather for obscurity.
Encrypt lock-structure with AES/256 instead of AES/128.
Change kkey derivation to be MD5 hash based.
Watch for malloc(M_NOWAIT) failures and ditch our cache when they happen.
Remove clause 3 of the license with NAI Labs consent.

Many thanks to "Lucky Green" <shamrock@cypherpunks.to> and "David
Wagner" <daw@cs.berkeley.edu>, for code reading, inputs and
suggestions.

This code has still not been stared at for 10 years by a gang of
hard-core cryptographers.  Discretion advised.

NB: These changes result in the on-disk format changing: dump/restore needed.

Sponsored by:   DARPA & NAI Labs.
2002-11-04 09:27:01 +00:00
Poul-Henning Kamp
6c4a970782 Change the kkey generation cherry-picker to use MD5.
Sponsored by:	DARPA & NAI Labs
2002-10-30 22:13:54 +00:00
Poul-Henning Kamp
1907a57b5f Fix a bug in the cherry-picker kkey generator routine.
WARNING:  You need to backup and restore the _unencrypted_ contents
WARNING:  of your GBDE disks when you take this update!

Sponsored by:	DARPA & NAI Labs.
2002-10-28 11:06:58 +00:00
Poul-Henning Kamp
3f12caa180 Now that the sectorsize and mediasize are properties of the provider,
don't take the detour over the I/O path to discover them using getattr(),
we can just pick them out directly.

Do note though, that for now they are only valid after the first open
of the underlying disk device due compatibility with the old disk_create()
API.  This will change in the future so they will always be valid.

Sponsored by:   DARPA & NAI Labs.
2002-10-20 20:28:24 +00:00
Poul-Henning Kamp
48444d6262 Make the sectorsize a property of providers so we can include it in the XML
output.

Sponsored by:	DARPA & NAI Labs
2002-10-20 19:18:07 +00:00
Poul-Henning Kamp
87d4861cc5 Be consistent about functions being static.
Spotted by:	FlexeLint
2002-10-20 14:30:28 +00:00
Poul-Henning Kamp
8e91949016 Constify input to the arc4 seed function.
Implement the lockfile hunting in sector zero.

Sponsored by:	DARPA & NAI Labs.
2002-10-20 11:09:58 +00:00
Poul-Henning Kamp
b6a185302e Fix a missing initialization. 2002-10-19 17:19:41 +00:00
Poul-Henning Kamp
19b5c7bc4b Add Geom Based Disk Encryption to the tree.
This is an encryption module designed for to secure denial of access
to the contents of "cold disks" with or without destruction activation.

Major features:

   * Based on AES, MD5 and ARC4 algorithms.
   * Four cryptographic barriers:
        1) Pass-phrase encrypts the master key.
        2) Pass-phrase + Lock data locates master key.
        3) 128 bit key derived from 2048 bit master key protects sector key.
        3) 128 bit random single-use sector keys protect data payload.
   * Up to four different changeable pass-phrases.
   * Blackening feature for provable destruction of master key material.
   * Isotropic disk contents offers no information about sector contents.
   * Configurable destination sector range allows steganographic deployment.

This commit adds the kernel part, separate commits will follow for the
userland utility and documentation.

This software was developed for the FreeBSD Project by Poul-Henning Kamp and
NAI Labs, the Security Research Division of Network Associates, Inc.  under
DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA CHATS
research program.

Many thanks to Robert Watson, CBOSS Principal Investigator for making this
possible.

Sponsored by:   DARPA & NAI Labs.
2002-10-19 17:02:17 +00:00