aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs/ecryptfs_kernel.h
diff options
context:
space:
mode:
authorMichael Halcrow <mhalcrow@us.ibm.com>2006-10-31 01:07:18 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-31 11:07:01 -0500
commit8bba066f4e3854755a303cee37ea37bd080a46b3 (patch)
tree3f8cf2df5da6459b0218b97b3799ceb896d4ba8a /fs/ecryptfs/ecryptfs_kernel.h
parent565d9724b8ce49b530287de34aa17f45f21624d5 (diff)
[PATCH] eCryptfs: Cipher code to new crypto API
Update cipher block encryption code to the new crypto API. Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ecryptfs/ecryptfs_kernel.h')
-rw-r--r--fs/ecryptfs/ecryptfs_kernel.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h
index 840aa010e0d3..199fcda50e1b 100644
--- a/fs/ecryptfs/ecryptfs_kernel.h
+++ b/fs/ecryptfs/ecryptfs_kernel.h
@@ -205,7 +205,7 @@ struct ecryptfs_crypt_stat {
205 size_t extent_shift; 205 size_t extent_shift;
206 unsigned int extent_mask; 206 unsigned int extent_mask;
207 struct ecryptfs_mount_crypt_stat *mount_crypt_stat; 207 struct ecryptfs_mount_crypt_stat *mount_crypt_stat;
208 struct crypto_tfm *tfm; 208 struct crypto_blkcipher *tfm;
209 struct crypto_hash *hash_tfm; /* Crypto context for generating 209 struct crypto_hash *hash_tfm; /* Crypto context for generating
210 * the initialization vectors */ 210 * the initialization vectors */
211 unsigned char cipher[ECRYPTFS_MAX_CIPHER_NAME_SIZE]; 211 unsigned char cipher[ECRYPTFS_MAX_CIPHER_NAME_SIZE];
@@ -245,7 +245,7 @@ struct ecryptfs_mount_crypt_stat {
245 struct ecryptfs_auth_tok *global_auth_tok; 245 struct ecryptfs_auth_tok *global_auth_tok;
246 struct key *global_auth_tok_key; 246 struct key *global_auth_tok_key;
247 size_t global_default_cipher_key_size; 247 size_t global_default_cipher_key_size;
248 struct crypto_tfm *global_key_tfm; 248 struct crypto_blkcipher *global_key_tfm;
249 struct mutex global_key_tfm_mutex; 249 struct mutex global_key_tfm_mutex;
250 unsigned char global_default_cipher_name[ECRYPTFS_MAX_CIPHER_NAME_SIZE 250 unsigned char global_default_cipher_name[ECRYPTFS_MAX_CIPHER_NAME_SIZE
251 + 1]; 251 + 1];
@@ -426,6 +426,9 @@ void ecryptfs_destruct_crypt_stat(struct ecryptfs_crypt_stat *crypt_stat);
426void ecryptfs_destruct_mount_crypt_stat( 426void ecryptfs_destruct_mount_crypt_stat(
427 struct ecryptfs_mount_crypt_stat *mount_crypt_stat); 427 struct ecryptfs_mount_crypt_stat *mount_crypt_stat);
428int ecryptfs_init_crypt_ctx(struct ecryptfs_crypt_stat *crypt_stat); 428int ecryptfs_init_crypt_ctx(struct ecryptfs_crypt_stat *crypt_stat);
429int ecryptfs_crypto_api_algify_cipher_name(char **algified_name,
430 char *cipher_name,
431 char *chaining_modifier);
429int ecryptfs_write_inode_size_to_header(struct file *lower_file, 432int ecryptfs_write_inode_size_to_header(struct file *lower_file,
430 struct inode *lower_inode, 433 struct inode *lower_inode,
431 struct inode *inode); 434 struct inode *inode);
@@ -474,7 +477,7 @@ ecryptfs_parse_packet_set(struct ecryptfs_crypt_stat *crypt_stat,
474 unsigned char *src, struct dentry *ecryptfs_dentry); 477 unsigned char *src, struct dentry *ecryptfs_dentry);
475int ecryptfs_truncate(struct dentry *dentry, loff_t new_length); 478int ecryptfs_truncate(struct dentry *dentry, loff_t new_length);
476int 479int
477ecryptfs_process_cipher(struct crypto_tfm **key_tfm, char *cipher_name, 480ecryptfs_process_cipher(struct crypto_blkcipher **key_tfm, char *cipher_name,
478 size_t *key_size); 481 size_t *key_size);
479int ecryptfs_inode_test(struct inode *inode, void *candidate_lower_inode); 482int ecryptfs_inode_test(struct inode *inode, void *candidate_lower_inode);
480int ecryptfs_inode_set(struct inode *inode, void *lower_inode); 483int ecryptfs_inode_set(struct inode *inode, void *lower_inode);