cryptouser.h revision 525ce914edf136d2bd02ac8c404d56c52e737f4d
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>
20enum {
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_MAX
28};
29#define CRYPTO_MSG_MAX (__CRYPTO_MSG_MAX - 1)
30#define CRYPTO_NR_MSGTYPES (CRYPTO_MSG_MAX + 1 - CRYPTO_MSG_BASE)
31#define CRYPTO_MAX_NAME 64
32enum crypto_attr_type_t {
33  CRYPTOCFGA_UNSPEC,
34  CRYPTOCFGA_PRIORITY_VAL,
35  CRYPTOCFGA_REPORT_LARVAL,
36  CRYPTOCFGA_REPORT_HASH,
37  CRYPTOCFGA_REPORT_BLKCIPHER,
38  CRYPTOCFGA_REPORT_AEAD,
39  CRYPTOCFGA_REPORT_COMPRESS,
40  CRYPTOCFGA_REPORT_RNG,
41  CRYPTOCFGA_REPORT_CIPHER,
42  CRYPTOCFGA_REPORT_AKCIPHER,
43  CRYPTOCFGA_REPORT_KPP,
44  CRYPTOCFGA_REPORT_ACOMP,
45  __CRYPTOCFGA_MAX
46#define CRYPTOCFGA_MAX (__CRYPTOCFGA_MAX - 1)
47};
48struct crypto_user_alg {
49  char cru_name[CRYPTO_MAX_NAME];
50  char cru_driver_name[CRYPTO_MAX_NAME];
51  char cru_module_name[CRYPTO_MAX_NAME];
52  __u32 cru_type;
53  __u32 cru_mask;
54  __u32 cru_refcnt;
55  __u32 cru_flags;
56};
57struct crypto_report_larval {
58  char type[CRYPTO_MAX_NAME];
59};
60struct crypto_report_hash {
61  char type[CRYPTO_MAX_NAME];
62  unsigned int blocksize;
63  unsigned int digestsize;
64};
65struct crypto_report_cipher {
66  char type[CRYPTO_MAX_NAME];
67  unsigned int blocksize;
68  unsigned int min_keysize;
69  unsigned int max_keysize;
70};
71struct crypto_report_blkcipher {
72  char type[CRYPTO_MAX_NAME];
73  char geniv[CRYPTO_MAX_NAME];
74  unsigned int blocksize;
75  unsigned int min_keysize;
76  unsigned int max_keysize;
77  unsigned int ivsize;
78};
79struct crypto_report_aead {
80  char type[CRYPTO_MAX_NAME];
81  char geniv[CRYPTO_MAX_NAME];
82  unsigned int blocksize;
83  unsigned int maxauthsize;
84  unsigned int ivsize;
85};
86struct crypto_report_comp {
87  char type[CRYPTO_MAX_NAME];
88};
89struct crypto_report_rng {
90  char type[CRYPTO_MAX_NAME];
91  unsigned int seedsize;
92};
93struct crypto_report_akcipher {
94  char type[CRYPTO_MAX_NAME];
95};
96struct crypto_report_kpp {
97  char type[CRYPTO_MAX_NAME];
98};
99struct crypto_report_acomp {
100  char type[CRYPTO_MAX_NAME];
101};
102#define CRYPTO_REPORT_MAXSIZE (sizeof(struct crypto_user_alg) + sizeof(struct crypto_report_blkcipher))
103