KEYS: Provide key type operations for asymmetric key ops
authorDavid Howells <dhowells@redhat.com>
Thu, 1 Sep 2016 10:13:11 +0000 (11:13 +0100)
committerDavid Howells <dhowells@redhat.com>
Thu, 1 Sep 2016 10:13:11 +0000 (11:13 +0100)
commit0a7c8b6abaa691a1bf705d69d63e6a9cdd837009
tree9ad5edfa3d8b9bfef0b71a532149e7024b1c425a
parent8ccc7d6bad84bebf1f1a6364d1fa04d3d7b575f6
KEYS: Provide key type operations for asymmetric key ops

Provide five new operations in the key_type struct that can be used to
provide access to asymmetric key operations.  These will be implemented for
the asymmetric key type in a later patch and may refer to a key retained in
RAM by the kernel or a key retained in crypto hardware.

     int (*asym_query)(const struct kernel_pkey_params *params,
       struct kernel_pkey_query *info);
     int (*asym_eds_op)(struct kernel_pkey_params *params,
const void *in, void *out);
     int (*asym_verify_signature)(struct kernel_pkey_params *params,
          const void *in, const void *in2);

Since encrypt, decrypt and sign are identical in their interfaces, they're
rolled together in the asym_eds_op() operation and there's an operation ID
in the params argument to distinguish them.

Verify is different in that we supply the data and the signature instead
and get an error value (or 0) as the only result on the expectation that
this may well be how a hardware crypto device may work.

Signed-off-by: David Howells <dhowells@redhat.com>
Documentation/security/keys.txt
include/linux/key-type.h
include/linux/keyctl.h [new file with mode: 0644]
include/uapi/linux/keyctl.h
This page took 0.02592 seconds and 5 git commands to generate.