• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef _UAPI_LINUX_CRYPTOUSER_H
8 #define _UAPI_LINUX_CRYPTOUSER_H
9 #include <linux/types.h>
10 enum {
11   CRYPTO_MSG_BASE = 0x10,
12   CRYPTO_MSG_NEWALG = 0x10,
13   CRYPTO_MSG_DELALG,
14   CRYPTO_MSG_UPDATEALG,
15   CRYPTO_MSG_GETALG,
16   CRYPTO_MSG_DELRNG,
17   CRYPTO_MSG_GETSTAT,
18   __CRYPTO_MSG_MAX
19 };
20 #define CRYPTO_MSG_MAX (__CRYPTO_MSG_MAX - 1)
21 #define CRYPTO_NR_MSGTYPES (CRYPTO_MSG_MAX + 1 - CRYPTO_MSG_BASE)
22 #define CRYPTO_MAX_NAME 64
23 enum crypto_attr_type_t {
24   CRYPTOCFGA_UNSPEC,
25   CRYPTOCFGA_PRIORITY_VAL,
26   CRYPTOCFGA_REPORT_LARVAL,
27   CRYPTOCFGA_REPORT_HASH,
28   CRYPTOCFGA_REPORT_BLKCIPHER,
29   CRYPTOCFGA_REPORT_AEAD,
30   CRYPTOCFGA_REPORT_COMPRESS,
31   CRYPTOCFGA_REPORT_RNG,
32   CRYPTOCFGA_REPORT_CIPHER,
33   CRYPTOCFGA_REPORT_AKCIPHER,
34   CRYPTOCFGA_REPORT_KPP,
35   CRYPTOCFGA_REPORT_ACOMP,
36   CRYPTOCFGA_STAT_LARVAL,
37   CRYPTOCFGA_STAT_HASH,
38   CRYPTOCFGA_STAT_BLKCIPHER,
39   CRYPTOCFGA_STAT_AEAD,
40   CRYPTOCFGA_STAT_COMPRESS,
41   CRYPTOCFGA_STAT_RNG,
42   CRYPTOCFGA_STAT_CIPHER,
43   CRYPTOCFGA_STAT_AKCIPHER,
44   CRYPTOCFGA_STAT_KPP,
45   CRYPTOCFGA_STAT_ACOMP,
46   __CRYPTOCFGA_MAX
47 #define CRYPTOCFGA_MAX (__CRYPTOCFGA_MAX - 1)
48 };
49 struct crypto_user_alg {
50   char cru_name[CRYPTO_MAX_NAME];
51   char cru_driver_name[CRYPTO_MAX_NAME];
52   char cru_module_name[CRYPTO_MAX_NAME];
53   __u32 cru_type;
54   __u32 cru_mask;
55   __u32 cru_refcnt;
56   __u32 cru_flags;
57 };
58 struct crypto_stat_aead {
59   char type[CRYPTO_MAX_NAME];
60   __u64 stat_encrypt_cnt;
61   __u64 stat_encrypt_tlen;
62   __u64 stat_decrypt_cnt;
63   __u64 stat_decrypt_tlen;
64   __u64 stat_err_cnt;
65 };
66 struct crypto_stat_akcipher {
67   char type[CRYPTO_MAX_NAME];
68   __u64 stat_encrypt_cnt;
69   __u64 stat_encrypt_tlen;
70   __u64 stat_decrypt_cnt;
71   __u64 stat_decrypt_tlen;
72   __u64 stat_verify_cnt;
73   __u64 stat_sign_cnt;
74   __u64 stat_err_cnt;
75 };
76 struct crypto_stat_cipher {
77   char type[CRYPTO_MAX_NAME];
78   __u64 stat_encrypt_cnt;
79   __u64 stat_encrypt_tlen;
80   __u64 stat_decrypt_cnt;
81   __u64 stat_decrypt_tlen;
82   __u64 stat_err_cnt;
83 };
84 struct crypto_stat_compress {
85   char type[CRYPTO_MAX_NAME];
86   __u64 stat_compress_cnt;
87   __u64 stat_compress_tlen;
88   __u64 stat_decompress_cnt;
89   __u64 stat_decompress_tlen;
90   __u64 stat_err_cnt;
91 };
92 struct crypto_stat_hash {
93   char type[CRYPTO_MAX_NAME];
94   __u64 stat_hash_cnt;
95   __u64 stat_hash_tlen;
96   __u64 stat_err_cnt;
97 };
98 struct crypto_stat_kpp {
99   char type[CRYPTO_MAX_NAME];
100   __u64 stat_setsecret_cnt;
101   __u64 stat_generate_public_key_cnt;
102   __u64 stat_compute_shared_secret_cnt;
103   __u64 stat_err_cnt;
104 };
105 struct crypto_stat_rng {
106   char type[CRYPTO_MAX_NAME];
107   __u64 stat_generate_cnt;
108   __u64 stat_generate_tlen;
109   __u64 stat_seed_cnt;
110   __u64 stat_err_cnt;
111 };
112 struct crypto_stat_larval {
113   char type[CRYPTO_MAX_NAME];
114 };
115 struct crypto_report_larval {
116   char type[CRYPTO_MAX_NAME];
117 };
118 struct crypto_report_hash {
119   char type[CRYPTO_MAX_NAME];
120   unsigned int blocksize;
121   unsigned int digestsize;
122 };
123 struct crypto_report_cipher {
124   char type[CRYPTO_MAX_NAME];
125   unsigned int blocksize;
126   unsigned int min_keysize;
127   unsigned int max_keysize;
128 };
129 struct crypto_report_blkcipher {
130   char type[CRYPTO_MAX_NAME];
131   char geniv[CRYPTO_MAX_NAME];
132   unsigned int blocksize;
133   unsigned int min_keysize;
134   unsigned int max_keysize;
135   unsigned int ivsize;
136 };
137 struct crypto_report_aead {
138   char type[CRYPTO_MAX_NAME];
139   char geniv[CRYPTO_MAX_NAME];
140   unsigned int blocksize;
141   unsigned int maxauthsize;
142   unsigned int ivsize;
143 };
144 struct crypto_report_comp {
145   char type[CRYPTO_MAX_NAME];
146 };
147 struct crypto_report_rng {
148   char type[CRYPTO_MAX_NAME];
149   unsigned int seedsize;
150 };
151 struct crypto_report_akcipher {
152   char type[CRYPTO_MAX_NAME];
153 };
154 struct crypto_report_kpp {
155   char type[CRYPTO_MAX_NAME];
156 };
157 struct crypto_report_acomp {
158   char type[CRYPTO_MAX_NAME];
159 };
160 #define CRYPTO_REPORT_MAXSIZE (sizeof(struct crypto_user_alg) + sizeof(struct crypto_report_blkcipher))
161 #endif
162