1KCAPI_AKCIPHER_VERIF(3) Programming Interface KCAPI_AKCIPHER_VERIF(3)
2
3
4
6 kcapi_akcipher_verify - signature verification
7
9 ssize_t kcapi_akcipher_verify(struct kcapi_handle * handle,
10 const uint8_t * in, size_t inlen,
11 uint8_t * out, size_t outlen,
12 int access);
13
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
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 To catch signature verification errors, the return value of this call
49 should be checked. If this function returns -EBADMSG, the verification
50 of the signature failed.
51
52 return number of bytes returned by the signature ver operation upon
53 success; a negative errno-style error code if an error occurred
54
56 Stephan Mueller <smueller@chronox.de>
57 Author.
58
60libkcapi Manual 1.4.0 July 2023 KCAPI_AKCIPHER_VERIF(3)