Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Jun 2008 13:58:46 +0200
From:      Patrick Lamaiziere <patfbsd@davenulle.org>
To:        Pawel Jakub Dawidek <pjd@FreeBSD.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: AMD Geode LX crypto accelerator (glxsb)
Message-ID:  <20080608135846.45799105@baby-jane-lamaiziere-net.local>
In-Reply-To: <20080607041855.GA3462@garage.freebsd.pl>
References:  <20080606234135.46144207@baby-jane-lamaiziere-net.local> <20080607041855.GA3462@garage.freebsd.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
Le Sat, 7 Jun 2008 06:18:55 +0200,
Pawel Jakub Dawidek <pjd@FreeBSD.org> a écrit :

> > Well, it seems to work but i've got few problems to test the
> > module :
> > 
> > - How check the encryption/decryption ?
> > 
> > Openssl seems ok, i've got quite the same results as NetBSD on a
> > Soekris net5501 box. But i must use -engine cryptodev, why ?
> 
> This is ok, as you may not want to use it, right?

I think it should be automatic with an option to not use it.
Simon replied for this problem.

> Try comparing result of openssl encryption with and without '-engine
> cryptodev'. Remember to use -nosalt (and maybe -raw) prevent openssl
> from putting salt in front of the ciphertext.

Thank you.

I checked the encryption with and without 'engine cryptodev'.
It works \o/

$ openssl enc -e -aes-128-cbc -in file -out file.enc -nosalt -k
abcdefhij

$ openssl enc -d -aes-128-cbc -in file.enc -out file.dec
-nosalt -k abcdefhij

$ md5 file file.dec

Time to encode a 300 MB file 
soft : 1m29.72s real, 1m8.74s user, 8.68s sys
hard : 42.98s real, 1.80s user, 22.94s sys

> > - The driver does a busy wait to check the completion of the
> > encryption. I think it would be beter to use the interrupt. I will
> > look later.
> 
> I remember looking at that code sometime ago and that bit is really
> lame, so lame that I think they would do it in a different way if that
> was possible. Maybe it's worth contacting OpenBSD/NetBSD and ask?
> There might be a good reason for that.

Yes it seems strange, i've sent a mail to the author about this.
I've looked the Linux version of the driver and they use a busy wait
too.

[CUT]
 
> > - Any comment is welcome, this is my first work on a driver.
> 
> Looks good:) I can do a final review and commit once you are done and
> if I'll be able to start my Soekris and test it.

Thanks. I think it is ok for a review and test, i added the RNG stuff
since the last time and a manual page 'glxsb.4'

http://user.lamaiziere.net/patrick/glxsb.c
http://user.lamaiziere.net/patrick/glxsb.tar.gz (all the module)

Regards.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080608135846.45799105>