On Tue, 2006-10-24 at 16:38 +0800, Hong Liu wrote:

> The first time when we set the TKIP key, we can set the phase1 key if
> the driver requires.

Right.

> The problem is when IV16 wraps, who will generate the new phase1 key?

Ok, I was confused for a moment, but yes, when the 16-bit part of the IV
wraps then the upper part changes and hence you need to regenerate the
phase1 key. 

> If the stack need to do this, then we will need to call set_key in the
> packet TX path which I think may not be appropriate.

Well, I checked again and found that bcm34xx requires the IV (48) to be
maintained by software, iow with each packet you tell the hardware what
the IV16 should be. Hence you know when it has wrapped and thus (before
submitting the DMA for the packet) you can regenerate the phase1 key in
software and upload it to the hardware key memory.

This is getting quite complicated. How about having the stack maintain
the IV *only*, and adding helper functions for
 * generating the phase 1 key
 * generating the phase 2 key based on the phase 1 key
that the drivers can use as required?

ipw3945 would call both key generation functions as required, and
bcm43xx would just call the phase 1 function when a key is uploaded and
when the iv16 wraps, not using the phase 2 function at all.

johannes
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to