blob: 225f0067a17f946e7afda45a1099db6cebbd7dd0 [file] [log] [blame]
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07001/*
2 * Diffie-Hellman groups
3 * Copyright (c) 2007, Jouni Malinen <j@w1.fi>
4 *
Dmitry Shmidtc5ec7f52012-03-06 16:33:24 -08005 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07007 */
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;
18};
19
20const struct dh_group * dh_groups_get(int id);
21struct wpabuf * dh_init(const struct dh_group *dh, struct wpabuf **priv);
22struct 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 */