g_eli.h (161217) | g_eli.h (161220) |
---|---|
1/*- | 1/*- |
2 * Copyright (c) 2005 Pawel Jakub Dawidek | 2 * Copyright (c) 2005-2006 Pawel Jakub Dawidek <pjd@FreeBSD.org> |
3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright --- 7 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright --- 7 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/geom/eli/g_eli.h 161217 2006-08-11 18:39:58Z pjd $ | 26 * $FreeBSD: head/sys/geom/eli/g_eli.h 161220 2006-08-11 19:09:12Z pjd $ |
27 */ 28 29#ifndef _G_ELI_H_ 30#define _G_ELI_H_ 31 32#include <sys/endian.h> 33#include <sys/errno.h> 34#include <sys/malloc.h> --- 17 unchanged lines hidden (view full) --- 52#define G_ELI_SUFFIX ".eli" 53 54/* 55 * Version history: 56 * 0 - Initial version number. 57 * 1 - Added data authentication support (md_aalgo field and 58 * G_ELI_FLAG_AUTH flag). 59 * 2 - Added G_ELI_FLAG_READONLY. | 27 */ 28 29#ifndef _G_ELI_H_ 30#define _G_ELI_H_ 31 32#include <sys/endian.h> 33#include <sys/errno.h> 34#include <sys/malloc.h> --- 17 unchanged lines hidden (view full) --- 52#define G_ELI_SUFFIX ".eli" 53 54/* 55 * Version history: 56 * 0 - Initial version number. 57 * 1 - Added data authentication support (md_aalgo field and 58 * G_ELI_FLAG_AUTH flag). 59 * 2 - Added G_ELI_FLAG_READONLY. |
60 * - IV is generated from offset converted to little-endian 61 * (flag G_ELI_FLAG_NATIVE_BYTE_ORDER will be set for older versions). |
|
60 */ 61#define G_ELI_VERSION 2 62 63/* ON DISK FLAGS. */ 64/* Use random, onetime keys. */ | 62 */ 63#define G_ELI_VERSION 2 64 65/* ON DISK FLAGS. */ 66/* Use random, onetime keys. */ |
65#define G_ELI_FLAG_ONETIME 0x00000001 | 67#define G_ELI_FLAG_ONETIME 0x00000001 |
66/* Ask for the passphrase from the kernel, before mounting root. */ | 68/* Ask for the passphrase from the kernel, before mounting root. */ |
67#define G_ELI_FLAG_BOOT 0x00000002 | 69#define G_ELI_FLAG_BOOT 0x00000002 |
68/* Detach on last close, if we were open for writing. */ | 70/* Detach on last close, if we were open for writing. */ |
69#define G_ELI_FLAG_WO_DETACH 0x00000004 | 71#define G_ELI_FLAG_WO_DETACH 0x00000004 |
70/* Detach on last close. */ | 72/* Detach on last close. */ |
71#define G_ELI_FLAG_RW_DETACH 0x00000008 | 73#define G_ELI_FLAG_RW_DETACH 0x00000008 |
72/* Provide data authentication. */ | 74/* Provide data authentication. */ |
73#define G_ELI_FLAG_AUTH 0x00000010 | 75#define G_ELI_FLAG_AUTH 0x00000010 |
74/* Provider is read-only, we should deny all write attempts. */ | 76/* Provider is read-only, we should deny all write attempts. */ |
75#define G_ELI_FLAG_RO 0x00000020 | 77#define G_ELI_FLAG_RO 0x00000020 |
76/* RUNTIME FLAGS. */ 77/* Provider was open for writing. */ | 78/* RUNTIME FLAGS. */ 79/* Provider was open for writing. */ |
78#define G_ELI_FLAG_WOPEN 0x00010000 | 80#define G_ELI_FLAG_WOPEN 0x00010000 |
79/* Destroy device. */ | 81/* Destroy device. */ |
80#define G_ELI_FLAG_DESTROY 0x00020000 | 82#define G_ELI_FLAG_DESTROY 0x00020000 83/* Provider uses native byte-order for IV generation. */ 84#define G_ELI_FLAG_NATIVE_BYTE_ORDER 0x00040000 |
81 82#define SHA512_MDLEN 64 83#define G_ELI_AUTH_SECKEYLEN SHA256_DIGEST_LENGTH 84 85#define G_ELI_MAXMKEYS 2 86#define G_ELI_MAXKEYLEN 64 87#define G_ELI_USERKEYLEN G_ELI_MAXKEYLEN 88#define G_ELI_DATAKEYLEN G_ELI_MAXKEYLEN --- 397 unchanged lines hidden --- | 85 86#define SHA512_MDLEN 64 87#define G_ELI_AUTH_SECKEYLEN SHA256_DIGEST_LENGTH 88 89#define G_ELI_MAXMKEYS 2 90#define G_ELI_MAXKEYLEN 64 91#define G_ELI_USERKEYLEN G_ELI_MAXKEYLEN 92#define G_ELI_DATAKEYLEN G_ELI_MAXKEYLEN --- 397 unchanged lines hidden --- |