lkml.org 
[lkml]   [2009]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH crypto 4/4] AES-NI: Add support to Intel AES-NI instructions for x86_64 platform
On Mon, Jan 05, 2009 at 10:02:27AM +0800, Huang Ying wrote:
>
> - Rename file name and function name to aesni_<xx>
>
> - Move to arch/x86/crypto.
>
> - ECB and CBC modes are implemented in parallel style to take
> advantage of pipelined hardware implementation.
>
> - AES key scheduling algorithm is re-implemented with higher
> performance.

Thanks this is all good.

> - ablkcipher asynchronous machanism is used to delay a crypto request
> to work queue context upon FPU state is using by other kernel
> context.

Actually I was thinking of something as simple as just using
cryptd as is. That is, register a blkcipher algorithm for your
version of cbc-aes, but don't register under the name cbc(aes),
e.g., register it under the name of __cbc-aes-aesni for both alg
name and driver name. You can register it under cbc(aes) too
if you add the fallback in there.

Then for the real thing, just allocate the blkcipher __cbc_*,
plus the ablkcipher cryptd(__cbc_*), and invoke the right one
depending on caller context.

This is even simpler for the modes which you don't implement.
In that case you would just allocate FOO(aes-aesni) in conjunction
with cryptd(FOO(aes-aesni)).

Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


\
 
 \ /
  Last update: 2009-01-09 08:05    [W:0.099 / U:1.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site