Re: [1/1 take 2] HIFN: preliminary HIFN 795x driver for new async cryptoapi.

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

 



On Mon, Jun 04, 2007 at 05:42:48PM +0400, Evgeniy Polyakov wrote:
> 
> take2:
>  * added a lot of cryptoapi interfaces (i.e. support for all crypto
>    modes and three ciphers: aes, des and 3des via cryptoapi).
>    
>    My cat has pissed on my domestic slippers when he saw that.
>    And believe me, he does know, how to distinguish between good and
>    other code. Well, I do not have a cat, but if I would, he would
>    definitely piss on my slippers. The most interesting stuff starts
>    from 1600+ lines. Herbert, are you sure it is ok?

Well I congratulate your imaginary cat because he's obviously seen
something fishy :)

> +static struct hifn_alg_template hifn_alg_templates[] = {
> +	{
> +		.name = "ecb(aes)", .drv_name = "hifn-aes", .bsize = 16, 
> +		.ablkcipher = {
> +			.min_keysize	=	AES_MIN_KEY_SIZE,
> +			.max_keysize	=	AES_MAX_KEY_SIZE,
> +			.setkey		=	hifn_setkey,
> +			.encrypt	=	hifn_encrypt_aes_ecb_16,
> +			.decrypt	=	hifn_decrypt_aes_ecb_16,
> +		},
> +	},

You don't have to repeat this for every key size, well not just yet.
If we get enough weird hardware in future that doesn't support all
of 16/24/32, then it might become necessary.

So for now you should reduce the 16/24/32 variants down to just one.

> +	{
> +		.name = "ecb(aes)", .drv_name = "hifn-aes", .bsize = 24, 

Even if we were doing different key sizes individually, it's not bsize
that needs changing but keysize.  The block size for AES is always 16.

I'll look over the rest of it next.

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