g_bde_crypt.c (114153) | g_bde_crypt.c (114167) |
---|---|
1/*- 2 * Copyright (c) 2002 Poul-Henning Kamp 3 * Copyright (c) 2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed for the FreeBSD Project by Poul-Henning Kamp 7 * and NAI Labs, the Security Research Division of Network Associates, Inc. 8 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * | 1/*- 2 * Copyright (c) 2002 Poul-Henning Kamp 3 * Copyright (c) 2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed for the FreeBSD Project by Poul-Henning Kamp 7 * and NAI Labs, the Security Research Division of Network Associates, Inc. 8 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * |
32 * $FreeBSD: head/sys/geom/bde/g_bde_crypt.c 114153 2003-04-28 06:38:31Z phk $ | 32 * $FreeBSD: head/sys/geom/bde/g_bde_crypt.c 114167 2003-04-28 17:57:12Z phk $ |
33 * 34 * This source file contains the functions responsible for the crypto, keying 35 * and mapping operations on the I/O requests. 36 * 37 */ 38 39#include <sys/param.h> 40#include <sys/bio.h> --- 6 unchanged lines hidden (view full) --- 47#include <sys/md5.h> 48 49#include <crypto/rijndael/rijndael.h> 50#include <crypto/sha2/sha2.h> 51 52#include <geom/geom.h> 53#include <geom/bde/g_bde.h> 54 | 33 * 34 * This source file contains the functions responsible for the crypto, keying 35 * and mapping operations on the I/O requests. 36 * 37 */ 38 39#include <sys/param.h> 40#include <sys/bio.h> --- 6 unchanged lines hidden (view full) --- 47#include <sys/md5.h> 48 49#include <crypto/rijndael/rijndael.h> 50#include <crypto/sha2/sha2.h> 51 52#include <geom/geom.h> 53#include <geom/bde/g_bde.h> 54 |
55/* 56 * XXX: Debugging DO NOT ENABLE 57 */ 58#undef MD5_KEY |
|
55 | 59 |
56#define MD5_KEY 57 | |
58/* 59 * Derive kkey from mkey + sector offset. 60 * 61 * Security objective: Derive a potentially very large number of distinct skeys 62 * from the comparatively small key material in our mkey, in such a way that 63 * if one, more or even many of the kkeys are compromised, this does not 64 * significantly help an attack on other kkeys and in particular does not 65 * weaken or compromised the mkey. --- 300 unchanged lines hidden --- | 60/* 61 * Derive kkey from mkey + sector offset. 62 * 63 * Security objective: Derive a potentially very large number of distinct skeys 64 * from the comparatively small key material in our mkey, in such a way that 65 * if one, more or even many of the kkeys are compromised, this does not 66 * significantly help an attack on other kkeys and in particular does not 67 * weaken or compromised the mkey. --- 300 unchanged lines hidden --- |