use rwlock instead of a mutex in trap_manager, avoids possible deadlock
[strongswan.git] / src / pluto / alg / ike_alg_dh_groups.c
1 /* IKE Diffie-Hellman group description
2 * Copyright (C) 2009 Andreas Steffen
3 *
4 * Hochschule fuer Technik Rapperswil
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 */
16
17 #include <crypto/diffie_hellman.h>
18
19 #include "ike_alg.h"
20
21 struct dh_desc unset_group = {
22 algo_type: IKE_ALG_DH_GROUP,
23 algo_id: MODP_NONE,
24 algo_next: NULL,
25
26 ke_size: 0
27 };
28
29 struct dh_desc dh_desc_modp_1024 = {
30 algo_type: IKE_ALG_DH_GROUP,
31 algo_id: MODP_1024_BIT,
32 algo_next: NULL,
33
34 ke_size: 1024 / BITS_PER_BYTE
35 };
36
37 struct dh_desc dh_desc_modp_1536 = {
38 algo_type: IKE_ALG_DH_GROUP,
39 algo_id: MODP_1536_BIT,
40 algo_next: NULL,
41
42 ke_size: 1536 / BITS_PER_BYTE
43 };
44
45 struct dh_desc dh_desc_modp_2048 = {
46 algo_type: IKE_ALG_DH_GROUP,
47 algo_id: MODP_2048_BIT,
48 algo_next: NULL,
49
50 ke_size: 2048 / BITS_PER_BYTE
51 };
52
53 struct dh_desc dh_desc_modp_3072 = {
54 algo_type: IKE_ALG_DH_GROUP,
55 algo_id: MODP_3072_BIT,
56 algo_next: NULL,
57
58 ke_size: 3072 / BITS_PER_BYTE
59 };
60
61 struct dh_desc dh_desc_modp_4096 = {
62 algo_type: IKE_ALG_DH_GROUP,
63 algo_id: MODP_4096_BIT,
64 algo_next: NULL,
65
66 ke_size: 4096 / BITS_PER_BYTE
67 };
68
69 struct dh_desc dh_desc_modp_6144 = {
70 algo_type: IKE_ALG_DH_GROUP,
71 algo_id: MODP_6144_BIT,
72 algo_next: NULL,
73
74 ke_size: 6144 / BITS_PER_BYTE
75 };
76
77 struct dh_desc dh_desc_modp_8192 = {
78 algo_type: IKE_ALG_DH_GROUP,
79 algo_id: MODP_8192_BIT,
80 algo_next: NULL,
81
82 ke_size: 8192 / BITS_PER_BYTE
83 };
84
85 struct dh_desc dh_desc_ecp_256 = {
86 algo_type: IKE_ALG_DH_GROUP,
87 algo_id: ECP_256_BIT,
88 algo_next: NULL,
89
90 ke_size: 2*256 / BITS_PER_BYTE
91 };
92
93 struct dh_desc dh_desc_ecp_384 = {
94 algo_type: IKE_ALG_DH_GROUP,
95 algo_id: ECP_384_BIT,
96 algo_next: NULL,
97
98 ke_size: 2*384 / BITS_PER_BYTE
99 };
100
101 struct dh_desc dh_desc_ecp_521 = {
102 algo_type: IKE_ALG_DH_GROUP,
103 algo_id: ECP_521_BIT,
104 algo_next: NULL,
105
106 ke_size: 2*528 / BITS_PER_BYTE
107 };
108
109 struct dh_desc dh_desc_ecp_192 = {
110 algo_type: IKE_ALG_DH_GROUP,
111 algo_id: ECP_192_BIT,
112 algo_next: NULL,
113
114 ke_size: 2*192 / BITS_PER_BYTE
115 };
116
117 struct dh_desc dh_desc_ecp_224 = {
118 algo_type: IKE_ALG_DH_GROUP,
119 algo_id: ECP_224_BIT,
120 algo_next: NULL,
121
122 ke_size: 2*224 / BITS_PER_BYTE
123 };
124