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
{
28 struct crypto_hash
* digest
;
29 struct crypto_blkcipher
* cipher
;
31 cipher_key_plugin
* kplug
; /* key manager */
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__ */
48 c-indentation-style: "K&R"