Re: [Ocf-linux-users] How to using OCF cryptosoft to work with linux kernel crypto?
Brought to you by:
david-m
From: David M. <Dav...@se...> - 2010-01-13 05:15:36
|
Jivin mix.kao lays it down ... > Hi, there > > My platform is ARM IXP425 and using Linux kernel 2.6.28.10 with OCF > framework. > > I have compiled the ixp4xx.ko to support hardware crypto acceleration. > Now i am trying to do some test using "cryptotest" to make sure the > performance difference between software and hardware. > > Now i got a problem when i tried to use cryptosoft.ko. > When i load ocf.ko, cryptodev.ko, and cryptosoft.ko and run > cryptotest -a aes 256 8192 > cryptodev_open() > cryptodev_ioctl(cmd=c0046364 arg=bea4bb18) > cryptodev_ioctl(CRIOGET) > cryptodev_ioctl(cmd=c030636a arg=bea4bb6c) > cryptodev_ioctl(CIOCGSESSION2) > cryptodev_ioctl(CIOCGSESSION2) - no mac > crypto/ocf/crypto.c,370: DRIVER_LOCK() > crypto/ocf/crypto.c,406: DRIVER_UNLOCK() > cryptodev_ioctl(CIOCGSESSION2) - newsession 22 > cryptodev_ioctl(CIOCGSESSION2) - bail 22 > cryptodev_release() > > Anything i missing? Yes, see below. > # insmod ocf.ko crypto_debug=1 > crypto_init(0xbf0baf08) > crypto/ocf/crypto.c,1253: Q_LOCK() > crypto_proc - sleeping (qe=1 qb=0 kqe=1 kqb=0) > crypto/ocf/crypto.c,1400: Q_UNLOCK() > # insmod cryptodev.ko cryptodev_debug=1 > crypto/ocf/crypto.c,1441: RETQ_LOCK > crypto_ret_proc - sleeping > crypto/ocf/crypto.c,1472: RETQ_UNLOCK > cryptodev_init(bf0c4000) > # insmod cryptosoft.ko swcr_debug=1 > cryptosoft_init(bf0c831c) > crypto/ocf/crypto.c,483: DRIVER_LOCK() > crypto/ocf/crypto.c,528: DRIVER_UNLOCK() > cryptosoft_init:BLKCIPHER algorithm 1:'cbc(des)' not supported > cryptosoft_init:BLKCIPHER algorithm 2:'cbc(des3_ede)' not supported > cryptosoft_init:BLKCIPHER algorithm 3:'cbc(blowfish)' not supported > cryptosoft_init:BLKCIPHER algorithm 4:'cbc(cast5)' not supported > cryptosoft_init:BLKCIPHER algorithm 5:'cbc(skipjack)' not supported > cryptosoft_init:HMAC algorithm 6:'hmac(md5)' not supported > cryptosoft_init:HMAC algorithm 7:'hmac(sha1)' not supported > cryptosoft_init:HMAC algorithm 8:'hmac(ripemd160)' not supported > cryptosoft_init:HASH algorithm 9:'md5-kpdk??' not supported > cryptosoft_init:HASH algorithm 10:'sha1-kpdk??' not supported > cryptosoft_init:BLKCIPHER algorithm 11:'cbc(aes)' not supported > cryptosoft_init:BLKCIPHER algorithm 12:'ecb(arc4)' not supported > cryptosoft_init:HASH algorithm 13:'md5' not supported > cryptosoft_init:HASH algorithm 14:'sha1' not supported > cryptosoft_init:HMAC algorithm 15:'hmac(digest_null)' not supported > cryptosoft_init:BLKCIPHER algorithm 16:'cbc(cipher_null)' not supported > cryptosoft_init:COMP algorithm 17:'deflate' not supported > cryptosoft_init:HMAC algorithm 18:'hmac(sha256)' not supported > cryptosoft_init:HMAC algorithm 19:'hmac(sha384)' not supported > cryptosoft_init:HMAC algorithm 20:'hmac(sha512)' not supported > cryptosoft_init:BLKCIPHER algorithm 21:'cbc(camellia)' not supported > cryptosoft_init:HASH algorithm 22:'sha256' not supported > cryptosoft_init:HASH algorithm 23:'sha384' not supported > cryptosoft_init:HASH algorithm 24:'sha512' not supported > cryptosoft_init:HASH algorithm 25:'ripemd160' not supported cryptosoft uses the kernel cryptoAPI, so you need to enable the kernel cryptos AES/DES/etc in your kernel config in order to use cryptosoft. CONFIG_CRYPTO_DES=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_AES=y CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_CBC=y CONFIG_CRYPTO_HASH=y CONFIG_CRYPTO_SHA256=y CONFIG_CRYPTO_SHA512=y You can turn these off once you switch exclusively to the ixp4xx driver if you want to save some code in the kernel. Cheers, Davidm -- David McCullough, dav...@se..., Ph:+61 734352815 McAfee - SnapGear http://www.snapgear.com http://www.uCdot.org |