1 /* 2 * Diffie-Hellman groups 3 * Copyright (c) 2007, Jouni Malinen <j@w1.fi> 4 * 5 * This software may be distributed under the terms of the BSD license. 6 * See README for more details. 7 */ 8 9 #ifndef DH_GROUPS_H 10 #define DH_GROUPS_H 11 12 struct dh_group { 13 int id; 14 const u8 *generator; 15 size_t generator_len; 16 const u8 *prime; 17 size_t prime_len; 18 }; 19 20 const struct dh_group * dh_groups_get(int id); 21 struct wpabuf * dh_init(const struct dh_group *dh, struct wpabuf **priv); 22 struct wpabuf * dh_derive_shared(const struct wpabuf *peer_public, 23 const struct wpabuf *own_private, 24 const struct dh_group *dh); 25 26 #endif /* DH_GROUPS_H */ 27