Blame view

include/linux/cryptouser.h 2.77 KB
a38f7907b   Steffen Klassert   crypto: Add users...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
  /*
   * Crypto user configuration API.
   *
   * Copyright (C) 2011 secunet Security Networks AG
   * Copyright (C) 2011 Steffen Klassert <steffen.klassert@secunet.com>
   *
   * This program is free software; you can redistribute it and/or modify it
   * under the terms and conditions of the GNU General Public License,
   * version 2, as published by the Free Software Foundation.
   *
   * This program is distributed in the hope it will be useful, but WITHOUT
   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
   * more details.
   *
   * You should have received a copy of the GNU General Public License along with
   * this program; if not, write to the Free Software Foundation, Inc.,
   * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
   */
  
  /* Netlink configuration messages.  */
  enum {
  	CRYPTO_MSG_BASE = 0x10,
  	CRYPTO_MSG_NEWALG = 0x10,
  	CRYPTO_MSG_DELALG,
  	CRYPTO_MSG_UPDATEALG,
  	CRYPTO_MSG_GETALG,
  	__CRYPTO_MSG_MAX
  };
  #define CRYPTO_MSG_MAX (__CRYPTO_MSG_MAX - 1)
  #define CRYPTO_NR_MSGTYPES (CRYPTO_MSG_MAX + 1 - CRYPTO_MSG_BASE)
  
  #define CRYPTO_MAX_NAME CRYPTO_MAX_ALG_NAME
  
  /* Netlink message attributes.  */
  enum crypto_attr_type_t {
  	CRYPTOCFGA_UNSPEC,
  	CRYPTOCFGA_PRIORITY_VAL,	/* __u32 */
6c5a86f52   Steffen Klassert   crypto: Add users...
39
  	CRYPTOCFGA_REPORT_LARVAL,	/* struct crypto_report_larval */
f4d663ce6   Steffen Klassert   crypto: Add users...
40
  	CRYPTOCFGA_REPORT_HASH,		/* struct crypto_report_hash */
50496a1fa   Steffen Klassert   crypto: Add users...
41
  	CRYPTOCFGA_REPORT_BLKCIPHER,	/* struct crypto_report_blkcipher */
6ad414fe7   Steffen Klassert   crypto: Add users...
42
  	CRYPTOCFGA_REPORT_AEAD,		/* struct crypto_report_aead */
a55465dca   Steffen Klassert   crypto: Add users...
43
  	CRYPTOCFGA_REPORT_COMPRESS,	/* struct crypto_report_comp */
792608e9c   Steffen Klassert   crypto: Add users...
44
  	CRYPTOCFGA_REPORT_RNG,		/* struct crypto_report_rng */
07a5fa4ab   Steffen Klassert   crypto: Add users...
45
  	CRYPTOCFGA_REPORT_CIPHER,	/* struct crypto_report_cipher */
a38f7907b   Steffen Klassert   crypto: Add users...
46
47
48
49
50
51
52
53
54
55
56
57
58
59
  	__CRYPTOCFGA_MAX
  
  #define CRYPTOCFGA_MAX (__CRYPTOCFGA_MAX - 1)
  };
  
  struct crypto_user_alg {
  	char cru_name[CRYPTO_MAX_ALG_NAME];
  	char cru_driver_name[CRYPTO_MAX_ALG_NAME];
  	char cru_module_name[CRYPTO_MAX_ALG_NAME];
  	__u32 cru_type;
  	__u32 cru_mask;
  	__u32 cru_refcnt;
  	__u32 cru_flags;
  };
6c5a86f52   Steffen Klassert   crypto: Add users...
60
61
62
63
  
  struct crypto_report_larval {
  	char type[CRYPTO_MAX_NAME];
  };
f4d663ce6   Steffen Klassert   crypto: Add users...
64
65
66
67
68
69
  
  struct crypto_report_hash {
  	char type[CRYPTO_MAX_NAME];
  	unsigned int blocksize;
  	unsigned int digestsize;
  };
50496a1fa   Steffen Klassert   crypto: Add users...
70

07a5fa4ab   Steffen Klassert   crypto: Add users...
71
72
73
74
75
76
  struct crypto_report_cipher {
  	char type[CRYPTO_MAX_ALG_NAME];
  	unsigned int blocksize;
  	unsigned int min_keysize;
  	unsigned int max_keysize;
  };
50496a1fa   Steffen Klassert   crypto: Add users...
77
78
79
80
81
82
83
84
  struct crypto_report_blkcipher {
  	char type[CRYPTO_MAX_NAME];
  	char geniv[CRYPTO_MAX_NAME];
  	unsigned int blocksize;
  	unsigned int min_keysize;
  	unsigned int max_keysize;
  	unsigned int ivsize;
  };
6ad414fe7   Steffen Klassert   crypto: Add users...
85
86
87
88
89
90
91
92
  
  struct crypto_report_aead {
  	char type[CRYPTO_MAX_NAME];
  	char geniv[CRYPTO_MAX_NAME];
  	unsigned int blocksize;
  	unsigned int maxauthsize;
  	unsigned int ivsize;
  };
a55465dca   Steffen Klassert   crypto: Add users...
93
94
95
96
  
  struct crypto_report_comp {
  	char type[CRYPTO_MAX_NAME];
  };
792608e9c   Steffen Klassert   crypto: Add users...
97
98
99
100
101
  
  struct crypto_report_rng {
  	char type[CRYPTO_MAX_NAME];
  	unsigned int seedsize;
  };