linux/security/keys
Mat Martineau ddbb411487 KEYS: Add KEYCTL_DH_COMPUTE command
This adds userspace access to Diffie-Hellman computations through a
new keyctl() syscall command to calculate shared secrets or public
keys using input parameters stored in the keyring.

Input key ids are provided in a struct due to the current 5-arg limit
for the keyctl syscall. Only user keys are supported in order to avoid
exposing the content of logon or encrypted keys.

The output is written to the provided buffer, based on the assumption
that the values are only needed in userspace.

Future support for other types of key derivation would involve a new
command, like KEYCTL_ECDH_COMPUTE.

Once Diffie-Hellman support is included in the crypto API, this code
can be converted to use the crypto API to take advantage of possible
hardware acceleration and reduce redundant code.

Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David Howells <dhowells@redhat.com>
2016-04-12 19:54:58 +01:00
..
encrypted-keys KEYS: Use skcipher 2016-01-27 20:36:03 +08:00
big_key.c Security: Keys: Big keys stored encrypted 2016-04-12 19:54:58 +01:00
compat.c KEYS: Add KEYCTL_DH_COMPUTE command 2016-04-12 19:54:58 +01:00
dh.c KEYS: Add KEYCTL_DH_COMPUTE command 2016-04-12 19:54:58 +01:00
gc.c KEYS: Fix crash when attempt to garbage collect an uninstantiated keyring 2015-10-15 17:21:37 +01:00
internal.h KEYS: Add KEYCTL_DH_COMPUTE command 2016-04-12 19:54:58 +01:00
Kconfig KEYS: Add KEYCTL_DH_COMPUTE command 2016-04-12 19:54:58 +01:00
key.c KEYS: Add an alloc flag to convey the builtinness of a key 2016-02-09 16:40:46 +00:00
keyctl.c KEYS: Add KEYCTL_DH_COMPUTE command 2016-04-12 19:54:58 +01:00
keyring.c KEYS: Merge the type-specific data with the payload data 2015-10-21 15:18:36 +01:00
Makefile KEYS: Add KEYCTL_DH_COMPUTE command 2016-04-12 19:54:58 +01:00
permission.c KEYS: Move the flags representing required permission to linux/key.h 2014-03-14 17:44:49 +00:00
persistent.c KEYS: Move the flags representing required permission to linux/key.h 2014-03-14 17:44:49 +00:00
proc.c KEYS: Make /proc/keys unconditional if CONFIG_KEYS=y 2015-01-22 22:34:32 +00:00
process_keys.c KEYS: Fix keyring ref leak in join_session_keyring() 2016-01-20 10:50:48 +11:00
request_key_auth.c KEYS: Merge the type-specific data with the payload data 2015-10-21 15:18:36 +01:00
request_key.c Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2015-11-05 15:32:38 -08:00
sysctl.c security: Convert use of typedef ctl_table to struct ctl_table 2014-04-15 13:39:58 +10:00
trusted.c tpm: fix checks for policy digest existence in tpm2_seal_trusted() 2016-02-10 04:10:55 +02:00
trusted.h keys, trusted: move struct trusted_key_options to trusted-type.h 2015-10-19 01:01:21 +02:00
user_defined.c KEYS: user_update should use copy of payload made during preparsing 2016-04-12 19:54:58 +01:00