encrypted-keys: add ecryptfs format support

The 'encrypted' key type defines its own payload format which contains a
symmetric key randomly generated that cannot be used directly to mount
an eCryptfs filesystem, because it expects an authentication token
structure.

This patch introduces the new format 'ecryptfs' that allows to store an
authentication token structure inside the encrypted key payload containing
a randomly generated symmetric key, as the same for the format 'default'.

More details about the usage of encrypted keys with the eCryptfs
filesystem can be found in the file 'Documentation/keys-ecryptfs.txt'.

Signed-off-by: Roberto Sassu <[email protected]>
Acked-by: Gianluca Ramunno <[email protected]>
Acked-by: Tyler Hicks <[email protected]>
Signed-off-by: Mimi Zohar <[email protected]>
This commit is contained in:
Roberto Sassu 2011-06-27 13:45:44 +02:00 • committed by Mimi Zohar
commit 79a73d1887
6 changed files with 252 additions and 10 deletions

View file

@ -63,7 +63,7 @@ Usage:
keyctl add encrypted name "load hex_blob" ring
keyctl update keyid "update key-type:master-key-name"
format:= 'default'
format:= 'default | ecryptfs'
key-type:= 'trusted' | 'user'
@ -154,4 +154,6 @@ Load an encrypted key "evm" from saved blob:
24717c64 5972dcb82ab2dde83376d82b2e3c09ffc
Other uses for trusted and encrypted keys, such as for disk and file encryption
are anticipated.
are anticipated. In particular the new format 'ecryptfs' has been defined in
in order to use encrypted keys to mount an eCryptfs filesystem. More details
about the usage can be found in the file 'Documentation/keys-ecryptfs.txt'.