Re: [PATCH] SoC: cros_ec_codec: switch to library API for SHA-256

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

 



On Fri, May 15, 2020 at 2:04 PM Ard Biesheuvel <ardb@xxxxxxxxxx> wrote:
> > > > Looking at the code, I was wondering if the SHA-256 is really required
> > > > here? It looks like it is using it as some kind of fingerprint to decide
> > > > whether the provided file is identical to the one that has already been
> > > > loaded. If this is the case, we should probably just use CRC32 instead.
> >
> > No, the binary blob carries data and possibly code.  We are not only
> > using the hash as a fingerprint but also an integrity check.
> >
>
> But does it have to be cryptographically strong? Why is CRC32 not sufficient?

Please see https://crrev.com/c/1490800/26/include/ec_commands.h#4744
for our original decision.

Also would like to let you know that the data path to call
calculate_sha256( ) is in-frequent (1~2 times) if you think it is too
expensive to use SHA256.



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux