blob: 816fb05ddd35c45c37b1a938228200565bb3dd6e [file] [log] [blame]
Christopher Ferris05d08e92016-02-04 13:16:38 -08001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
Christopher Ferris525ce912017-07-26 13:12:53 -070019#include <linux/types.h>
Christopher Ferris05d08e92016-02-04 13:16:38 -080020enum {
21 CRYPTO_MSG_BASE = 0x10,
22 CRYPTO_MSG_NEWALG = 0x10,
23 CRYPTO_MSG_DELALG,
Christopher Ferris05d08e92016-02-04 13:16:38 -080024 CRYPTO_MSG_UPDATEALG,
25 CRYPTO_MSG_GETALG,
26 CRYPTO_MSG_DELRNG,
Christopher Ferris86a48372019-01-10 14:14:59 -080027 CRYPTO_MSG_GETSTAT,
Christopher Ferris05d08e92016-02-04 13:16:38 -080028 __CRYPTO_MSG_MAX
Christopher Ferris05d08e92016-02-04 13:16:38 -080029};
30#define CRYPTO_MSG_MAX (__CRYPTO_MSG_MAX - 1)
31#define CRYPTO_NR_MSGTYPES (CRYPTO_MSG_MAX + 1 - CRYPTO_MSG_BASE)
Christopher Ferris525ce912017-07-26 13:12:53 -070032#define CRYPTO_MAX_NAME 64
Christopher Ferris05d08e92016-02-04 13:16:38 -080033enum crypto_attr_type_t {
34 CRYPTOCFGA_UNSPEC,
35 CRYPTOCFGA_PRIORITY_VAL,
36 CRYPTOCFGA_REPORT_LARVAL,
Christopher Ferris05d08e92016-02-04 13:16:38 -080037 CRYPTOCFGA_REPORT_HASH,
38 CRYPTOCFGA_REPORT_BLKCIPHER,
39 CRYPTOCFGA_REPORT_AEAD,
40 CRYPTOCFGA_REPORT_COMPRESS,
Christopher Ferris05d08e92016-02-04 13:16:38 -080041 CRYPTOCFGA_REPORT_RNG,
42 CRYPTOCFGA_REPORT_CIPHER,
43 CRYPTOCFGA_REPORT_AKCIPHER,
Christopher Ferris49f525c2016-12-12 14:55:36 -080044 CRYPTOCFGA_REPORT_KPP,
Christopher Ferris48af7cb2017-02-21 12:35:09 -080045 CRYPTOCFGA_REPORT_ACOMP,
Christopher Ferris86a48372019-01-10 14:14:59 -080046 CRYPTOCFGA_STAT_LARVAL,
47 CRYPTOCFGA_STAT_HASH,
48 CRYPTOCFGA_STAT_BLKCIPHER,
49 CRYPTOCFGA_STAT_AEAD,
50 CRYPTOCFGA_STAT_COMPRESS,
51 CRYPTOCFGA_STAT_RNG,
52 CRYPTOCFGA_STAT_CIPHER,
53 CRYPTOCFGA_STAT_AKCIPHER,
54 CRYPTOCFGA_STAT_KPP,
55 CRYPTOCFGA_STAT_ACOMP,
Christopher Ferris49f525c2016-12-12 14:55:36 -080056 __CRYPTOCFGA_MAX
Christopher Ferris05d08e92016-02-04 13:16:38 -080057#define CRYPTOCFGA_MAX (__CRYPTOCFGA_MAX - 1)
58};
Christopher Ferris48af7cb2017-02-21 12:35:09 -080059struct crypto_user_alg {
Christopher Ferris525ce912017-07-26 13:12:53 -070060 char cru_name[CRYPTO_MAX_NAME];
61 char cru_driver_name[CRYPTO_MAX_NAME];
62 char cru_module_name[CRYPTO_MAX_NAME];
Christopher Ferris48af7cb2017-02-21 12:35:09 -080063 __u32 cru_type;
Christopher Ferris49f525c2016-12-12 14:55:36 -080064 __u32 cru_mask;
Christopher Ferris05d08e92016-02-04 13:16:38 -080065 __u32 cru_refcnt;
66 __u32 cru_flags;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080067};
Christopher Ferris86a48372019-01-10 14:14:59 -080068struct crypto_stat {
69 char type[CRYPTO_MAX_NAME];
70 union {
71 __u32 stat_encrypt_cnt;
72 __u32 stat_compress_cnt;
73 __u32 stat_generate_cnt;
74 __u32 stat_hash_cnt;
75 __u32 stat_setsecret_cnt;
76 };
77 union {
78 __u64 stat_encrypt_tlen;
79 __u64 stat_compress_tlen;
80 __u64 stat_generate_tlen;
81 __u64 stat_hash_tlen;
82 };
83 union {
84 __u32 stat_akcipher_err_cnt;
85 __u32 stat_cipher_err_cnt;
86 __u32 stat_compress_err_cnt;
87 __u32 stat_aead_err_cnt;
88 __u32 stat_hash_err_cnt;
89 __u32 stat_rng_err_cnt;
90 __u32 stat_kpp_err_cnt;
91 };
92 union {
93 __u32 stat_decrypt_cnt;
94 __u32 stat_decompress_cnt;
95 __u32 stat_seed_cnt;
96 __u32 stat_generate_public_key_cnt;
97 };
98 union {
99 __u64 stat_decrypt_tlen;
100 __u64 stat_decompress_tlen;
101 };
102 union {
103 __u32 stat_verify_cnt;
104 __u32 stat_compute_shared_secret_cnt;
105 };
106 __u32 stat_sign_cnt;
107};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800108struct crypto_report_larval {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800109 char type[CRYPTO_MAX_NAME];
110};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800111struct crypto_report_hash {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800112 char type[CRYPTO_MAX_NAME];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800113 unsigned int blocksize;
114 unsigned int digestsize;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800115};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800116struct crypto_report_cipher {
Christopher Ferris525ce912017-07-26 13:12:53 -0700117 char type[CRYPTO_MAX_NAME];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800118 unsigned int blocksize;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800119 unsigned int min_keysize;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800120 unsigned int max_keysize;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800121};
122struct crypto_report_blkcipher {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800123 char type[CRYPTO_MAX_NAME];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800124 char geniv[CRYPTO_MAX_NAME];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800125 unsigned int blocksize;
126 unsigned int min_keysize;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800127 unsigned int max_keysize;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800128 unsigned int ivsize;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800129};
130struct crypto_report_aead {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800131 char type[CRYPTO_MAX_NAME];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800132 char geniv[CRYPTO_MAX_NAME];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800133 unsigned int blocksize;
134 unsigned int maxauthsize;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800135 unsigned int ivsize;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800136};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800137struct crypto_report_comp {
138 char type[CRYPTO_MAX_NAME];
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800139};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800140struct crypto_report_rng {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800141 char type[CRYPTO_MAX_NAME];
142 unsigned int seedsize;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800143};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800144struct crypto_report_akcipher {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800145 char type[CRYPTO_MAX_NAME];
146};
147struct crypto_report_kpp {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800148 char type[CRYPTO_MAX_NAME];
149};
150struct crypto_report_acomp {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800151 char type[CRYPTO_MAX_NAME];
152};
153#define CRYPTO_REPORT_MAXSIZE (sizeof(struct crypto_user_alg) + sizeof(struct crypto_report_blkcipher))