diff options
Diffstat (limited to 'include/keys')
-rw-r--r-- | include/keys/encrypted-type.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/keys/encrypted-type.h b/include/keys/encrypted-type.h new file mode 100644 index 000000000000..95855017a32b --- /dev/null +++ b/include/keys/encrypted-type.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 IBM Corporation | ||
3 | * Author: Mimi Zohar <zohar@us.ibm.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation, version 2 of the License. | ||
8 | */ | ||
9 | |||
10 | #ifndef _KEYS_ENCRYPTED_TYPE_H | ||
11 | #define _KEYS_ENCRYPTED_TYPE_H | ||
12 | |||
13 | #include <linux/key.h> | ||
14 | #include <linux/rcupdate.h> | ||
15 | |||
16 | struct encrypted_key_payload { | ||
17 | struct rcu_head rcu; | ||
18 | char *master_desc; /* datablob: master key name */ | ||
19 | char *datalen; /* datablob: decrypted key length */ | ||
20 | u8 *iv; /* datablob: iv */ | ||
21 | u8 *encrypted_data; /* datablob: encrypted data */ | ||
22 | unsigned short datablob_len; /* length of datablob */ | ||
23 | unsigned short decrypted_datalen; /* decrypted data length */ | ||
24 | u8 decrypted_data[0]; /* decrypted data + datablob + hmac */ | ||
25 | }; | ||
26 | |||
27 | extern struct key_type key_type_encrypted; | ||
28 | |||
29 | #endif /* _KEYS_ENCRYPTED_TYPE_H */ | ||