blob: 15c46d86c9f88e2584f78030f88275a72457861f [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,
27 __CRYPTO_MSG_MAX
Christopher Ferris05d08e92016-02-04 13:16:38 -080028};
29#define CRYPTO_MSG_MAX (__CRYPTO_MSG_MAX - 1)
30#define CRYPTO_NR_MSGTYPES (CRYPTO_MSG_MAX + 1 - CRYPTO_MSG_BASE)
Christopher Ferris525ce912017-07-26 13:12:53 -070031#define CRYPTO_MAX_NAME 64
Christopher Ferris05d08e92016-02-04 13:16:38 -080032enum crypto_attr_type_t {
33 CRYPTOCFGA_UNSPEC,
34 CRYPTOCFGA_PRIORITY_VAL,
35 CRYPTOCFGA_REPORT_LARVAL,
Christopher Ferris05d08e92016-02-04 13:16:38 -080036 CRYPTOCFGA_REPORT_HASH,
37 CRYPTOCFGA_REPORT_BLKCIPHER,
38 CRYPTOCFGA_REPORT_AEAD,
39 CRYPTOCFGA_REPORT_COMPRESS,
Christopher Ferris05d08e92016-02-04 13:16:38 -080040 CRYPTOCFGA_REPORT_RNG,
41 CRYPTOCFGA_REPORT_CIPHER,
42 CRYPTOCFGA_REPORT_AKCIPHER,
Christopher Ferris49f525c2016-12-12 14:55:36 -080043 CRYPTOCFGA_REPORT_KPP,
Christopher Ferris48af7cb2017-02-21 12:35:09 -080044 CRYPTOCFGA_REPORT_ACOMP,
Christopher Ferris49f525c2016-12-12 14:55:36 -080045 __CRYPTOCFGA_MAX
Christopher Ferris05d08e92016-02-04 13:16:38 -080046#define CRYPTOCFGA_MAX (__CRYPTOCFGA_MAX - 1)
47};
Christopher Ferris48af7cb2017-02-21 12:35:09 -080048struct crypto_user_alg {
Christopher Ferris525ce912017-07-26 13:12:53 -070049 char cru_name[CRYPTO_MAX_NAME];
50 char cru_driver_name[CRYPTO_MAX_NAME];
51 char cru_module_name[CRYPTO_MAX_NAME];
Christopher Ferris48af7cb2017-02-21 12:35:09 -080052 __u32 cru_type;
Christopher Ferris49f525c2016-12-12 14:55:36 -080053 __u32 cru_mask;
Christopher Ferris05d08e92016-02-04 13:16:38 -080054 __u32 cru_refcnt;
55 __u32 cru_flags;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080056};
Christopher Ferris49f525c2016-12-12 14:55:36 -080057struct crypto_report_larval {
Christopher Ferris05d08e92016-02-04 13:16:38 -080058 char type[CRYPTO_MAX_NAME];
59};
Christopher Ferris48af7cb2017-02-21 12:35:09 -080060struct crypto_report_hash {
Christopher Ferris49f525c2016-12-12 14:55:36 -080061 char type[CRYPTO_MAX_NAME];
Christopher Ferris05d08e92016-02-04 13:16:38 -080062 unsigned int blocksize;
63 unsigned int digestsize;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080064};
Christopher Ferris49f525c2016-12-12 14:55:36 -080065struct crypto_report_cipher {
Christopher Ferris525ce912017-07-26 13:12:53 -070066 char type[CRYPTO_MAX_NAME];
Christopher Ferris05d08e92016-02-04 13:16:38 -080067 unsigned int blocksize;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080068 unsigned int min_keysize;
Christopher Ferris49f525c2016-12-12 14:55:36 -080069 unsigned int max_keysize;
Christopher Ferris05d08e92016-02-04 13:16:38 -080070};
71struct crypto_report_blkcipher {
Christopher Ferris48af7cb2017-02-21 12:35:09 -080072 char type[CRYPTO_MAX_NAME];
Christopher Ferris49f525c2016-12-12 14:55:36 -080073 char geniv[CRYPTO_MAX_NAME];
Christopher Ferris05d08e92016-02-04 13:16:38 -080074 unsigned int blocksize;
75 unsigned int min_keysize;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080076 unsigned int max_keysize;
Christopher Ferris49f525c2016-12-12 14:55:36 -080077 unsigned int ivsize;
Christopher Ferris05d08e92016-02-04 13:16:38 -080078};
79struct crypto_report_aead {
Christopher Ferris48af7cb2017-02-21 12:35:09 -080080 char type[CRYPTO_MAX_NAME];
Christopher Ferris49f525c2016-12-12 14:55:36 -080081 char geniv[CRYPTO_MAX_NAME];
Christopher Ferris05d08e92016-02-04 13:16:38 -080082 unsigned int blocksize;
83 unsigned int maxauthsize;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080084 unsigned int ivsize;
Christopher Ferris49f525c2016-12-12 14:55:36 -080085};
Christopher Ferris05d08e92016-02-04 13:16:38 -080086struct crypto_report_comp {
87 char type[CRYPTO_MAX_NAME];
Christopher Ferris48af7cb2017-02-21 12:35:09 -080088};
Christopher Ferris49f525c2016-12-12 14:55:36 -080089struct crypto_report_rng {
Christopher Ferris05d08e92016-02-04 13:16:38 -080090 char type[CRYPTO_MAX_NAME];
91 unsigned int seedsize;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080092};
Christopher Ferris05d08e92016-02-04 13:16:38 -080093struct crypto_report_akcipher {
Christopher Ferris49f525c2016-12-12 14:55:36 -080094 char type[CRYPTO_MAX_NAME];
95};
96struct crypto_report_kpp {
Christopher Ferris48af7cb2017-02-21 12:35:09 -080097 char type[CRYPTO_MAX_NAME];
98};
99struct crypto_report_acomp {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800100 char type[CRYPTO_MAX_NAME];
101};
102#define CRYPTO_REPORT_MAXSIZE (sizeof(struct crypto_user_alg) + sizeof(struct crypto_report_blkcipher))