History log of /freebsd-9.3-release/sys/geom/bde/g_bde_crypt.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 148192 20-Jul-2005 phk

Comment typo


# 143418 11-Mar-2005 ume

stop including rijndael-api-fst.h from rijndael.h.
this is required to integrate opencrypto into crypto.


# 139778 06-Jan-2005 imp

/* -> /*- for copyright notices, minor format tweaks as necessary


# 135085 11-Sep-2004 phk

Fix a problem that shows up if less than the full complement of
lock sectors are defined ("number_of_keys" argument to gbde init being
less than 4 in the default compile).


# 124869 23-Jan-2004 phk

Remove the MD5_KEY debugging tool


# 119891 08-Sep-2003 phk

Correct bzero length so we clear the entire key structure.


# 119809 06-Sep-2003 phk

Bzero the right number of bytes.

Found by: Juergen Buchmueller <pullmoll@stop1984.com>


# 115505 31-May-2003 phk

Don't use & in front of arrays.

Found by: FlexeLint


# 114543 02-May-2003 phk

Considering that I did cast the arguments to (intmax_t) I must have
been sleepy since I used %qd instead of %jd.


# 114251 29-Apr-2003 phk

Fix an obscure fencepost error in GBDE's sector mapping code:

For certain combinations of sectorsize, mediasize and random numbers
(used to define the mapping), a multisector read or write would ignore
some subset of the sectors past the first sector in the request because
those sectors would be mapped past the end of the parent device, and
normal "end of media" truncation would zap that part of the request.

Rev 1.19+1.20 of g_bde_work.c added the check which should have alerted
me to this happening. This commit maps the request correctly and
adds KASSERTS to make sure things stay inside the parent device.

This does not change the on-disk layout of GBDE, there is no need to
backup/restore.


# 114167 28-Apr-2003 phk

I accidentally leaked this debugging tool in with my last commit.

Disable it with a direct warning.


# 114153 28-Apr-2003 phk

Rename g_bde_get_sector() to g_bde_get_keysector() and pick up the
offset from the work packet.


# 113010 03-Apr-2003 phk

Use sys/endian.h instead of geom_enc.c for endian-agnostfication.


# 112367 18-Mar-2003 phk

Including <sys/stdint.h> is (almost?) universally only to be able to use
%j in printfs, so put a newsted include in <sys/systm.h> where the printf
prototype lives and save everybody else the trouble.


# 111964 07-Mar-2003 phk

Limit our requests to DFLTPHYS, this is generally a good idea for
memory-allocation purposes. Right now it is also a very good idea
because we hit a Giant assertion in the free(9) processing if we
free something larger than 64k.


# 108558 02-Jan-2003 phk

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.


# 108060 18-Dec-2002 phk

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.


# 108052 18-Dec-2002 phk

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>


# 107451 01-Dec-2002 phk

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)


# 106407 04-Nov-2002 phk

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.


# 106226 30-Oct-2002 phk

Change the kkey generation cherry-picker to use MD5.

Sponsored by: DARPA & NAI Labs


# 106085 28-Oct-2002 phk

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.


# 105464 19-Oct-2002 phk

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.