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

NAME

6       kcapi_cipher_enc_aes_ctr - Convenience function for AES CTR encryption
7

SYNOPSIS

9       ssize_t kcapi_cipher_enc_aes_ctr(const uint8_t * key, uint32_t keylen,
10                                        const uint8_t * in, size_t inlen,
11                                        const uint8_t * ctr, uint8_t * out,
12                                        size_t outlen);
13

ARGUMENTS

15       key
16           [in] key buffer
17
18       keylen
19           [in] length of key buffer
20
21       in
22           [in] plaintext data buffer
23
24       inlen
25           [in] length of in buffer
26
27       ctr
28           [in] start counter value to be used for cipher operation
29
30       out
31           [out] ciphertext data buffer
32
33       outlen
34           [in] length of out buffer
35

DESCRIPTION

37       The convenience function performs an AES counter mode encryption
38       operation using the provided key, the given input buffer and the given
39       IV. The output is stored in the out buffer.
40
41       The input buffer can be of arbitrary length.
42
43       The output buffer must be at least as large as the input buffer.
44
45       The start counter can contain all zeros (not a NULL buffer!) and must
46       be exactly 16 bytes in size.
47
48       The AES type (AES-128, AES-192 or AES-256) is determined by the size of
49       the given key. If the key is 16 bytes long, AES-128 is used. A 24 byte
50       key implies AES-192 and a 32 byte key implies AES-256.
51
52       return number of bytes generated upon success; a negative errno-style
53       error code if an error occurred
54

AUTHOR

56       Stephan Mueller <smueller@chronox.de>
57           Author.
58
60libkcapi Manual 1.4.0              July 2023           KCAPI_CIPHER_ENC_AES(3)
Impressum