On Wed, May 27, 2015 at 10:25:00AM +0100, Gordan Bobic wrote:
> ./cipher-aead-srtp
> ioctl(CIOCGSESSION): Invalid argument

Not sure if this should succeed at all, at least that's not my code. ;)

> # ./hmac_comp
> requested cipher CRYPTO_AES_CBC and mac CRYPTO_SHA1_HMAC, got cipher 
> cbc(aes) with driver mv-cbc-aes and hash hmac(sha1) with driver 
> mv-hmac-sha1
> fail for datalen 0x10, MACs do not match!
> wrong mac: 
> \xd7\xd1\xa6\xef\x0a\x38\xe1\x09\x45\xe1\x8b\x48\x88\xaa\xa9\x23\x4c\xd4\x67\xd1
> right mac: 
> \xd7\xd1\xa6\xef\x0a\x38\xe1\x09\x45\xe1\x8b\x48\x88\xaa\xa9\x23\x4c\xd4\x67\xd1
> test_crypto() failed for datalen of 16

That's bad. I'm pretty sure SSH uses HMAC. Unless there is a bug in
hmac_comp, the fact that identical binary strings are shown for actual
and expected result makes me suspect a caching issue (the additional
data access while printing sometimes leads to a cache flush so one does
not see the complained difference).

You are using MV_CESA, therefore you are probably on a Kirkwood with
VIVT cache architecture - which is pretty delicate when it comes to the
zero-copy stuff involved. Please make sure your kernel doesn't miss any
fixes in mv_cesa regarding cache flushes. Also, for the sake of testing
you could turn off zero-copy in cryptodev as well.

Cheers, Phil

Cryptodev-linux-devel mailing list

Reply via email to