summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/crypto_sanity.c
AgeCommit message (Collapse)AuthorFilesLines
2024-06-13selftests: bpf: crypto: use NULL instead of 0-sized dynptrVadim Fedorenko1-12/+4
Adjust selftests to use nullable option for state and IV arg. Reviewed-by: Eduard Zingerman <eddyz87@gmail.com> Signed-off-by: Vadim Fedorenko <vadfed@meta.com> Link: https://lore.kernel.org/r/20240613211817.1551967-4-vadfed@meta.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2024-04-24selftests: bpf: crypto skcipher algo selftestsVadim Fedorenko1-0/+169
Add simple tc hook selftests to show the way to work with new crypto BPF API. Some tricky dynptr initialization is used to provide empty iv dynptr. Simple AES-ECB algo is used to demonstrate encryption and decryption of fixed size buffers. Signed-off-by: Vadim Fedorenko <vadfed@meta.com> Link: https://lore.kernel.org/r/20240422225024.2847039-4-vadfed@meta.com Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>