dh_group5.c
Go to the documentation of this file.
00001 /*
00002  * Diffie-Hellman group 5 operations
00003  * Copyright (c) 2009, Jouni Malinen <j@w1.fi>
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License version 2 as
00007  * published by the Free Software Foundation.
00008  *
00009  * Alternatively, this software may be distributed under the terms of BSD
00010  * 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 
00022 void * dh5_init(struct wpabuf **priv, struct wpabuf **publ)
00023 {
00024         *publ = dh_init(dh_groups_get(5), priv);
00025         if (*publ == 0)
00026                 return NULL;
00027         return (void *) 1;
00028 }
00029 
00030 
00031 struct wpabuf * dh5_derive_shared(void *ctx, const struct wpabuf *peer_public,
00032                                   const struct wpabuf *own_private)
00033 {
00034         return dh_derive_shared(peer_public, own_private, dh_groups_get(5));
00035 }
00036 
00037 
00038 void dh5_free(void *ctx)
00039 {
00040 }


wpa_supplicant_node
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Apr 24 2014 15:33:19