Wolfram Sang | 13a9930 | 2016-05-31 12:56:13 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Driver for KeyStream wireless LAN |
Wolfram Sang | 13a9930 | 2016-05-31 12:56:13 +0200 | [diff] [blame] | 3 | * |
| 4 | * Copyright (C) 2005-2008 KeyStream Corp. |
| 5 | * Copyright (C) 2009 Renesas Technology Corp. |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
Wolfram Sang | c5d9a03 | 2016-05-31 12:56:43 +0200 | [diff] [blame] | 8 | * it under the terms of the GNU General Public License version 2 as |
| 9 | * published by the Free Software Foundation. |
Wolfram Sang | 13a9930 | 2016-05-31 12:56:13 +0200 | [diff] [blame] | 10 | */ |
| 11 | |
| 12 | /* MichelMIC routine define */ |
| 13 | struct michel_mic_t { |
| 14 | uint32_t K0; // Key |
| 15 | uint32_t K1; // Key |
Wolfram Sang | 79c2df5 | 2016-05-31 12:56:36 +0200 | [diff] [blame] | 16 | uint32_t L; // Current state |
| 17 | uint32_t R; // Current state |
| 18 | uint8_t M[4]; // Message accumulator (single word) |
| 19 | int nBytesInM; // # bytes in M |
| 20 | uint8_t Result[8]; |
Wolfram Sang | 13a9930 | 2016-05-31 12:56:13 +0200 | [diff] [blame] | 21 | }; |
| 22 | |
Sandhya Bankar | d14d355 | 2016-09-20 13:09:58 +0530 | [diff] [blame] | 23 | void MichaelMICFunction(struct michel_mic_t *Mic, uint8_t *Key, |
| 24 | uint8_t *Data, int Len, uint8_t priority, |
| 25 | uint8_t *Result); |