Ondrej Kozina c538f6ec9f dm crypt: add ability to use keys from the kernel key retention service
The kernel key service is a generic way to store keys for the use of
other subsystems. Currently there is no way to use kernel keys in dm-crypt.
This patch aims to fix that. Instead of key userspace may pass a key
description with preceding ':'. So message that constructs encryption
mapping now looks like this:

  <cipher> [<key>|:<key_string>] <iv_offset> <dev_path> <start> [<#opt_params> <opt_params>]

where <key_string> is in format: <key_size>:<key_type>:<key_description>

Currently we only support two elementary key types: 'user' and 'logon'.
Keys may be loaded in dm-crypt either via <key_string> or using
classical method and pass the key in hex representation directly.

dm-crypt device initialised with a key passed in hex representation may be
replaced with key passed in key_string format and vice versa.

(Based on original work by Andrey Ryabinin)

Signed-off-by: Ondrej Kozina <okozina@redhat.com>
Reviewed-by: David Howells <dhowells@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2016-12-08 14:13:09 -05:00
..
2016-11-11 23:23:02 +01:00
2016-11-13 10:22:07 -08:00
2016-11-13 10:24:08 -08:00
2016-10-06 17:13:54 -07:00
2016-10-21 21:40:29 +02:00
2016-09-27 12:33:47 +02:00
2016-11-13 10:02:22 -08:00
2016-10-07 21:23:40 -07:00
2016-10-07 08:35:35 -07:00
2016-11-05 10:52:29 -07:00
2016-10-07 21:23:40 -07:00
2016-11-11 16:38:26 -08:00
2016-11-11 17:02:01 -08:00
2016-10-06 17:03:49 -07:00
2016-10-14 13:13:44 -07:00
2016-11-13 10:07:08 -08:00
2016-10-14 11:07:42 -07:00
2016-11-13 10:13:33 -08:00
2016-11-10 13:12:59 +01:00
2016-11-01 09:04:04 -06:00
2016-10-19 08:39:47 -07:00
2016-10-24 19:52:24 -07:00