00001 /*00002 * Diffie-Hellman group 5 operations00003 * Copyright (c) 2009, Jouni Malinen <j@w1.fi>00004 *00005 * This program is free software; you can redistribute it and/or modify00006 * it under the terms of the GNU General Public License version 2 as00007 * published by the Free Software Foundation.00008 *00009 * Alternatively, this software may be distributed under the terms of BSD00010 * license.00011 *00012 * See README and COPYING for more details.00013 */00014
00015 #include "includes.h"00016
00017 #include "common.h"00018 #include "dh_groups.h"00019 #include "dh_group5.h"00020
00021
00022void * dh5_init(structwpabuf **priv, structwpabuf **publ)
00023 {
00024 *publ = dh_init(dh_groups_get(5), priv);
00025 if (*publ == 0)
00026 returnNULL;
00027 return (void *) 1;
00028 }
00029
00030
00031struct wpabuf * dh5_derive_shared(void *ctx, conststructwpabuf *peer_public,
00032 conststructwpabuf *own_private)
00033 {
00034 returndh_derive_shared(peer_public, own_private, dh_groups_get(5));
00035 }
00036
00037
00038voiddh5_free(void *ctx)
00039 {
00040 }