Re: question about sha1 driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I've written a SHA1 driver for our custom HW running Linux 2.6.28.4.
The driver passed all the SHA1 tests but kept failing at hmac(sha1-hw) test 3.
During my debugging I added printk-s in the testmgr to also print successful tests.  When I did that all the tests passed. All future encryption/decryptions (I set up a tunnel between the board and a server and ping-ed packets back and forth) were processed successfully by the driver. 
Attached below the output of the testmgr when setting up the tunnel (my driver registers with name sha1-hw and is implemented by "hw_SHA"  kernel module ) and of /proc/crypto.


Any ideas as to what could be the reason for the failure? 

Thanks,
Avital


Modified testmgr output:
=================

alg: hash: Test 1 passed for sha1-hw
alg: hash: Test 2 passed for sha1-hw
alg: hash: Chunking test 1 Passed for sha1-hw
alg: hash: setkey passed on test 1 for hmac(md5-generic): ret=0
alg: hash: Test 1 passed for hmac(md5-generic)
alg: hash: setkey passed on test 2 for hmac(md5-generic): ret=0
alg: hash: Test 2 passed for hmac(md5-generic)
alg: hash: setkey passed on test 3 for hmac(md5-generic): ret=0
alg: hash: Test 3 passed for hmac(md5-generic)
alg: hash: setkey passed on test 4 for hmac(md5-generic): ret=0
alg: hash: Test 4 passed for hmac(md5-generic)
alg: hash: setkey passed on test 5 for hmac(md5-generic): ret=0
alg: hash: Test 5 passed for hmac(md5-generic)
alg: hash: setkey passed on test 6 for hmac(md5-generic): ret=0
alg: hash: Test 6 passed for hmac(md5-generic)
alg: hash: setkey passed on test 7 for hmac(md5-generic): ret=0
alg: hash: Test 7 passed for hmac(md5-generic)
alg: hash: setkey Passed on chunking test 1 for hmac(md5-generic): ret=0
alg: hash: Chunking test 1 Passed for hmac(md5-generic)
alg: hash: setkey passed on test 1 for hmac(sha1-hw): ret=0
alg: hash: Test 1 passed for hmac(sha1-hw)
alg: hash: setkey passed on test 2 for hmac(sha1-hw): ret=0
alg: hash: Test 2 passed for hmac(sha1-hw)
alg: hash: setkey passed on test 3 for hmac(sha1-hw): ret=0
alg: hash: Test 3 passed for hmac(sha1-hw)
alg: hash: setkey passed on test 4 for hmac(sha1-hw): ret=0
alg: hash: Test 4 passed for hmac(sha1-hw)
alg: hash: setkey passed on test 5 for hmac(sha1-hw): ret=0
alg: hash: Test 5 passed for hmac(sha1-hw)
alg: hash: setkey passed on test 6 for hmac(sha1-hw): ret=0
alg: hash: Test 6 passed for hmac(sha1-hw)
alg: hash: setkey passed on test 7 for hmac(sha1-hw): ret=0
alg: hash: Test 7 passed for hmac(sha1-hw)
alg: hash: setkey Passed on chunking test 1 for hmac(sha1-hw): ret=0
alg: hash: Chunking test 1 Passed for hmac(sha1-hw)
alg: hash: setkey passed on test 1 for xcbc(aes-generic): ret=0
alg: hash: Test 1 passed for xcbc(aes-generic)
alg: hash: setkey passed on test 2 for xcbc(aes-generic): ret=0
alg: hash: Test 2 passed for xcbc(aes-generic)
alg: hash: setkey passed on test 3 for xcbc(aes-generic): ret=0
alg: hash: Test 3 passed for xcbc(aes-generic)
alg: hash: setkey passed on test 4 for xcbc(aes-generic): ret=0
alg: hash: Test 4 passed for xcbc(aes-generic)
alg: hash: setkey passed on test 5 for xcbc(aes-generic): ret=0
alg: hash: Test 5 passed for xcbc(aes-generic)
alg: hash: setkey passed on test 6 for xcbc(aes-generic): ret=0
alg: hash: Test 6 passed for xcbc(aes-generic)
alg: hash: setkey Passed on chunking test 1 for xcbc(aes-generic): ret=0
alg: hash: Chunking test 1 Passed for xcbc(aes-generic)
alg: hash: setkey Passed on chunking test 2 for xcbc(aes-generic): ret=0
alg: hash: Chunking test 2 Passed for xcbc(aes-generic)
alg: skcipher: Test 1 succeeded on encryption for cbc-aes-hw
alg: skcipher: Test 2 succeeded on encryption for cbc-aes-hw
alg: skcipher: Test 3 succeeded on encryption for cbc-aes-hw
alg: skcipher: Test 4 succeeded on encryption for cbc-aes-hw
alg: skcipher: Test 1 succeeded on decryption for cbc-aes-hw
alg: skcipher: Test 2 succeeded on decryption for cbc-aes-hw
alg: skcipher: Test 3 succeeded on decryption for cbc-aes-hw
alg: skcipher: Test 4 succeeded on decryption for cbc-aes-hw



output of /proc/crypto
=================

name         : authenc(hmac(sha1),cbc(aes))
driver       : authenc(hmac(sha1-hw),cbc-aes-hw)
module       : kernel
priority     : 3300
refcnt       : 3
selftest     : passed
type         : aead
async        : yes
blocksize    : 16
ivsize       : 16
maxauthsize  : 20
geniv        : <built-in>

name         : cbc(aes)
driver       : cbc-aes-hw
module       : kernel
priority     : 300
refcnt       : 3
selftest     : passed
type         : givcipher
async        : yes
blocksize    : 16
min keysize  : 16
max keysize  : 32
ivsize       : 16
geniv        : chainiv

name         : cbc(des3_ede)
driver       : cbc(des3_ede-generic)
module       : kernel
priority     : 0
refcnt       : 1
selftest     : passed
type         : blkcipher
blocksize    : 8
min keysize  : 24
max keysize  : 24
ivsize       : 8
geniv        : <default>

name         : cbc(des)
driver       : cbc(des-generic)
module       : kernel
priority     : 0
refcnt       : 1
selftest     : passed
type         : blkcipher
blocksize    : 8
min keysize  : 8
max keysize  : 8
ivsize       : 8
geniv        : <default>

name         : xcbc(aes)
driver       : xcbc(aes-generic)
module       : kernel
priority     : 100
refcnt       : 1
selftest     : passed
type         : hash
blocksize    : 16
digestsize   : 16

name         : hmac(sha1)
driver       : hmac(sha1-hw)
module       : kernel
priority     : 300
refcnt       : 3
selftest     : passed
type         : hash
blocksize    : 64
digestsize   : 20

name         : hmac(md5)
driver       : hmac(md5-generic)
module       : kernel
priority     : 0
refcnt       : 1
selftest     : passed
type         : hash
blocksize    : 64
digestsize   : 16

name         : sha1
driver       : sha1-hw
module       : hw_SHA
priority     : 300
refcnt       : 3
selftest     : passed
type         : digest
blocksize    : 64
digestsize   : 20

name         : cbc(aes)
driver       : cbc-aes-hw
module       : hw_AES
priority     : 300
refcnt       : 3
selftest     : passed
type         : blkcipher
blocksize    : 16
min keysize  : 16
max keysize  : 32
ivsize       : 16
geniv        : <default>

name         : stdrng
driver       : ansi_cprng
module       : kernel
priority     : 100
refcnt       : 1
selftest     : passed
type         : rng
seedsize     : 32

name         : stdrng
driver       : krng
module       : kernel
priority     : 200
refcnt       : 2
selftest     : passed
type         : rng
seedsize     : 0

name         : aes
driver       : aes-generic
module       : kernel
priority     : 100
refcnt       : 1
selftest     : passed
type         : cipher
blocksize    : 16
min keysize  : 16
max keysize  : 32

name         : des3_ede
driver       : des3_ede-generic
module       : kernel
priority     : 0
refcnt       : 1
selftest     : passed
type         : cipher
blocksize    : 8
min keysize  : 24
max keysize  : 24

name         : des
driver       : des-generic
module       : kernel
priority     : 0
refcnt       : 1
selftest     : passed
type         : cipher
blocksize    : 8
min keysize  : 8
max keysize  : 8

name         : sha1
driver       : sha1-generic
module       : kernel
priority     : 0
refcnt       : 1
selftest     : passed
type         : digest
blocksize    : 64
digestsize   : 20

name         : md5
driver       : md5-generic
module       : kernel
priority     : 0
refcnt       : 1
selftest     : passed
type         : digest
blocksize    : 64
digestsize   :



[Index of Archives]     [Kernel]     [Linux Crypto]     [Gnu Crypto]     [Gnu Classpath]     [Netfilter]     [Bugtraq]
  Powered by Linux