]>
git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/blob - include/linux/keyctl.h
3 * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
12 #ifndef __LINUX_KEYCTL_H
13 #define __LINUX_KEYCTL_H
15 #include <uapi/linux/keyctl.h>
17 struct kernel_pkey_query
{
18 __u32 supported_ops
; /* Which ops are supported */
19 __u32 key_size
; /* Size of the key in bits */
20 __u16 max_data_size
; /* Maximum size of raw data to sign in bytes */
21 __u16 max_sig_size
; /* Maximum size of signature in bytes */
22 __u16 max_enc_size
; /* Maximum size of encrypted blob in bytes */
23 __u16 max_dec_size
; /* Maximum size of decrypted blob in bytes */
26 enum kernel_pkey_operation
{
33 struct kernel_pkey_params
{
35 const char *encoding
; /* Encoding (eg. "oaep" or "raw" for none) */
36 const char *hash_algo
; /* Digest algorithm used (eg. "sha1") or NULL if N/A */
37 char *info
; /* Modified info string to be released later */
38 __u32 in_len
; /* Input data size */
40 __u32 out_len
; /* Output buffer size (enc/dec/sign) */
41 __u32 in2_len
; /* 2nd input data size (verify) */
43 enum kernel_pkey_operation op
: 8;
46 #endif /* __LINUX_KEYCTL_H */