diff options
-rw-r--r-- | Documentation/security/00-INDEX | 4 | ||||
-rw-r--r-- | Documentation/security/conf.py | 8 | ||||
-rw-r--r-- | Documentation/security/keys/index.rst | 1 | ||||
-rw-r--r-- | Documentation/security/keys/trusted-encrypted.rst (renamed from Documentation/security/keys-trusted-encrypted.txt) | 32 | ||||
-rw-r--r-- | MAINTAINERS | 4 | ||||
-rw-r--r-- | security/keys/encrypted-keys/encrypted.c | 2 | ||||
-rw-r--r-- | security/keys/encrypted-keys/masterkey_trusted.c | 2 | ||||
-rw-r--r-- | security/keys/trusted.c | 2 |
8 files changed, 26 insertions, 29 deletions
diff --git a/Documentation/security/00-INDEX b/Documentation/security/00-INDEX deleted file mode 100644 index c8dbbc227326..000000000000 --- a/Documentation/security/00-INDEX +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | 00-INDEX | ||
2 | - this file. | ||
3 | keys-trusted-encrypted.txt | ||
4 | - info on the Trusted and Encrypted keys in the kernel key ring service. | ||
diff --git a/Documentation/security/conf.py b/Documentation/security/conf.py deleted file mode 100644 index 472fc9a8eb67..000000000000 --- a/Documentation/security/conf.py +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | project = "The kernel security subsystem manual" | ||
2 | |||
3 | tags.add("subproject") | ||
4 | |||
5 | latex_documents = [ | ||
6 | ('index', 'security.tex', project, | ||
7 | 'The kernel development community', 'manual'), | ||
8 | ] | ||
diff --git a/Documentation/security/keys/index.rst b/Documentation/security/keys/index.rst index d7ddbc1c2502..647d58f2588e 100644 --- a/Documentation/security/keys/index.rst +++ b/Documentation/security/keys/index.rst | |||
@@ -8,3 +8,4 @@ Kernel Keys | |||
8 | core | 8 | core |
9 | ecryptfs | 9 | ecryptfs |
10 | request-key | 10 | request-key |
11 | trusted-encrypted | ||
diff --git a/Documentation/security/keys-trusted-encrypted.txt b/Documentation/security/keys/trusted-encrypted.rst index b20a993a32af..7b503831bdea 100644 --- a/Documentation/security/keys-trusted-encrypted.txt +++ b/Documentation/security/keys/trusted-encrypted.rst | |||
@@ -1,4 +1,6 @@ | |||
1 | Trusted and Encrypted Keys | 1 | ========================== |
2 | Trusted and Encrypted Keys | ||
3 | ========================== | ||
2 | 4 | ||
3 | Trusted and Encrypted Keys are two new key types added to the existing kernel | 5 | Trusted and Encrypted Keys are two new key types added to the existing kernel |
4 | key ring service. Both of these new types are variable length symmetric keys, | 6 | key ring service. Both of these new types are variable length symmetric keys, |
@@ -20,7 +22,8 @@ By default, trusted keys are sealed under the SRK, which has the default | |||
20 | authorization value (20 zeros). This can be set at takeownership time with the | 22 | authorization value (20 zeros). This can be set at takeownership time with the |
21 | trouser's utility: "tpm_takeownership -u -z". | 23 | trouser's utility: "tpm_takeownership -u -z". |
22 | 24 | ||
23 | Usage: | 25 | Usage:: |
26 | |||
24 | keyctl add trusted name "new keylen [options]" ring | 27 | keyctl add trusted name "new keylen [options]" ring |
25 | keyctl add trusted name "load hex_blob [pcrlock=pcrnum]" ring | 28 | keyctl add trusted name "load hex_blob [pcrlock=pcrnum]" ring |
26 | keyctl update key "update [options]" | 29 | keyctl update key "update [options]" |
@@ -64,19 +67,22 @@ The decrypted portion of encrypted keys can contain either a simple symmetric | |||
64 | key or a more complex structure. The format of the more complex structure is | 67 | key or a more complex structure. The format of the more complex structure is |
65 | application specific, which is identified by 'format'. | 68 | application specific, which is identified by 'format'. |
66 | 69 | ||
67 | Usage: | 70 | Usage:: |
71 | |||
68 | keyctl add encrypted name "new [format] key-type:master-key-name keylen" | 72 | keyctl add encrypted name "new [format] key-type:master-key-name keylen" |
69 | ring | 73 | ring |
70 | keyctl add encrypted name "load hex_blob" ring | 74 | keyctl add encrypted name "load hex_blob" ring |
71 | keyctl update keyid "update key-type:master-key-name" | 75 | keyctl update keyid "update key-type:master-key-name" |
72 | 76 | ||
73 | format:= 'default | ecryptfs' | 77 | Where:: |
74 | key-type:= 'trusted' | 'user' | 78 | |
79 | format:= 'default | ecryptfs' | ||
80 | key-type:= 'trusted' | 'user' | ||
75 | 81 | ||
76 | 82 | ||
77 | Examples of trusted and encrypted key usage: | 83 | Examples of trusted and encrypted key usage: |
78 | 84 | ||
79 | Create and save a trusted key named "kmk" of length 32 bytes: | 85 | Create and save a trusted key named "kmk" of length 32 bytes:: |
80 | 86 | ||
81 | $ keyctl add trusted kmk "new 32" @u | 87 | $ keyctl add trusted kmk "new 32" @u |
82 | 440502848 | 88 | 440502848 |
@@ -99,7 +105,7 @@ Create and save a trusted key named "kmk" of length 32 bytes: | |||
99 | 105 | ||
100 | $ keyctl pipe 440502848 > kmk.blob | 106 | $ keyctl pipe 440502848 > kmk.blob |
101 | 107 | ||
102 | Load a trusted key from the saved blob: | 108 | Load a trusted key from the saved blob:: |
103 | 109 | ||
104 | $ keyctl add trusted kmk "load `cat kmk.blob`" @u | 110 | $ keyctl add trusted kmk "load `cat kmk.blob`" @u |
105 | 268728824 | 111 | 268728824 |
@@ -114,7 +120,7 @@ Load a trusted key from the saved blob: | |||
114 | f1f8fff03ad0acb083725535636addb08d73dedb9832da198081e5deae84bfaf0409c22b | 120 | f1f8fff03ad0acb083725535636addb08d73dedb9832da198081e5deae84bfaf0409c22b |
115 | e4a8aea2b607ec96931e6f4d4fe563ba | 121 | e4a8aea2b607ec96931e6f4d4fe563ba |
116 | 122 | ||
117 | Reseal a trusted key under new pcr values: | 123 | Reseal a trusted key under new pcr values:: |
118 | 124 | ||
119 | $ keyctl update 268728824 "update pcrinfo=`cat pcr.blob`" | 125 | $ keyctl update 268728824 "update pcrinfo=`cat pcr.blob`" |
120 | $ keyctl print 268728824 | 126 | $ keyctl print 268728824 |
@@ -135,11 +141,13 @@ compromised by a user level problem, and when sealed to specific boot PCR | |||
135 | values, protects against boot and offline attacks. Create and save an | 141 | values, protects against boot and offline attacks. Create and save an |
136 | encrypted key "evm" using the above trusted key "kmk": | 142 | encrypted key "evm" using the above trusted key "kmk": |
137 | 143 | ||
138 | option 1: omitting 'format' | 144 | option 1: omitting 'format':: |
145 | |||
139 | $ keyctl add encrypted evm "new trusted:kmk 32" @u | 146 | $ keyctl add encrypted evm "new trusted:kmk 32" @u |
140 | 159771175 | 147 | 159771175 |
141 | 148 | ||
142 | option 2: explicitly defining 'format' as 'default' | 149 | option 2: explicitly defining 'format' as 'default':: |
150 | |||
143 | $ keyctl add encrypted evm "new default trusted:kmk 32" @u | 151 | $ keyctl add encrypted evm "new default trusted:kmk 32" @u |
144 | 159771175 | 152 | 159771175 |
145 | 153 | ||
@@ -150,7 +158,7 @@ option 2: explicitly defining 'format' as 'default' | |||
150 | 158 | ||
151 | $ keyctl pipe 159771175 > evm.blob | 159 | $ keyctl pipe 159771175 > evm.blob |
152 | 160 | ||
153 | Load an encrypted key "evm" from saved blob: | 161 | Load an encrypted key "evm" from saved blob:: |
154 | 162 | ||
155 | $ keyctl add encrypted evm "load `cat evm.blob`" @u | 163 | $ keyctl add encrypted evm "load `cat evm.blob`" @u |
156 | 831684262 | 164 | 831684262 |
@@ -164,4 +172,4 @@ Other uses for trusted and encrypted keys, such as for disk and file encryption | |||
164 | are anticipated. In particular the new format 'ecryptfs' has been defined in | 172 | are anticipated. In particular the new format 'ecryptfs' has been defined in |
165 | in order to use encrypted keys to mount an eCryptfs filesystem. More details | 173 | in order to use encrypted keys to mount an eCryptfs filesystem. More details |
166 | about the usage can be found in the file | 174 | about the usage can be found in the file |
167 | 'Documentation/security/keys-ecryptfs.txt'. | 175 | ``Documentation/security/keys-ecryptfs.txt``. |
diff --git a/MAINTAINERS b/MAINTAINERS index 9f3b8b0cae5a..20f25e3b0667 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -7356,7 +7356,7 @@ M: Mimi Zohar <zohar@linux.vnet.ibm.com> | |||
7356 | L: linux-security-module@vger.kernel.org | 7356 | L: linux-security-module@vger.kernel.org |
7357 | L: keyrings@vger.kernel.org | 7357 | L: keyrings@vger.kernel.org |
7358 | S: Supported | 7358 | S: Supported |
7359 | F: Documentation/security/keys-trusted-encrypted.txt | 7359 | F: Documentation/security/keys/trusted-encrypted.rst |
7360 | F: include/keys/trusted-type.h | 7360 | F: include/keys/trusted-type.h |
7361 | F: security/keys/trusted.c | 7361 | F: security/keys/trusted.c |
7362 | F: security/keys/trusted.h | 7362 | F: security/keys/trusted.h |
@@ -7367,7 +7367,7 @@ M: David Safford <safford@us.ibm.com> | |||
7367 | L: linux-security-module@vger.kernel.org | 7367 | L: linux-security-module@vger.kernel.org |
7368 | L: keyrings@vger.kernel.org | 7368 | L: keyrings@vger.kernel.org |
7369 | S: Supported | 7369 | S: Supported |
7370 | F: Documentation/security/keys-trusted-encrypted.txt | 7370 | F: Documentation/security/keys/trusted-encrypted.rst |
7371 | F: include/keys/encrypted-type.h | 7371 | F: include/keys/encrypted-type.h |
7372 | F: security/keys/encrypted-keys/ | 7372 | F: security/keys/encrypted-keys/ |
7373 | 7373 | ||
diff --git a/security/keys/encrypted-keys/encrypted.c b/security/keys/encrypted-keys/encrypted.c index 0010955d7876..72ecbd0d1e37 100644 --- a/security/keys/encrypted-keys/encrypted.c +++ b/security/keys/encrypted-keys/encrypted.c | |||
@@ -11,7 +11,7 @@ | |||
11 | * it under the terms of the GNU General Public License as published by | 11 | * it under the terms of the GNU General Public License as published by |
12 | * the Free Software Foundation, version 2 of the License. | 12 | * the Free Software Foundation, version 2 of the License. |
13 | * | 13 | * |
14 | * See Documentation/security/keys-trusted-encrypted.txt | 14 | * See Documentation/security/keys/trusted-encrypted.rst |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/uaccess.h> | 17 | #include <linux/uaccess.h> |
diff --git a/security/keys/encrypted-keys/masterkey_trusted.c b/security/keys/encrypted-keys/masterkey_trusted.c index b5b4812dbc87..cbf0bc127a73 100644 --- a/security/keys/encrypted-keys/masterkey_trusted.c +++ b/security/keys/encrypted-keys/masterkey_trusted.c | |||
@@ -11,7 +11,7 @@ | |||
11 | * it under the terms of the GNU General Public License as published by | 11 | * it under the terms of the GNU General Public License as published by |
12 | * the Free Software Foundation, version 2 of the License. | 12 | * the Free Software Foundation, version 2 of the License. |
13 | * | 13 | * |
14 | * See Documentation/security/keys-trusted-encrypted.txt | 14 | * See Documentation/security/keys/trusted-encrypted.rst |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/uaccess.h> | 17 | #include <linux/uaccess.h> |
diff --git a/security/keys/trusted.c b/security/keys/trusted.c index 2ae31c5a87de..3811e75d280f 100644 --- a/security/keys/trusted.c +++ b/security/keys/trusted.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
9 | * the Free Software Foundation, version 2 of the License. | 9 | * the Free Software Foundation, version 2 of the License. |
10 | * | 10 | * |
11 | * See Documentation/security/keys-trusted-encrypted.txt | 11 | * See Documentation/security/keys/trusted-encrypted.rst |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <crypto/hash_info.h> | 14 | #include <crypto/hash_info.h> |