16104Sse/* 26104Sse * Diffie-Hellman groups 37234Sse * Copyright (c) 2007, Jouni Malinen <j@w1.fi> 46104Sse * 56104Sse * This program is free software; you can redistribute it and/or modify 66104Sse * it under the terms of the GNU General Public License version 2 as 76104Sse * published by the Free Software Foundation. 86104Sse * 96104Sse * Alternatively, this software may be distributed under the terms of BSD 106104Sse * license. 116104Sse * 126104Sse * See README and COPYING for more details. 136104Sse */ 146104Sse 156104Sse#ifndef DH_GROUPS_H 166104Sse#define DH_GROUPS_H 176104Sse 186104Ssestruct dh_group { 196104Sse int id; 206104Sse const u8 *generator; 216104Sse size_t generator_len; 226104Sse const u8 *prime; 236104Sse size_t prime_len; 246104Sse}; 256104Sse 266104Sseconst struct dh_group * dh_groups_get(int id); 276104Ssestruct wpabuf * dh_init(const struct dh_group *dh, struct wpabuf **priv); 286104Ssestruct wpabuf * dh_derive_shared(const struct wpabuf *peer_public, 296104Sse const struct wpabuf *own_private, 306104Sse const struct dh_group *dh); 316104Sse 326104Sse#endif /* DH_GROUPS_H */ 336104Sse