[PATCH] using crypto API in WEP
jkmaline at cc.hut.fi
Sat May 29 21:56:28 EDT 2004
On Thu, May 27, 2004 at 04:38:38AM +0100, Pedro Ramalhais wrote:
> Attached is a patch to add support for using the kernel's crypto API.
Thanks! linux26 branch of the Host AP driver has now new versions of the
WEP, TKIP, and CCMP modules. I removed RC4, CRC32, Michael MIC, and AES
implementations completely from this branch.
> I am aware of the (small?) performance penalty in going through the data
> twice, but i didn't see any difference transferring at 600K/s.
This should be very minimal on most platforms. The only case where doing
both CRC32 and RC4 on a single pass could be considerably faster is a
CPU that does not have data cache or when uncached addresses are used.
However, the current crypto API arc4 implementation is far from optimal.
It ends up calling the arc4 encryption handler in a loop for each byte
of the packet..
> The decryption implementation is somewhat unusual. Instead of decrypting
> the encrypted data, calculating the CRC32, encrypting the CRC32 and
> comparing with the received ICV, i do the following: decrypt the
> encrypted data and the ICV, calculate the CRC32 on the unencrypted data
> and compare it with the unencrypted ICV.
I don't see anything unusual about this.
Jouni Malinen PGP id EFC895FA
More information about the HostAP