1 /**************************************************************************** 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 ****************************************************************************/ 19 #include <linux/types.h> 20 enum { 21 CRYPTO_MSG_BASE = 0x10, 22 CRYPTO_MSG_NEWALG = 0x10, 23 CRYPTO_MSG_DELALG, 24 CRYPTO_MSG_UPDATEALG, 25 CRYPTO_MSG_GETALG, 26 CRYPTO_MSG_DELRNG, 27 CRYPTO_MSG_GETSTAT, 28 __CRYPTO_MSG_MAX 29 }; 30 #define CRYPTO_MSG_MAX (__CRYPTO_MSG_MAX - 1) 31 #define CRYPTO_NR_MSGTYPES (CRYPTO_MSG_MAX + 1 - CRYPTO_MSG_BASE) 32 #define CRYPTO_MAX_NAME 64 33 enum crypto_attr_type_t { 34 CRYPTOCFGA_UNSPEC, 35 CRYPTOCFGA_PRIORITY_VAL, 36 CRYPTOCFGA_REPORT_LARVAL, 37 CRYPTOCFGA_REPORT_HASH, 38 CRYPTOCFGA_REPORT_BLKCIPHER, 39 CRYPTOCFGA_REPORT_AEAD, 40 CRYPTOCFGA_REPORT_COMPRESS, 41 CRYPTOCFGA_REPORT_RNG, 42 CRYPTOCFGA_REPORT_CIPHER, 43 CRYPTOCFGA_REPORT_AKCIPHER, 44 CRYPTOCFGA_REPORT_KPP, 45 CRYPTOCFGA_REPORT_ACOMP, 46 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, 56 __CRYPTOCFGA_MAX 57 #define CRYPTOCFGA_MAX (__CRYPTOCFGA_MAX - 1) 58 }; 59 struct crypto_user_alg { 60 char cru_name[CRYPTO_MAX_NAME]; 61 char cru_driver_name[CRYPTO_MAX_NAME]; 62 char cru_module_name[CRYPTO_MAX_NAME]; 63 __u32 cru_type; 64 __u32 cru_mask; 65 __u32 cru_refcnt; 66 __u32 cru_flags; 67 }; 68 struct crypto_stat_aead { 69 char type[CRYPTO_MAX_NAME]; 70 __u64 stat_encrypt_cnt; 71 __u64 stat_encrypt_tlen; 72 __u64 stat_decrypt_cnt; 73 __u64 stat_decrypt_tlen; 74 __u64 stat_err_cnt; 75 }; 76 struct crypto_stat_akcipher { 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_verify_cnt; 83 __u64 stat_sign_cnt; 84 __u64 stat_err_cnt; 85 }; 86 struct crypto_stat_cipher { 87 char type[CRYPTO_MAX_NAME]; 88 __u64 stat_encrypt_cnt; 89 __u64 stat_encrypt_tlen; 90 __u64 stat_decrypt_cnt; 91 __u64 stat_decrypt_tlen; 92 __u64 stat_err_cnt; 93 }; 94 struct crypto_stat_compress { 95 char type[CRYPTO_MAX_NAME]; 96 __u64 stat_compress_cnt; 97 __u64 stat_compress_tlen; 98 __u64 stat_decompress_cnt; 99 __u64 stat_decompress_tlen; 100 __u64 stat_err_cnt; 101 }; 102 struct crypto_stat_hash { 103 char type[CRYPTO_MAX_NAME]; 104 __u64 stat_hash_cnt; 105 __u64 stat_hash_tlen; 106 __u64 stat_err_cnt; 107 }; 108 struct crypto_stat_kpp { 109 char type[CRYPTO_MAX_NAME]; 110 __u64 stat_setsecret_cnt; 111 __u64 stat_generate_public_key_cnt; 112 __u64 stat_compute_shared_secret_cnt; 113 __u64 stat_err_cnt; 114 }; 115 struct crypto_stat_rng { 116 char type[CRYPTO_MAX_NAME]; 117 __u64 stat_generate_cnt; 118 __u64 stat_generate_tlen; 119 __u64 stat_seed_cnt; 120 __u64 stat_err_cnt; 121 }; 122 struct crypto_stat_larval { 123 char type[CRYPTO_MAX_NAME]; 124 }; 125 struct crypto_report_larval { 126 char type[CRYPTO_MAX_NAME]; 127 }; 128 struct crypto_report_hash { 129 char type[CRYPTO_MAX_NAME]; 130 unsigned int blocksize; 131 unsigned int digestsize; 132 }; 133 struct crypto_report_cipher { 134 char type[CRYPTO_MAX_NAME]; 135 unsigned int blocksize; 136 unsigned int min_keysize; 137 unsigned int max_keysize; 138 }; 139 struct crypto_report_blkcipher { 140 char type[CRYPTO_MAX_NAME]; 141 char geniv[CRYPTO_MAX_NAME]; 142 unsigned int blocksize; 143 unsigned int min_keysize; 144 unsigned int max_keysize; 145 unsigned int ivsize; 146 }; 147 struct crypto_report_aead { 148 char type[CRYPTO_MAX_NAME]; 149 char geniv[CRYPTO_MAX_NAME]; 150 unsigned int blocksize; 151 unsigned int maxauthsize; 152 unsigned int ivsize; 153 }; 154 struct crypto_report_comp { 155 char type[CRYPTO_MAX_NAME]; 156 }; 157 struct crypto_report_rng { 158 char type[CRYPTO_MAX_NAME]; 159 unsigned int seedsize; 160 }; 161 struct crypto_report_akcipher { 162 char type[CRYPTO_MAX_NAME]; 163 }; 164 struct crypto_report_kpp { 165 char type[CRYPTO_MAX_NAME]; 166 }; 167 struct crypto_report_acomp { 168 char type[CRYPTO_MAX_NAME]; 169 }; 170 #define CRYPTO_REPORT_MAXSIZE (sizeof(struct crypto_user_alg) + sizeof(struct crypto_report_blkcipher)) 171