fscrypt_private.h (5fee36095cda45d34555aed3a2e8973b80cd6bf8) fscrypt_private.h (e455de313ef8bd1fa05a3eb6ef1bfd96eaf38e2a)
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * fscrypt_private.h
4 *
5 * Copyright (C) 2015, Google, Inc.
6 *
7 * Originally written by Michael Halcrow, Ildar Muslukhov, and Uday Savagaonkar.
8 * Heavily modified since then.

--- 298 unchanged lines hidden (view full) ---

307
308/*
309 * The list of contexts in which fscrypt uses HKDF. These values are used as
310 * the first byte of the HKDF application-specific info string to guarantee that
311 * info strings are never repeated between contexts. This ensures that all HKDF
312 * outputs are unique and cryptographically isolated, i.e. knowledge of one
313 * output doesn't reveal another.
314 */
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * fscrypt_private.h
4 *
5 * Copyright (C) 2015, Google, Inc.
6 *
7 * Originally written by Michael Halcrow, Ildar Muslukhov, and Uday Savagaonkar.
8 * Heavily modified since then.

--- 298 unchanged lines hidden (view full) ---

307
308/*
309 * The list of contexts in which fscrypt uses HKDF. These values are used as
310 * the first byte of the HKDF application-specific info string to guarantee that
311 * info strings are never repeated between contexts. This ensures that all HKDF
312 * outputs are unique and cryptographically isolated, i.e. knowledge of one
313 * output doesn't reveal another.
314 */
315#define HKDF_CONTEXT_KEY_IDENTIFIER 1
316#define HKDF_CONTEXT_PER_FILE_ENC_KEY 2
317#define HKDF_CONTEXT_DIRECT_KEY 3
318#define HKDF_CONTEXT_IV_INO_LBLK_64_KEY 4
319#define HKDF_CONTEXT_DIRHASH_KEY 5
320#define HKDF_CONTEXT_IV_INO_LBLK_32_KEY 6
321#define HKDF_CONTEXT_INODE_HASH_KEY 7
315#define HKDF_CONTEXT_KEY_IDENTIFIER 1 /* info=<empty> */
316#define HKDF_CONTEXT_PER_FILE_ENC_KEY 2 /* info=file_nonce */
317#define HKDF_CONTEXT_DIRECT_KEY 3 /* info=mode_num */
318#define HKDF_CONTEXT_IV_INO_LBLK_64_KEY 4 /* info=mode_num||fs_uuid */
319#define HKDF_CONTEXT_DIRHASH_KEY 5 /* info=file_nonce */
320#define HKDF_CONTEXT_IV_INO_LBLK_32_KEY 6 /* info=mode_num||fs_uuid */
321#define HKDF_CONTEXT_INODE_HASH_KEY 7 /* info=<empty> */
322
323int fscrypt_hkdf_expand(const struct fscrypt_hkdf *hkdf, u8 context,
324 const u8 *info, unsigned int infolen,
325 u8 *okm, unsigned int okmlen);
326
327void fscrypt_destroy_hkdf(struct fscrypt_hkdf *hkdf);
328
329/* inline_crypt.c */

--- 262 unchanged lines hidden ---
322
323int fscrypt_hkdf_expand(const struct fscrypt_hkdf *hkdf, u8 context,
324 const u8 *info, unsigned int infolen,
325 u8 *okm, unsigned int okmlen);
326
327void fscrypt_destroy_hkdf(struct fscrypt_hkdf *hkdf);
328
329/* inline_crypt.c */

--- 262 unchanged lines hidden ---