Re: [Ocf-linux-users] AES hardware accelerator in OpenSSL with OCF
Brought to you by:
david-m
|
From: David M. <Dav...@se...> - 2009-01-29 13:01:42
|
Jivin Palacios, Hector lays it down ... > Hi David, > > > -----Original Message----- > > From: David McCullough [mailto:Dav...@se...] > > Sent: Wednesday, January 28, 2009 11:35 PM > > To: Palacios, Hector > > Cc: ocf...@li... > > Subject: Re: [Ocf-linux-users] AES hardware accelerator in OpenSSL with > > OCF > > Have you loaded the cryptosoft driver ? It is needed to talk to the > > cryptoAPI in the kernel. > > > > modprobe ocf > > modprobe cryptosoft > > modprobe cryptodev > > > > You can check that cryptosoft is being used by loading it with the > > debug > > parameter, or enabling debug later with: > > > > echo 1 > /sys/module/cryptosoft/parameters/swcr_debug > > > > Check your syslog (or console output) for driver messages from > > cryptosoft > > which will confirm it is being used when you run openssl. > > Yes, I load the cryptosoft module which eventually resolves and loads my hw driver: > / # modprobe cryptosoft > ns921x-aes ns921x-aes.1: NS921x AES encryption/decryption module at 0xc187c000 (irq: 2) > / # lsmod > Module Size Used by Tainted: P > ecb 1920 0 > aes_generic 33160 0 > ns921x_aes 5716 0 > cbc 2464 0 > crypto_blkcipher 12580 3 ecb,ns921x_aes,cbc > cryptomgr 2048 0 > crypto_algapi 10752 6 ecb,aes_generic,ns921x_aes,cbc,crypto_blkcipher,cryptomgr > cryptosoft 9192 0 > cryptodev 10916 0 > ocf 18496 2 cryptosoft,cryptodev > / # > > Do I have somehow to link the cbc(aes) and ecb(aes) to my driver functions? No, but you should probably make sure you have your driver loaded before loading cryptosoft. Something like: modprobe your-driver modprobe ocf modprobe cryptosoft modprobe cryptodev Just to be sure the algs are there when cryptosoft checks for them. What functions does you driver provide ? You can see the list that cryptosoft in the crypto_details table in cryptosoft.c I am not an expert on how the kernel crypto API matches up cbc(aes) to a driver so I can't help you there. > > Also remember to add the "-elapsed" option to openssl speed tests or > > the > > results will look a little unusual to the causual observer. > > I'll take note, thanks. Cheers, Davidm -- David McCullough, dav...@se..., Ph:+61 734352815 Secure Computing - SnapGear http://www.uCdot.org http://www.snapgear.com |