crypto.c (9c79f34f7ee71cd28272332b424ca64b2be006ab) crypto.c (a34f60f748c6fe5d791e9b54cffe442201428254)
1/**
2 * eCryptfs: Linux filesystem encryption layer
3 *
4 * Copyright (C) 1997-2004 Erez Zadok
5 * Copyright (C) 2001-2004 Stony Brook University
6 * Copyright (C) 2004-2007 International Business Machines Corp.
7 * Author(s): Michael A. Halcrow <mahalcro@us.ibm.com>
8 * Michael C. Thompson <mcthomps@us.ibm.com>

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

170 * @crypt_stat: Pointer to crypt_stat struct for the current inode
171 * @offset: Offset of the extent whose IV we are to derive
172 *
173 * Generate the initialization vector from the given root IV and page
174 * offset.
175 *
176 * Returns zero on success; non-zero on error.
177 */
1/**
2 * eCryptfs: Linux filesystem encryption layer
3 *
4 * Copyright (C) 1997-2004 Erez Zadok
5 * Copyright (C) 2001-2004 Stony Brook University
6 * Copyright (C) 2004-2007 International Business Machines Corp.
7 * Author(s): Michael A. Halcrow <mahalcro@us.ibm.com>
8 * Michael C. Thompson <mcthomps@us.ibm.com>

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

170 * @crypt_stat: Pointer to crypt_stat struct for the current inode
171 * @offset: Offset of the extent whose IV we are to derive
172 *
173 * Generate the initialization vector from the given root IV and page
174 * offset.
175 *
176 * Returns zero on success; non-zero on error.
177 */
178static int ecryptfs_derive_iv(char *iv, struct ecryptfs_crypt_stat *crypt_stat,
179 loff_t offset)
178int ecryptfs_derive_iv(char *iv, struct ecryptfs_crypt_stat *crypt_stat,
179 loff_t offset)
180{
181 int rc = 0;
182 char dst[MD5_DIGEST_SIZE];
183 char src[ECRYPTFS_MAX_IV_BYTES + 16];
184
185 if (unlikely(ecryptfs_verbosity > 0)) {
186 ecryptfs_printk(KERN_DEBUG, "root iv:\n");
187 ecryptfs_dump_hex(crypt_stat->root_iv, crypt_stat->iv_bytes);

--- 1726 unchanged lines hidden ---
180{
181 int rc = 0;
182 char dst[MD5_DIGEST_SIZE];
183 char src[ECRYPTFS_MAX_IV_BYTES + 16];
184
185 if (unlikely(ecryptfs_verbosity > 0)) {
186 ecryptfs_printk(KERN_DEBUG, "root iv:\n");
187 ecryptfs_dump_hex(crypt_stat->root_iv, crypt_stat->iv_bytes);

--- 1726 unchanged lines hidden ---