dh_groups.h revision 189251
138494Sobrien/* 2174294Sobrien * Diffie-Hellman groups 338494Sobrien * Copyright (c) 2007, Jouni Malinen <j@w1.fi> 438494Sobrien * 538494Sobrien * This program is free software; you can redistribute it and/or modify 638494Sobrien * it under the terms of the GNU General Public License version 2 as 738494Sobrien * published by the Free Software Foundation. 838494Sobrien * 938494Sobrien * Alternatively, this software may be distributed under the terms of BSD 1038494Sobrien * license. 1138494Sobrien * 1238494Sobrien * See README and COPYING for more details. 1338494Sobrien */ 1438494Sobrien 1538494Sobrien#ifndef DH_GROUPS_H 1638494Sobrien#define DH_GROUPS_H 1738494Sobrien 1838494Sobrienstruct dh_group { 1938494Sobrien int id; 2042629Sobrien const u8 *generator; 2138494Sobrien size_t generator_len; 2238494Sobrien const u8 *prime; 2338494Sobrien size_t prime_len; 2438494Sobrien}; 2538494Sobrien 2638494Sobrienconst struct dh_group * dh_groups_get(int id); 2738494Sobrienstruct wpabuf * dh_init(const struct dh_group *dh, struct wpabuf **priv); 2838494Sobrienstruct wpabuf * dh_derive_shared(const struct wpabuf *peer_public, 2938494Sobrien const struct wpabuf *own_private, 3038494Sobrien const struct dh_group *dh); 3138494Sobrien 3238494Sobrien#endif /* DH_GROUPS_H */ 3338494Sobrien