Skip to content

Commit 5395d31

Browse files
keesJonathan Corbet
authored andcommitted
doc: ReSTify keys-trusted-encrypted.txt
Adjusts for ReST markup and moves under keys security devel index. Cc: David Howells <dhowells@redhat.com> Cc: Mimi Zohar <zohar@linux.vnet.ibm.com> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
1 parent 3db38ed commit 5395d31

File tree

8 files changed

+26
-29
lines changed

8 files changed

+26
-29
lines changed

Documentation/security/00-INDEX

Lines changed: 0 additions & 4 deletions
This file was deleted.

Documentation/security/conf.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

Documentation/security/keys/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ Kernel Keys
88
core
99
ecryptfs
1010
request-key
11+
trusted-encrypted

Documentation/security/keys-trusted-encrypted.txt renamed to Documentation/security/keys/trusted-encrypted.rst

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
Trusted and Encrypted Keys
1+
==========================
2+
Trusted and Encrypted Keys
3+
==========================
24

35
Trusted and Encrypted Keys are two new key types added to the existing kernel
46
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
2022
authorization value (20 zeros). This can be set at takeownership time with the
2123
trouser's utility: "tpm_takeownership -u -z".
2224

23-
Usage:
25+
Usage::
26+
2427
keyctl add trusted name "new keylen [options]" ring
2528
keyctl add trusted name "load hex_blob [pcrlock=pcrnum]" ring
2629
keyctl update key "update [options]"
@@ -64,19 +67,22 @@ The decrypted portion of encrypted keys can contain either a simple symmetric
6467
key or a more complex structure. The format of the more complex structure is
6568
application specific, which is identified by 'format'.
6669

67-
Usage:
70+
Usage::
71+
6872
keyctl add encrypted name "new [format] key-type:master-key-name keylen"
6973
ring
7074
keyctl add encrypted name "load hex_blob" ring
7175
keyctl update keyid "update key-type:master-key-name"
7276

73-
format:= 'default | ecryptfs'
74-
key-type:= 'trusted' | 'user'
77+
Where::
78+
79+
format:= 'default | ecryptfs'
80+
key-type:= 'trusted' | 'user'
7581

7682

7783
Examples of trusted and encrypted key usage:
7884

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::
8086

8187
$ keyctl add trusted kmk "new 32" @u
8288
440502848
@@ -99,7 +105,7 @@ Create and save a trusted key named "kmk" of length 32 bytes:
99105

100106
$ keyctl pipe 440502848 > kmk.blob
101107

102-
Load a trusted key from the saved blob:
108+
Load a trusted key from the saved blob::
103109

104110
$ keyctl add trusted kmk "load `cat kmk.blob`" @u
105111
268728824
@@ -114,7 +120,7 @@ Load a trusted key from the saved blob:
114120
f1f8fff03ad0acb083725535636addb08d73dedb9832da198081e5deae84bfaf0409c22b
115121
e4a8aea2b607ec96931e6f4d4fe563ba
116122

117-
Reseal a trusted key under new pcr values:
123+
Reseal a trusted key under new pcr values::
118124

119125
$ keyctl update 268728824 "update pcrinfo=`cat pcr.blob`"
120126
$ keyctl print 268728824
@@ -135,11 +141,13 @@ compromised by a user level problem, and when sealed to specific boot PCR
135141
values, protects against boot and offline attacks. Create and save an
136142
encrypted key "evm" using the above trusted key "kmk":
137143

138-
option 1: omitting 'format'
144+
option 1: omitting 'format'::
145+
139146
$ keyctl add encrypted evm "new trusted:kmk 32" @u
140147
159771175
141148

142-
option 2: explicitly defining 'format' as 'default'
149+
option 2: explicitly defining 'format' as 'default'::
150+
143151
$ keyctl add encrypted evm "new default trusted:kmk 32" @u
144152
159771175
145153

@@ -150,7 +158,7 @@ option 2: explicitly defining 'format' as 'default'
150158

151159
$ keyctl pipe 159771175 > evm.blob
152160

153-
Load an encrypted key "evm" from saved blob:
161+
Load an encrypted key "evm" from saved blob::
154162

155163
$ keyctl add encrypted evm "load `cat evm.blob`" @u
156164
831684262
@@ -164,4 +172,4 @@ Other uses for trusted and encrypted keys, such as for disk and file encryption
164172
are anticipated. In particular the new format 'ecryptfs' has been defined in
165173
in order to use encrypted keys to mount an eCryptfs filesystem. More details
166174
about the usage can be found in the file
167-
'Documentation/security/keys-ecryptfs.txt'.
175+
``Documentation/security/keys-ecryptfs.txt``.

MAINTAINERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7356,7 +7356,7 @@ M: Mimi Zohar <zohar@linux.vnet.ibm.com>
73567356
L: linux-security-module@vger.kernel.org
73577357
L: keyrings@vger.kernel.org
73587358
S: Supported
7359-
F: Documentation/security/keys-trusted-encrypted.txt
7359+
F: Documentation/security/keys/trusted-encrypted.rst
73607360
F: include/keys/trusted-type.h
73617361
F: security/keys/trusted.c
73627362
F: security/keys/trusted.h
@@ -7367,7 +7367,7 @@ M: David Safford <safford@us.ibm.com>
73677367
L: linux-security-module@vger.kernel.org
73687368
L: keyrings@vger.kernel.org
73697369
S: Supported
7370-
F: Documentation/security/keys-trusted-encrypted.txt
7370+
F: Documentation/security/keys/trusted-encrypted.rst
73717371
F: include/keys/encrypted-type.h
73727372
F: security/keys/encrypted-keys/
73737373

security/keys/encrypted-keys/encrypted.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* it under the terms of the GNU General Public License as published by
1212
* the Free Software Foundation, version 2 of the License.
1313
*
14-
* See Documentation/security/keys-trusted-encrypted.txt
14+
* See Documentation/security/keys/trusted-encrypted.rst
1515
*/
1616

1717
#include <linux/uaccess.h>

security/keys/encrypted-keys/masterkey_trusted.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* it under the terms of the GNU General Public License as published by
1212
* the Free Software Foundation, version 2 of the License.
1313
*
14-
* See Documentation/security/keys-trusted-encrypted.txt
14+
* See Documentation/security/keys/trusted-encrypted.rst
1515
*/
1616

1717
#include <linux/uaccess.h>

security/keys/trusted.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* it under the terms of the GNU General Public License as published by
99
* the Free Software Foundation, version 2 of the License.
1010
*
11-
* See Documentation/security/keys-trusted-encrypted.txt
11+
* See Documentation/security/keys/trusted-encrypted.rst
1212
*/
1313

1414
#include <crypto/hash_info.h>

0 commit comments

Comments
 (0)