wps_common.c File Reference

Wi-Fi Protected Setup - common functionality. More...

#include "includes.h"
#include "common.h"
#include "dh_group5.h"
#include "sha256.h"
#include "aes_wrap.h"
#include "crypto.h"
#include "wps_i.h"
#include "wps_dev_attr.h"
Include dependency graph for wps_common.c:

Go to the source code of this file.

Functions

void wps_kdf (const u8 *key, const u8 *label_prefix, size_t label_prefix_len, const char *label, u8 *res, size_t res_len)
int wps_derive_keys (struct wps_data *wps)
void wps_derive_psk (struct wps_data *wps, const u8 *dev_passwd, size_t dev_passwd_len)
struct wpabufwps_decrypt_encr_settings (struct wps_data *wps, const u8 *encr, size_t encr_len)
unsigned int wps_pin_checksum (unsigned int pin)
 Compute PIN checksum.
unsigned int wps_pin_valid (unsigned int pin)
 Check whether a PIN has a valid checksum.
unsigned int wps_generate_pin (void)
 Generate a random PIN.
void wps_fail_event (struct wps_context *wps, enum wps_msg_type msg)
void wps_success_event (struct wps_context *wps)
void wps_pwd_auth_fail_event (struct wps_context *wps, int enrollee, int part)
void wps_pbc_overlap_event (struct wps_context *wps)
void wps_pbc_timeout_event (struct wps_context *wps)

Detailed Description

Wi-Fi Protected Setup - common functionality.

Copyright
Copyright (c) 2008, 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 wps_common.c.


Function Documentation

unsigned int wps_generate_pin ( void   ) 

Generate a random PIN.

Returns:
Eight digit PIN (i.e., including the checksum digit)

Definition at line 242 of file wps_common.c.

Here is the call graph for this function:

unsigned int wps_pin_checksum ( unsigned int  pin  ) 

Compute PIN checksum.

Parameters:
pin Seven digit PIN (i.e., eight digit PIN without the checksum digit)
Returns:
Checksum digit

Definition at line 211 of file wps_common.c.

unsigned int wps_pin_valid ( unsigned int  pin  ) 

Check whether a PIN has a valid checksum.

Parameters:
pin Eight digit PIN (i.e., including the checksum digit)
Returns:
1 if checksum digit is valid, or 0 if not

Definition at line 231 of file wps_common.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:24:23 2009 for hostapd by  doxygen 1.6.1