On Sat, Jul 9, 2011 at 11:10 AM, Coda Highland <chighl...@gmail.com> wrote:
> I am encountering problems with a hardware crypto module and I need
> some advice in how to debug my problem.
>
> I have a DreamPlug that incorporates a Marvell Kirkwood 88F6281 SoC,
> which includes hardware acceleration for AES-128 and SHA-1. I am using
> Linux 2.6.39.2 and I have built cryptodev-linux with support for this
> hardware, and I have built two different versions of OpenSSL (0.9.8n
> and 1.0.0d) with cryptodev support. (For 0.9.8n I used the patch found
> here: 
> http://sourceforge.net/projects/ocf-linux/files/ocf-linux/20100325/ocf-linux-20100325.tar.gz;
> for 1.0.0d I used the unmodified source.)
>
> The functionality appears to work correctly when using "openssl sha1"
> and "openssl enc" with the supported ciphers, consistently producing
> the correct output for each test, and the visible performance
> differences in "openssl speed" demonstrates that the hardware is being
> used.
>
> <--snip-->

Following up on this:

I received a reply directing me to try
http://carnivore.it/2011/04/23/openssl_-_af_alg, so I did. It was
straightforward to install and test,  but unfortunately the results
are the same, except it doesn't segfault; I just get the error
message:

<--snip-->
SSL_accept:SSLv3 read client key exchange A
SSL3 alert write:fatal:bad record mac
SSL_accept:error in SSLv3 read certificate verify A
ERROR
1074403296:error:1408F119:SSL routines:SSL3_GET_RECORD:decryption
failed or bad record mac:s3_pkt.c:478:
shutting down SSL
CONNECTION CLOSED

This at least narrows it down (it seems unlikely that both
cryptodev-linux and af_alg have the same bug) but I'm still not sure
where to start debugging. Perhaps I should be focusing on the kernel
code for the hardware? Advice would be appreciated.

/s/ Adam
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to