revert-mm-fix-blkdev-size-calculation-in-generic_write_checks
[linux-2.6/linux-trees-mm.git] / fs / reiser4 / plugin / crypto / cipher.h
bloba7920e0a1e95243d776ed49c94ab465b2dcad3ba
1 /* Copyright 2002, 2003 by Hans Reiser, licensing governed by reiser4/README */
2 /* This file contains definitions for the objects operated
3 by reiser4 key manager, which is something like keyring
4 wrapped by appropriate reiser4 plugin */
6 #if !defined( __FS_REISER4_CRYPT_H__ )
7 #define __FS_REISER4_CRYPT_H__
9 #include <linux/crypto.h>
11 /* key info imported from user space */
12 struct reiser4_crypto_data {
13 int keysize; /* uninstantiated key size */
14 __u8 * key; /* uninstantiated key */
15 int keyid_size; /* size of passphrase */
16 __u8 * keyid; /* passphrase */
19 /* This object contains all needed infrastructure to implement
20 cipher transform. This is operated (allocating, inheriting,
21 validating, binding to host inode, etc..) by reiser4 key manager.
23 This info can be allocated in two cases:
24 1. importing a key from user space.
25 2. reading inode from disk */
26 struct reiser4_crypto_info {
27 struct inode * host;
28 struct crypto_hash * digest;
29 struct crypto_blkcipher * cipher;
30 #if 0
31 cipher_key_plugin * kplug; /* key manager */
32 #endif
33 __u8 * keyid; /* key fingerprint, created by digest plugin,
34 using uninstantiated key and passphrase.
35 supposed to be stored in disk stat-data */
36 int inst; /* this indicates if the cipher key is
37 instantiated (case 1 above) */
38 int keysize; /* uninstantiated key size (bytes), supposed
39 to be stored in disk stat-data */
40 int keyload_count; /* number of the objects which has this
41 crypto-stat attached */
44 #endif /* __FS_REISER4_CRYPT_H__ */
47 Local variables:
48 c-indentation-style: "K&R"
49 mode-name: "LC"
50 c-basic-offset: 8
51 tab-width: 8
52 fill-column: 120
53 scroll-step: 1
54 End: