aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/keys/trusted-type.h31
-rw-r--r--include/linux/tpm_command.h28
2 files changed, 59 insertions, 0 deletions
diff --git a/include/keys/trusted-type.h b/include/keys/trusted-type.h
new file mode 100644
index 000000000000..56f82e5c9975
--- /dev/null
+++ b/include/keys/trusted-type.h
@@ -0,0 +1,31 @@
1/*
2 * Copyright (C) 2010 IBM Corporation
3 * Author: David Safford <safford@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_TRUSTED_TYPE_H
11#define _KEYS_TRUSTED_TYPE_H
12
13#include <linux/key.h>
14#include <linux/rcupdate.h>
15
16#define MIN_KEY_SIZE 32
17#define MAX_KEY_SIZE 128
18#define MAX_BLOB_SIZE 320
19
20struct trusted_key_payload {
21 struct rcu_head rcu;
22 unsigned int key_len;
23 unsigned int blob_len;
24 unsigned char migratable;
25 unsigned char key[MAX_KEY_SIZE + 1];
26 unsigned char blob[MAX_BLOB_SIZE];
27};
28
29extern struct key_type key_type_trusted;
30
31#endif /* _KEYS_TRUSTED_TYPE_H */
diff --git a/include/linux/tpm_command.h b/include/linux/tpm_command.h
new file mode 100644
index 000000000000..727512e249b5
--- /dev/null
+++ b/include/linux/tpm_command.h
@@ -0,0 +1,28 @@
1#ifndef __LINUX_TPM_COMMAND_H__
2#define __LINUX_TPM_COMMAND_H__
3
4/*
5 * TPM Command constants from specifications at
6 * http://www.trustedcomputinggroup.org
7 */
8
9/* Command TAGS */
10#define TPM_TAG_RQU_COMMAND 193
11#define TPM_TAG_RQU_AUTH1_COMMAND 194
12#define TPM_TAG_RQU_AUTH2_COMMAND 195
13#define TPM_TAG_RSP_COMMAND 196
14#define TPM_TAG_RSP_AUTH1_COMMAND 197
15#define TPM_TAG_RSP_AUTH2_COMMAND 198
16
17/* Command Ordinals */
18#define TPM_ORD_GETRANDOM 70
19#define TPM_ORD_OSAP 11
20#define TPM_ORD_OIAP 10
21#define TPM_ORD_SEAL 23
22#define TPM_ORD_UNSEAL 24
23
24/* Other constants */
25#define SRKHANDLE 0x40000000
26#define TPM_NONCE_SIZE 20
27
28#endif