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"
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 wpabuf * | wps_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) |
Wi-Fi Protected Setup - common functionality.
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.
unsigned int wps_generate_pin | ( | void | ) |
Generate a random PIN.
Definition at line 242 of file wps_common.c.
unsigned int wps_pin_checksum | ( | unsigned int | pin | ) |
Compute PIN checksum.
pin | Seven digit PIN (i.e., eight digit PIN without the 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.
pin | Eight digit PIN (i.e., including the checksum digit) |
Definition at line 231 of file wps_common.c.