00001 /*00002 * Diffie-Hellman groups00003 * Copyright (c) 2007, Jouni Malinen <j@w1.fi>00004 *00005 * This program is free software; you can redistribute it and/or modify00006 * it under the terms of the GNU General Public License version 2 as00007 * published by the Free Software Foundation.00008 *00009 * Alternatively, this software may be distributed under the terms of BSD00010 * license.00011 *00012 * See README and COPYING for more details.00013 */00014
00015 #ifndef DH_GROUPS_H00016 #define DH_GROUPS_H00017
00018struct dh_group {
00019intid;
00020constu8 *generator;
00021size_tgenerator_len;
00022constu8 *prime;
00023size_tprime_len;
00024 };
00025
00026 conststruct dh_group * dh_groups_get(intid);
00027 struct wpabuf * dh_init(conststructdh_group *dh, structwpabuf **priv);
00028 struct wpabuf * dh_derive_shared(conststructwpabuf *peer_public,
00029 conststructwpabuf *own_private,
00030 conststructdh_group *dh);
00031
00032 #endif /* DH_GROUPS_H */