]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/keys/encrypted-type.h
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / include / keys / encrypted-type.h
diff --git a/include/keys/encrypted-type.h b/include/keys/encrypted-type.h
new file mode 100644 (file)
index 0000000..9585501
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2010 IBM Corporation
+ * Author: Mimi Zohar <zohar@us.ibm.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 2 of the License.
+ */
+
+#ifndef _KEYS_ENCRYPTED_TYPE_H
+#define _KEYS_ENCRYPTED_TYPE_H
+
+#include <linux/key.h>
+#include <linux/rcupdate.h>
+
+struct encrypted_key_payload {
+       struct rcu_head rcu;
+       char *master_desc;      /* datablob: master key name */
+       char *datalen;          /* datablob: decrypted key length */
+       u8 *iv;                 /* datablob: iv */
+       u8 *encrypted_data;     /* datablob: encrypted data */
+       unsigned short datablob_len;    /* length of datablob */
+       unsigned short decrypted_datalen;       /* decrypted data length */
+       u8 decrypted_data[0];   /* decrypted data +  datablob + hmac */
+};
+
+extern struct key_type key_type_encrypted;
+
+#endif /* _KEYS_ENCRYPTED_TYPE_H */