Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
security.c File Reference
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/usb/ch9.h>
#include <linux/random.h>
#include <linux/export.h>
#include "wusbhc.h"

Go to the source code of this file.

Functions

int wusbhc_sec_create (struct wusbhc *wusbhc)
 
void wusbhc_sec_destroy (struct wusbhc *wusbhc)
 
int wusbhc_sec_start (struct wusbhc *wusbhc)
 
void wusbhc_sec_stop (struct wusbhc *wusbhc)
 
const charwusb_et_name (u8 x)
 
 EXPORT_SYMBOL_GPL (wusb_et_name)
 
int wusb_dev_sec_add (struct wusbhc *wusbhc, struct usb_device *usb_dev, struct wusb_dev *wusb_dev)
 
void wusb_dev_sec_rm (struct wusb_dev *wusb_dev)
 
int wusb_dev_update_address (struct wusbhc *wusbhc, struct wusb_dev *wusb_dev)
 
int wusb_dev_4way_handshake (struct wusbhc *wusbhc, struct wusb_dev *wusb_dev, struct wusb_ckhdid *ck)
 
void wusbhc_gtk_rekey (struct wusbhc *wusbhc)
 

Function Documentation

EXPORT_SYMBOL_GPL ( wusb_et_name  )
int wusb_dev_4way_handshake ( struct wusbhc wusbhc,
struct wusb_dev wusb_dev,
struct wusb_ckhdid ck 
)

Definition at line 344 of file security.c.

int wusb_dev_sec_add ( struct wusbhc wusbhc,
struct usb_device *  usb_dev,
struct wusb_dev wusb_dev 
)

Definition at line 200 of file security.c.

void wusb_dev_sec_rm ( struct wusb_dev wusb_dev)

Definition at line 282 of file security.c.

int wusb_dev_update_address ( struct wusbhc wusbhc,
struct wusb_dev wusb_dev 
)

Update the address of an unauthenticated WUSB device

Once we have successfully authenticated, we take it to addr0 state and then to a normal address.

Before the device's address (as known by it) was usb_dev->devnum | 0x80 (unauthenticated address). With this we update it to usb_dev->devnum.

Definition at line 296 of file security.c.

const char* wusb_et_name ( u8  x)
Returns
encryption type name

Definition at line 137 of file security.c.

void wusbhc_gtk_rekey ( struct wusbhc wusbhc)

wusbhc_gtk_rekey - generate and distribute a new GTK : the WUSB host controller

Generate a new GTK and distribute it to all connected and authenticated devices. When all devices have the new GTK, the host starts using it.

This must be called after every device disconnect (see [WUSB] section 6.2.11.2).

Definition at line 554 of file security.c.

int wusbhc_sec_create ( struct wusbhc wusbhc)

Definition at line 35 of file security.c.

void wusbhc_sec_destroy ( struct wusbhc wusbhc)

Definition at line 51 of file security.c.

int wusbhc_sec_start ( struct wusbhc wusbhc)

wusbhc_sec_start - start the security management process : the WUSB host controller

Generate and set an initial GTK on the host controller.

Called when the HC is started.

Definition at line 108 of file security.c.

void wusbhc_sec_stop ( struct wusbhc wusbhc)

wusbhc_sec_stop - stop the security management process : the WUSB host controller

Wait for any pending GTK rekeys to stop.

Definition at line 130 of file security.c.