blob: 425c848acb832b220f3b559433ca86933dcf38f0 [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{
Dmitry Shmidtd7ff03d2015-12-04 14:49:35 -080018 wpabuf_free(*publ);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070019 *publ = dh_init(dh_groups_get(5), priv);
Dmitry Shmidt1f69aa52012-01-24 16:10:04 -080020 if (*publ == NULL)
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070021 return NULL;
22 return (void *) 1;
23}
24
25
Dmitry Shmidt04949592012-07-19 12:16:46 -070026void * dh5_init_fixed(const struct wpabuf *priv, const struct wpabuf *publ)
27{
28 return (void *) 1;
29}
30
31
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070032struct wpabuf * dh5_derive_shared(void *ctx, const struct wpabuf *peer_public,
33 const struct wpabuf *own_private)
34{
35 return dh_derive_shared(peer_public, own_private, dh_groups_get(5));
36}
37
38
39void dh5_free(void *ctx)
40{
41}