dh_groups.c File Reference

Diffie-Hellman groups. More...

#include "includes.h"
#include "common.h"
#include "crypto.h"
#include "dh_groups.h"
Include dependency graph for dh_groups.c:

Go to the source code of this file.

Defines

#define DH_GROUP(id)
#define NUM_DH_GROUPS   (sizeof(dh_groups) / sizeof(dh_groups[0]))

Functions

struct dh_groupdh_groups_get (int id)
struct wpabufdh_init (const struct dh_group *dh, struct wpabuf **priv)
 Initialize Diffie-Hellman handshake.
struct wpabufdh_derive_shared (const struct wpabuf *peer_public, const struct wpabuf *own_private, const struct dh_group *dh)
 Derive shared Diffie-Hellman key.

Detailed Description

Diffie-Hellman groups.

Copyright
Copyright (c) 2007, Jouni Malinen <j@w1.fi>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

Alternatively, this software may be distributed under the terms of BSD license.

See README and COPYING for more details.

Definition in file dh_groups.c.


Define Documentation

#define DH_GROUP ( id   ) 
Value:
{ id, dh_group ## id ## _generator, sizeof(dh_group ## id ## _generator), \
dh_group ## id ## _prime, sizeof(dh_group ## id ## _prime) }

Definition at line 516 of file dh_groups.c.


Function Documentation

struct wpabuf* dh_derive_shared ( const struct wpabuf peer_public,
const struct wpabuf own_private,
const struct dh_group dh 
) [read]

Derive shared Diffie-Hellman key.

Parameters:
peer_public Diffie-Hellman public value from peer
own_private Diffie-Hellman private key from dh_init()
dh Selected Diffie-Hellman group
Returns:
Diffie-Hellman shared key

Definition at line 608 of file dh_groups.c.

Here is the call graph for this function:

struct wpabuf* dh_init ( const struct dh_group dh,
struct wpabuf **  priv 
) [read]

Initialize Diffie-Hellman handshake.

Parameters:
dh Selected Diffie-Hellman group
priv Pointer for returning Diffie-Hellman private key
Returns:
Diffie-Hellman public value

Definition at line 556 of file dh_groups.c.

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on Sat Nov 21 23:19:13 2009 for hostapd by  doxygen 1.6.1