On Tue, Apr 13, 2010 at 01:13:47PM +0300, Dmitry Kasatkin wrote: > > As I can see from the patch initial vectors calculated with SW shash > Rest is done in hw, basically sha1. Ideally that code shouldn't be duplicated either, but honestly that doesn't matter when it comes to whether the hardware can do HMAC directly. You only compute the IVs once for each key, so whether it's done in software or hardware doesn't matter. > The same can be done with omap driver. > Just in addition to finalize as done in hmac_final(). If you do hmac_final in software, then this is no longer a hw HMAC implementation and we should instead implement an ahash version of hmac. The difference here is that ipad/opad is computed only once for a key, while final happens many times over the lifetime of that key. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html