diff options
Diffstat (limited to 'fs/ecryptfs/ecryptfs_kernel.h')
-rw-r--r-- | fs/ecryptfs/ecryptfs_kernel.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h index 7b39260c7bba..d123fbaa28e0 100644 --- a/fs/ecryptfs/ecryptfs_kernel.h +++ b/fs/ecryptfs/ecryptfs_kernel.h | |||
@@ -28,6 +28,7 @@ | |||
28 | #ifndef ECRYPTFS_KERNEL_H | 28 | #ifndef ECRYPTFS_KERNEL_H |
29 | #define ECRYPTFS_KERNEL_H | 29 | #define ECRYPTFS_KERNEL_H |
30 | 30 | ||
31 | #include <crypto/skcipher.h> | ||
31 | #include <keys/user-type.h> | 32 | #include <keys/user-type.h> |
32 | #include <keys/encrypted-type.h> | 33 | #include <keys/encrypted-type.h> |
33 | #include <linux/fs.h> | 34 | #include <linux/fs.h> |
@@ -38,7 +39,6 @@ | |||
38 | #include <linux/nsproxy.h> | 39 | #include <linux/nsproxy.h> |
39 | #include <linux/backing-dev.h> | 40 | #include <linux/backing-dev.h> |
40 | #include <linux/ecryptfs.h> | 41 | #include <linux/ecryptfs.h> |
41 | #include <linux/crypto.h> | ||
42 | 42 | ||
43 | #define ECRYPTFS_DEFAULT_IV_BYTES 16 | 43 | #define ECRYPTFS_DEFAULT_IV_BYTES 16 |
44 | #define ECRYPTFS_DEFAULT_EXTENT_SIZE 4096 | 44 | #define ECRYPTFS_DEFAULT_EXTENT_SIZE 4096 |
@@ -233,9 +233,9 @@ struct ecryptfs_crypt_stat { | |||
233 | size_t extent_shift; | 233 | size_t extent_shift; |
234 | unsigned int extent_mask; | 234 | unsigned int extent_mask; |
235 | struct ecryptfs_mount_crypt_stat *mount_crypt_stat; | 235 | struct ecryptfs_mount_crypt_stat *mount_crypt_stat; |
236 | struct crypto_ablkcipher *tfm; | 236 | struct crypto_skcipher *tfm; |
237 | struct crypto_hash *hash_tfm; /* Crypto context for generating | 237 | struct crypto_shash *hash_tfm; /* Crypto context for generating |
238 | * the initialization vectors */ | 238 | * the initialization vectors */ |
239 | unsigned char cipher[ECRYPTFS_MAX_CIPHER_NAME_SIZE + 1]; | 239 | unsigned char cipher[ECRYPTFS_MAX_CIPHER_NAME_SIZE + 1]; |
240 | unsigned char key[ECRYPTFS_MAX_KEY_BYTES]; | 240 | unsigned char key[ECRYPTFS_MAX_KEY_BYTES]; |
241 | unsigned char root_iv[ECRYPTFS_MAX_IV_BYTES]; | 241 | unsigned char root_iv[ECRYPTFS_MAX_IV_BYTES]; |
@@ -309,7 +309,7 @@ struct ecryptfs_global_auth_tok { | |||
309 | * keeps a list of crypto API contexts around to use when needed. | 309 | * keeps a list of crypto API contexts around to use when needed. |
310 | */ | 310 | */ |
311 | struct ecryptfs_key_tfm { | 311 | struct ecryptfs_key_tfm { |
312 | struct crypto_blkcipher *key_tfm; | 312 | struct crypto_skcipher *key_tfm; |
313 | size_t key_size; | 313 | size_t key_size; |
314 | struct mutex key_tfm_mutex; | 314 | struct mutex key_tfm_mutex; |
315 | struct list_head key_tfm_list; | 315 | struct list_head key_tfm_list; |
@@ -569,7 +569,6 @@ int ecryptfs_fill_zeros(struct file *file, loff_t new_length); | |||
569 | int ecryptfs_encrypt_and_encode_filename( | 569 | int ecryptfs_encrypt_and_encode_filename( |
570 | char **encoded_name, | 570 | char **encoded_name, |
571 | size_t *encoded_name_size, | 571 | size_t *encoded_name_size, |
572 | struct ecryptfs_crypt_stat *crypt_stat, | ||
573 | struct ecryptfs_mount_crypt_stat *mount_crypt_stat, | 572 | struct ecryptfs_mount_crypt_stat *mount_crypt_stat, |
574 | const char *name, size_t name_size); | 573 | const char *name, size_t name_size); |
575 | struct dentry *ecryptfs_lower_dentry(struct dentry *this_dentry); | 574 | struct dentry *ecryptfs_lower_dentry(struct dentry *this_dentry); |
@@ -659,7 +658,7 @@ ecryptfs_add_new_key_tfm(struct ecryptfs_key_tfm **key_tfm, char *cipher_name, | |||
659 | int ecryptfs_init_crypto(void); | 658 | int ecryptfs_init_crypto(void); |
660 | int ecryptfs_destroy_crypto(void); | 659 | int ecryptfs_destroy_crypto(void); |
661 | int ecryptfs_tfm_exists(char *cipher_name, struct ecryptfs_key_tfm **key_tfm); | 660 | int ecryptfs_tfm_exists(char *cipher_name, struct ecryptfs_key_tfm **key_tfm); |
662 | int ecryptfs_get_tfm_and_mutex_for_cipher_name(struct crypto_blkcipher **tfm, | 661 | int ecryptfs_get_tfm_and_mutex_for_cipher_name(struct crypto_skcipher **tfm, |
663 | struct mutex **tfm_mutex, | 662 | struct mutex **tfm_mutex, |
664 | char *cipher_name); | 663 | char *cipher_name); |
665 | int ecryptfs_keyring_auth_tok_for_sig(struct key **auth_tok_key, | 664 | int ecryptfs_keyring_auth_tok_for_sig(struct key **auth_tok_key, |