Use common driver code for Linux hwaddr get/set
[hostap-gosc2009.git] / src / crypto / dh_groups.h
blob5c61539b70029bb1f2e78ae12f7a205bd6b8d425
1 /*
2 * Diffie-Hellman groups
3 * Copyright (c) 2007, Jouni Malinen <j@w1.fi>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
9 * Alternatively, this software may be distributed under the terms of BSD
10 * license.
12 * See README and COPYING for more details.
15 #ifndef DH_GROUPS_H
16 #define DH_GROUPS_H
18 struct dh_group {
19 int id;
20 const u8 *generator;
21 size_t generator_len;
22 const u8 *prime;
23 size_t prime_len;
26 const struct dh_group * dh_groups_get(int id);
27 struct wpabuf * dh_init(const struct dh_group *dh, struct wpabuf **priv);
28 struct wpabuf * dh_derive_shared(const struct wpabuf *peer_public,
29 const struct wpabuf *own_private,
30 const struct dh_group *dh);
32 #endif /* DH_GROUPS_H */