xref: /linux/tools/testing/selftests/arm64/pauth/helper.h (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (C) 2020 ARM Limited */
3 
4 #ifndef _HELPER_H_
5 #define _HELPER_H_
6 
7 #include <stdlib.h>
8 
9 #define NKEYS 5
10 
11 struct signatures {
12 	size_t keyia;
13 	size_t keyib;
14 	size_t keyda;
15 	size_t keydb;
16 	size_t keyg;
17 };
18 
19 void pac_corruptor(void);
20 
21 /* PAuth sign a value with key ia and modifier value 0 */
22 size_t keyia_sign(size_t val);
23 size_t keyib_sign(size_t val);
24 size_t keyda_sign(size_t val);
25 size_t keydb_sign(size_t val);
26 size_t keyg_sign(size_t val);
27 
28 #endif
29