]> git.ipfire.org Git - thirdparty/hostap.git/blame - src/crypto/dh_groups.h
Use a shared helper function for RSN supplicant capabilities
[thirdparty/hostap.git] / src / crypto / dh_groups.h
CommitLineData
6fc6879b
JM
1/*
2 * Diffie-Hellman groups
3 * Copyright (c) 2007, Jouni Malinen <j@w1.fi>
4 *
0f3d578e
JM
5 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
6fc6879b
JM
7 */
8
9#ifndef DH_GROUPS_H
10#define DH_GROUPS_H
11
12struct dh_group {
13 int id;
14 const u8 *generator;
15 size_t generator_len;
16 const u8 *prime;
17 size_t prime_len;
2ce12789
JM
18 const u8 *order;
19 size_t order_len;
20 unsigned int safe_prime:1;
6fc6879b
JM
21};
22
23const struct dh_group * dh_groups_get(int id);
24struct wpabuf * dh_init(const struct dh_group *dh, struct wpabuf **priv);
25struct wpabuf * dh_derive_shared(const struct wpabuf *peer_public,
26 const struct wpabuf *own_private,
27 const struct dh_group *dh);
28
29#endif /* DH_GROUPS_H */