Re: [PATCH v1] crypto: driver for tegra AES hardware

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

 



On Wed, 16 Nov 2011 12:44:50 +0530
Varun Wadekar <vwadekar@xxxxxxxxxx> wrote:

> > That doesn't make the duplicate memset/copy cease to be redundant.
> >
> > Why not copy the key to where it goes, then memset the rest of the data;
> > wouldn't that be as simple as:
> >
> > memcpy(dd->ivkey_base, ctx->key, ctx->keylen);
> > memset(dd->ivkey_base + ctx->keylen, 0, AES_HW_KEY_TABLE_LENGTH_BYTES - ctx->keylen);
> 
> Seems like the same thing to me.

it's not - it saves writes.

> Kim is inclined towards removing the
> memset completely, which I think should not be done. We need the memset
> to clear the entire key table.

why do you need to clear the entire key table if it will be
overwritten anyway?

Kim

--
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