1KCAPI_AKCIPHER_SIGN(3)       Programming Interface      KCAPI_AKCIPHER_SIGN(3)
2
3
4

NAME

6       kcapi_akcipher_sign - signature generation
7

SYNOPSIS

9       ssize_t kcapi_akcipher_sign(struct kcapi_handle * handle,
10                                   const uint8_t * in, size_t inlen,
11                                   uint8_t * out, size_t outlen, int access);
12

ARGUMENTS

14       handle
15           [in] cipher handle
16
17       in
18           [in] message data buffer
19
20       inlen
21           [in] length of in buffer
22
23       out
24           [out] signature data buffer
25
26       outlen
27           [in] length of out buffer
28
29       access
30           [in] kernel access type (KCAPI_ACCESS_HEURISTIC - use internal
31           heuristic for fastest kernel access; KCAPI_ACCESS_VMSPLICE - use
32           vmsplice access; KCAPI_ACCESS_SENDMSG - sendmsg access)
33

DESCRIPTION

35       It is perfectly legal to use the same buffer as the message and
36       signature pointers. That would mean that after the signature generation
37       operation, the message is overwritten with the signature.
38
39       The memory should be aligned at the page boundary using
40       posix_memalign(sysconf(_SC_PAGESIZE)), If it is not aligned at the page
41       boundary, the vmsplice call may not send all data to the kernel.
42
43       If the output size is insufficiently large, -EINVAL is returned. The
44       output buffer must be at least as large as the modululs of the uses
45       key.
46
47       return number of bytes returned by the signature gen operation upon
48       success; a negative errno-style error code if an error occurred
49

AUTHOR

51       Stephan Mueller <smueller@chronox.de>
52           Author.
53
55libkcapi Manual 1.4.0            January 2023           KCAPI_AKCIPHER_SIGN(3)
Impressum