5 Author: Pekka Riikonen <priikone@silcnet.org>
7 Copyright (C) 2000 - 2005 Pekka Riikonen
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; version 2 of the License.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
20 /****h* silcske/SKE Diffie Hellman Groups
24 * This interface defines the Diffie Hellman group management and utility
25 * functions for the SKE. They can be used find DH groups by group number,
26 * and group name. These routines are used during the SKE session by the
27 * SKE library. However, application may use these as well if needed.
31 #ifndef SILCSKE_GROUPS_H
32 #define SILCSKE_GROUPS_H
34 /****s* silcske/SilcSKEGroups/SilcSKEDiffieHellmanGroup
38 * typedef struct SilcSKEDiffieHellmanGroupStruct
39 * *SilcSKEDiffieHellmanGroup;
43 * This context represents one Diffie Hellman group, and is returned
44 * by the utility functions for finding correct groups. The context
45 * is freed by calling the silc_ske_group_free function.
48 typedef struct SilcSKEDiffieHellmanGroupStruct *SilcSKEDiffieHellmanGroup;
52 /****f* silcske/SilcSKEGroups/silc_ske_group_get_by_number
57 * silc_ske_group_get_by_number(int number,
58 * SilcSKEDiffieHellmanGroup *ret);
62 * Returns the Diffie Hellman group into the `ret' pointer by
63 * group number indicated by the `number'. Returns error status
64 * if the group was not found.
67 SilcSKEStatus silc_ske_group_get_by_number(int number,
68 SilcSKEDiffieHellmanGroup *ret);
70 /****f* silcske/SilcSKEGroups/silc_ske_group_get_by_name
75 * silc_ske_get_group_by_name(const char *name,
76 * SilcSKEDiffieHellmanGroup *ret);
80 * Returns the Diffie Hellman group into the `ret' pointer by
81 * group name indicated by the `name'. Returns error status
82 * if the group was not found.
85 SilcSKEStatus silc_ske_group_get_by_name(const char *name,
86 SilcSKEDiffieHellmanGroup *ret);
88 /****f* silcske/SilcSKEGroups/silc_ske_group_free
92 * void silc_ske_group_free(SilcSKEDiffieHellmanGroup group);
96 * Free the Diffie Hellman group indicated by the `group'.
99 void silc_ske_group_free(SilcSKEDiffieHellmanGroup group);
101 /****f* silcske/SilcSKEGroups/silc_ske_get_supported_groups
105 * char *silc_ske_get_supported_groups();
109 * Returns a comma separated list of support Diffie Hellman groups.
110 * This can be used to get the list of supported groups for SKE
114 char *silc_ske_get_supported_groups();
116 /****f* silcske/SilcSKEGroups/silc_ske_group_get_number
120 * int silc_ske_group_get_number(SilcSKEDiffieHellmanGroup group);
124 * Return the group number of the group indicated by the `group'.
127 int silc_ske_group_get_number(SilcSKEDiffieHellmanGroup group);
129 /****f* silcske/SilcSKEGroups/silc_ske_group_get_name
133 * const char *silc_ske_group_get_name(SilcSKEDiffieHellmanGroup group);
137 * Return the group name of the group indicated by the `group'.
140 const char *silc_ske_group_get_name(SilcSKEDiffieHellmanGroup group);
142 #endif /* SILCSKE_GROUPS_H */