>> I was thinking that all the difference in the Tianocore impl. from the
>> pure crc is appending 32 1's at the beginning of the (input) message
>> and then negating the Crc itself in the end.

Thank you, Michael and Andrew for your help. I figured out what causes
the difference.
Apart from initializing crc with ffffffff at the beginning and
negating the resulting crc at the end, the difference is that
Tianocore impl. reverses bits in the byte sequence (of the input),
thus bit 7 of every byte becomes bit 0 and bit 0 - bit 7. And also in
the end, resulting Crc is also reverted bitwise (bit 31->0, 0->31).
Not that I understood everything, but applying these inversions into
the pure remainder calculation, gives matching with the Tianocore
function results.
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to