blob: ccdbfc812958345f750e2a5135c293a1de4095af [file] [log] [blame]
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07001/*
2 * Diffie-Hellman group 5 operations
Dmitry Shmidt04949592012-07-19 12:16:46 -07003 * Copyright (c) 2009, 2012, Jouni Malinen <j@w1.fi>
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07004 *
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#include "includes.h"
10
11#include "common.h"
12#include "dh_groups.h"
13#include "dh_group5.h"
14
15
16void * dh5_init(struct wpabuf **priv, struct wpabuf **publ)
17{
18 *publ = dh_init(dh_groups_get(5), priv);
Dmitry Shmidt1f69aa52012-01-24 16:10:04 -080019 if (*publ == NULL)
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070020 return NULL;
21 return (void *) 1;
22}
23
24
Dmitry Shmidt04949592012-07-19 12:16:46 -070025void * dh5_init_fixed(const struct wpabuf *priv, const struct wpabuf *publ)
26{
27 return (void *) 1;
28}
29
30
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070031struct wpabuf * dh5_derive_shared(void *ctx, const struct wpabuf *peer_public,
32 const struct wpabuf *own_private)
33{
34 return dh_derive_shared(peer_public, own_private, dh_groups_get(5));
35}
36
37
38void dh5_free(void *ctx)
39{
40}