Deleted Added
full compact
26c26
< * $FreeBSD: head/sys/geom/eli/g_eli.h 213062 2010-09-23 11:19:48Z pjd $
---
> * $FreeBSD: head/sys/geom/eli/g_eli.h 213067 2010-09-23 11:49:47Z pjd $
62a63
> * 5 - Added multiple encrypton keys.
64c65
< #define G_ELI_VERSION 4
---
> #define G_ELI_VERSION 5
85a87,88
> /* Provider uses single encryption key. */
> #define G_ELI_FLAG_SINGLE_KEY 0x00080000
100a104,105
> /* Switch data encryption key every 2^20 blocks. */
> #define G_ELI_KEY_SHIFT 20
142,158c147,166
< struct g_geom *sc_geom;
< u_int sc_crypto;
< uint8_t sc_mkey[G_ELI_DATAIVKEYLEN];
< uint8_t sc_ekey[G_ELI_DATAKEYLEN];
< u_int sc_ealgo;
< u_int sc_ekeylen;
< uint8_t sc_akey[G_ELI_AUTHKEYLEN];
< u_int sc_aalgo;
< u_int sc_akeylen;
< u_int sc_alen;
< SHA256_CTX sc_akeyctx;
< uint8_t sc_ivkey[G_ELI_IVKEYLEN];
< SHA256_CTX sc_ivctx;
< int sc_nkey;
< uint32_t sc_flags;
< u_int sc_bytes_per_sector;
< u_int sc_data_per_sector;
---
> struct g_geom *sc_geom;
> u_int sc_crypto;
> uint8_t sc_mkey[G_ELI_DATAIVKEYLEN];
> uint8_t **sc_ekeys;
> u_int sc_nekeys;
> u_int sc_ealgo;
> u_int sc_ekeylen;
> uint8_t sc_akey[G_ELI_AUTHKEYLEN];
> u_int sc_aalgo;
> u_int sc_akeylen;
> u_int sc_alen;
> SHA256_CTX sc_akeyctx;
> uint8_t sc_ivkey[G_ELI_IVKEYLEN];
> SHA256_CTX sc_ivctx;
> int sc_nkey;
> uint32_t sc_flags;
> off_t sc_mediasize;
> size_t sc_sectorsize;
> u_int sc_bytes_per_sector;
> u_int sc_data_per_sector;
162c170
< struct mtx sc_queue_mtx;
---
> struct mtx sc_queue_mtx;
234c242
< eli_metadata_decode_v1v2v3v4(const u_char *data, struct g_eli_metadata *md)
---
> eli_metadata_decode_v1v2v3v4v5(const u_char *data, struct g_eli_metadata *md)
272c280,281
< error = eli_metadata_decode_v1v2v3v4(data, md);
---
> case 5:
> error = eli_metadata_decode_v1v2v3v4v5(data, md);
463a473,474
> uint8_t *g_eli_crypto_key(struct g_eli_softc *sc, off_t offset,
> size_t blocksize);