1/* $Id: algorithm.h,v 1.8 2004/11/18 15:14:44 ludvigm Exp $ */
2
3/*
4 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 *    notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 *    notice, this list of conditions and the following disclaimer in the
14 *    documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the project nor the names of its contributors
16 *    may be used to endorse or promote products derived from this software
17 *    without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 */
31
32#ifndef _ALGORITHM_TYPES_H
33#define _ALGORITHM_TYPES_H
34
35
36/* algorithm class */
37enum {
38	algclass_ipsec_enc,
39	algclass_ipsec_auth,
40	algclass_ipsec_comp,
41	algclass_isakmp_enc,
42	algclass_isakmp_hash,
43	algclass_isakmp_dh,
44	algclass_isakmp_ameth,	/* authentication method. */
45    algclass_ikev2_prf,
46    algclass_ikev2_integ,
47#define MAXALGCLASS 9
48};
49
50#define ALG_DEFAULT_KEYLEN	64
51
52#define ALGTYPE_NOTHING		0
53
54/* algorithm type */
55enum algtype {
56	algtype_nothing = 0,
57
58	/* enc */
59	algtype_des_iv64,
60	algtype_des,
61	algtype_3des,
62	algtype_rc5,
63	algtype_idea,
64	algtype_cast128,
65	algtype_blowfish,
66	algtype_3idea,
67	algtype_des_iv32,
68	algtype_rc4,
69	algtype_null_enc,
70	algtype_aes,
71	algtype_twofish,
72
73	/* ipsec auth */
74	algtype_hmac_md5_128,
75	algtype_hmac_sha1_160,
76	algtype_des_mac,
77	algtype_kpdk,
78	algtype_non_auth,
79	algtype_hmac_sha2_256,
80	algtype_hmac_sha2_384,
81	algtype_hmac_sha2_512,
82    algtype_hmac_md5_96,
83    algtype_hmac_sha1_96,
84
85	/* ipcomp */
86	algtype_oui,
87	algtype_deflate,
88	algtype_lzs,
89
90	/* hash */
91	algtype_md5,
92	algtype_sha1,
93	algtype_tiger,
94	algtype_sha2_256,
95	algtype_sha2_384,
96	algtype_sha2_512,
97
98	/* dh_group */
99	algtype_modp768,
100	algtype_modp1024,
101	algtype_ec2n155,
102	algtype_ec2n185,
103	algtype_modp1536,
104	algtype_modp2048,
105	algtype_modp3072,
106	algtype_modp4096,
107	algtype_modp6144,
108	algtype_modp8192,
109
110	/* authentication method. */
111	algtype_psk,
112	algtype_dsssig,
113	algtype_rsasig,
114	algtype_rsaenc,
115	algtype_rsarev,
116	algtype_gssapikrb,
117#ifdef ENABLE_HYBRID
118	algtype_hybrid_rsa_s,
119	algtype_hybrid_dss_s,
120	algtype_hybrid_rsa_c,
121	algtype_hybrid_dss_c,
122	algtype_xauth_psk_s,
123	algtype_xauth_psk_c,
124	algtype_xauth_rsa_s,
125	algtype_xauth_rsa_c,
126    algtype_eap_psk_c,
127    algtype_eap_rsa_c,
128#endif
129};
130
131#endif