Re: [PATCH v4 1/1] use crc32 instead of md5 for hibernation e820 integrity check

From: Chris von Recklinghausen
Date: Fri Apr 09 2021 - 15:28:35 EST


On 4/9/21 12:56 PM, David Laight wrote:
From: Chris von Recklinghausen
Sent: 08 April 2021 11:46

Suspend fails on a system in fips mode because md5 is used for the e820
integrity check and is not available. Use crc32 instead.

Prior to this patch, MD5 is used only to create a digest to ensure integrity of
the region, no actual encryption is done. This patch set changes the integrity
check to use crc32 instead of md5 since crc32 is available in both FIPS and
non-FIPS modes.

Note that the digest is only used as an integrity check. No actual encryption
is done.
If crc32 is good enough, would a 1's compliment sum be good enough?
It is likely to be faster to calculate and not need special
functions be built into the kernel at all.


Eric Biggers <ebiggers@xxxxxxxxxx> suggested using crc32_le() which is in the library interface (lib/crc32.c) and will always be available without any special ifdefs. That's what my next version will be based on.

Thanks,

Chris



David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)