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

NAME

6       kcapi_akcipher_sign - signature generation
7

SYNOPSIS

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

ARGUMENTS

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

DESCRIPTION

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

AUTHOR

52       Stephan Mueller <smueller@chronox.de>
53           Author.
54
56libkcapi Manual 1.1.5            January 2020           KCAPI_AKCIPHER_SIGN(3)
Impressum