Defined in 1 files as a prototype:

Defined in 1 files as a function:

Referenced in 4 files:

Smatch caller information:

drivers/net/wireguard/noise.c message_encrypt() -> chacha20poly1305_encrypt()

Type Parameter Key Value
PARAM_VALUE 2 src_len 0,12,32
PARAM_VALUE 4 ad_len 32
PARAM_VALUE 5 nonce 0
BUF_SIZE 0 dst 16,28,48
BUF_SIZE 0 dst 16,28,48
BUF_SIZE 1 src (-1),12,32
BUF_SIZE 1 src (-1),12,32
BUF_SIZE 3 ad 32
BUF_SIZE 6 key 32
BUF_SIZE 6 key 32
DATA_SOURCE 0 dst $0
DATA_SOURCE 1 src $1
DATA_SOURCE 2 src_len $2
DATA_SOURCE 3 ad $4
DATA_SOURCE 6 key $3
HARD_MAX 2 src_len 32
NOCHECK_CALL
LOCK2 &handshake->lock
LOCK2 &handshake->static_identity->lock
TYPE_LOCK (struct noise_handshake)->lock
TYPE_LOCK (struct noise_static_identity)->lock

security/keys/big_key.c big_key_preparse() -> chacha20poly1305_encrypt()

Type Parameter Key Value
PARAM_VALUE 0 dst 1-18446744073709551614
PARAM_VALUE 1 src 1-u64max
PARAM_VALUE 2 src_len 1489-1048576
PARAM_VALUE 3 ad 0
PARAM_VALUE 4 ad_len 0
PARAM_VALUE 5 nonce 0
PARAM_VALUE 6 key 4096-ptr_max
BUF_SIZE 0 dst 0-u64max
BUF_SIZE 1 src 1-s32max
BUF_SIZE 6 key 32
BUF_SIZE 6 key 32
DATA_SOURCE 0 dst r __kvmalloc_node_noprof
DATA_SOURCE 6 key r _kmalloc_noprof
RX_PATH
TASK_NOT_RUNNING
NOCHECK_CALL
USER_DATA 1 *src 0-255
USER_DATA 2 src_len 1489-1048575[c]
UNITS 1 src unit_byte
UNITS 2 src_len unit_byte
USER_PTR 1 src
HALF_LOCKED2 global &key_types_sem

lib/crypto/tests/chacha20poly1305_kunit.c chacha20poly1305_test_encrypt() -> chacha20poly1305_encrypt()

Type Parameter Key Value
PARAM_VALUE 0 dst 16,4096-ptr_max
BUF_SIZE 0 dst 4096
BUF_SIZE 0 dst 4096
BUF_SIZE 6 key 32
DATA_SOURCE 0 dst $1
DATA_SOURCE 1 src $2
DATA_SOURCE 2 src_len $3
DATA_SOURCE 3 ad $4
DATA_SOURCE 4 ad_len $5
DATA_SOURCE 6 key $8
MEM_ZERO 0 dst
NOCHECK_CALL

lib/crypto/tests/chacha20poly1305_kunit.c test_chacha20poly1305() -> chacha20poly1305_encrypt()

Type Parameter Key Value
PARAM_VALUE 0 dst 16,4096-ptr_max
PARAM_VALUE 1 src 16,4096-ptr_max
PARAM_VALUE 2 src_len 0-1008
PARAM_VALUE 3 ad 0
PARAM_VALUE 4 ad_len 0
PARAM_VALUE 5 nonce 0
BUF_SIZE 0 dst 4096
BUF_SIZE 0 dst 4096
BUF_SIZE 1 src 4096
BUF_SIZE 1 src 4096
BUF_SIZE 6 key 32
CAPPED_DATA 0 dst 1
CAPPED_DATA 1 src 1
CAPPED_DATA 2 src_len 1
DATA_SOURCE 0 dst r alloc_buf
DATA_SOURCE 1 src r alloc_buf
MEM_ZERO 0 dst
MEM_ZERO 1 src
NOCHECK_CALL