# /space/home/slher/rel/Beken/v6_4_5/macsw/ip/umac/src/me/me_mic.c File Reference

The MIC Calculator utility generic implementation. More...

`#include "me_mic.h"`
`#include "co_utils.h"`
`#include "dbg_assert.h"`
`#include "hsu.h"`

Go to the source code of this file.

## Defines
#define | MIC_END_SIGNATURE (0x0000005A)
| At the end of the MIC Calculation, a padding is added that consists of the signature byte 0x5A and number of padding bytes that are set to zeroes.
#define | MIC_TID_MASK (0x00000007)
| Mask to be applied to the received TID value (three lower bits).
#define | ROR32(L, Q) ( ( (uint32_t)(L) >> (Q) ) | ( (uint32_t)(L) << (32-(Q)) ) )
| A macro for the right rotation instruction.
#define | ROL32(L, Q) ( ( (uint32_t)(L) << (Q) ) | ( (uint32_t)(L) >> (32-(Q)) ) )
| A macro for the right rotation instruction.
#define | XSWAP32(L)
| A macro for swap operation.
#define | LEN_IN_BITS(X) ( (X) << 3 )
| A macro for multiplication by 8.
#define | SHIFTR(X, S) (((S) == 32)? 0 : ((X) >> (S)) )
| This macro is used to right shift a value by another value.
## Functions
static void | michael_block (struct mic_calc *mic_calc_ptr, uint32_t block)
| Michael block function implementation Implement the Feistel-type Michael block function b as defined in the IEEE standard 802.11-2012 (section 11.4.2.3 - Figure 11-10 and 11-11).
static void | michael_init (struct mic_calc *mic_calc_ptr, uint32_t *mic_key_ptr, uint32_t *aad)
| Initializes TKIP MIC computation (Software implementation).
static void | michael_calc (struct mic_calc *mic_calc_ptr, uint32_t start_ptr, uint32_t data_len)
| Continues TKIP MIC computation (Software implementation).
static void | michael_end (struct mic_calc *mic_calc_ptr)
| Ends TKIP MIC computation (Software implementation).
void | me_mic_init (struct mic_calc *mic_calc_ptr, uint32_t *mic_key_ptr, struct mac_addr *da, struct mac_addr *sa, uint8_t tid)
| Initializes mic_calc attributes before proceeding with MIC key calculations.
void | me_mic_calc (struct mic_calc *mic_calc_ptr, uint32_t start_ptr, uint32_t data_len)
| Performs MIC Key calculations over a continuous block in memory with an arbitrary starting point and length.
void | me_mic_end (struct mic_calc *mic_calc_ptr)
| Used to terminate the MIC calculation session and retrieve the resultant MIC key.
## Variables
uint32_t | mic_aad [4]
| Additional Authentication Data vector for MIC computation Must be in SHARED RAM when HSU is used.

## Detailed Description

The MIC Calculator utility generic implementation.

Copyright (C) RivieraWaves 2011-2019

Definition in file me_mic.c.