5 Author: Pekka Riikonen <priikone@silcnet.org>
7 Copyright (C) 2000 - 2001 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; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
21 /****h* silcske/SilcSKEGroups
25 * This interface defines the Diffie Hellman group management and utility
26 * functions for the SKE. They can be used find DH groups by group number,
27 * and group name. These routines are used during the SKE session.
34 #include "silcske_status.h"
36 /****s* silcske/SilcSKEGroups/SilcSKEDiffieHellmanGroup
40 * typedef struct SilcSKEDiffieHellmanGroupStruct
41 * *SilcSKEDiffieHellmanGroup;
45 * This context represents one Diffie Hellman group, and is returned
46 * by the utility functions for finding correct groups. The context
47 * is freed by calling the silc_ske_group_free function.
50 typedef struct SilcSKEDiffieHellmanGroupStruct *SilcSKEDiffieHellmanGroup;
54 /****f* silcske/SilcSKEGroups/silc_ske_group_get_by_number
59 * silc_ske_group_get_by_number(int number,
60 * SilcSKEDiffieHellmanGroup *ret);
64 * Returns the Diffie Hellman group into the `ret' pointer by
65 * group number indicated by the `number'. Returns error status
66 * if the group was not found.
69 SilcSKEStatus silc_ske_group_get_by_number(int number,
70 SilcSKEDiffieHellmanGroup *ret);
72 /****f* silcske/SilcSKEGroups/silc_ske_group_get_by_name
77 * silc_ske_get_group_by_name(const char *name,
78 * SilcSKEDiffieHellmanGroup *ret);
82 * Returns the Diffie Hellman group into the `ret' pointer by
83 * group name indicated by the `name'. Returns error status
84 * if the group was not found.
87 SilcSKEStatus silc_ske_group_get_by_name(const char *name,
88 SilcSKEDiffieHellmanGroup *ret);
90 /****f* silcske/SilcSKEGroups/silc_ske_group_free
94 * void silc_ske_group_free(SilcSKEDiffieHellmanGroup group);
98 * Free the Diffie Hellman group indicated by the `group'.
101 void silc_ske_group_free(SilcSKEDiffieHellmanGroup group);
103 /****f* silcske/SilcSKEGroups/silc_ske_get_supported_groups
107 * char *silc_ske_get_supported_groups();
111 * Returns a comma separated list of support Diffie Hellman groups.
112 * This can be used to get the list of supported groups for SKE
116 char *silc_ske_get_supported_groups();
118 /****f* silcske/SilcSKEGroups/silc_ske_group_get_number
122 * int silc_ske_group_get_number(SilcSKEDiffieHellmanGroup group);
126 * Return the group number of the group indicated by the `group'.
129 int silc_ske_group_get_number(SilcSKEDiffieHellmanGroup group);
131 /****f* silcske/SilcSKEGroups/silc_ske_group_get_name
135 * const char *silc_ske_group_get_name(SilcSKEDiffieHellmanGroup group);
139 * Return the group name of the group indicated by the `group'.
142 const char *silc_ske_group_get_name(SilcSKEDiffieHellmanGroup group);