AMD Geode LX crypto accelerator (glxsb)

Patrick Lamaiziere patfbsd at
Sun Jun 8 11:58:50 UTC 2008

Le Sat, 7 Jun 2008 06:18:55 +0200,
Pawel Jakub Dawidek <pjd at> 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

$ 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

> > - 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' (all the module)


More information about the freebsd-hackers mailing list