Re: [RFC PATCH crypto 4/4] AES-NI: Add support to Intel AES-NI instructions for x86_64 platform

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux