static INLINE void
tkip_micblock(uint32 *left, uint32 *right)
{
	uint32 l = *left;
	uint32 r = *right;

	r ^= ROTR32(l, 15);
	l += r; 
	r ^= XSWAP32(l);
	l += r; 
	r ^= ROTR32(l, 29);
	l += r; 
	r ^= ROTR32(l, 2);
	l += r; 

	*left = l;
	*right = r;
}
예제 #2
0
/*
 * "Michael" Messge Integrity Check (MIC) algorithm
 */
static INLINE void
tkip_micblock(uint32 *left, uint32 *right)
{
	uint32 l = *left;
	uint32 r = *right;

	/*
	 * Per Henry, we replaced the ROTL with ROTR
	 */
	r ^= ROTR32(l, 15);
	l += r; /* mod 2^32 */
	r ^= XSWAP32(l);
	l += r; /* mod 2^32 */
	r ^= ROTR32(l, 29);
	l += r; /* mod 2^32 */
	r ^= ROTR32(l, 2);
	l += r; /* mod 2^32 */

	*left = l;
	*right = r;
}