From: valerij zaporogeci <vlrzprgts@gmail.com>
To: edk2-devel <edk2-devel@lists.01.org>
Subject: Re: Crc32
Date: Thu, 1 Sep 2016 02:27:54 +0300 [thread overview]
Message-ID: <CANPuzFxGeZ_g2Zg7u-E1BgbCVJhqjL=TF0_yL8JCMUUj0pWmeQ@mail.gmail.com> (raw)
In-Reply-To: <CANPuzFyV=GmQ74-L5Ui09KczBQXfPz4NXA3XMSkve4muY78ciQ@mail.gmail.com>
>> 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.
next prev parent reply other threads:[~2016-08-31 23:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-30 0:54 Crc32 valerij zaporogeci
2016-08-30 11:08 ` Crc32 Michael Zimmermann
2016-08-30 13:32 ` Crc32 valerij zaporogeci
2016-08-30 14:09 ` Crc32 Andrew Fish
2016-08-30 15:17 ` Crc32 valerij zaporogeci
2016-08-30 16:15 ` Crc32 Andrew Fish
2016-08-31 1:11 ` Crc32 valerij zaporogeci
2016-08-31 3:54 ` Crc32 Michael Zimmermann
2016-08-31 14:31 ` Crc32 valerij zaporogeci
2016-08-31 23:27 ` valerij zaporogeci [this message]
2016-09-01 22:36 ` Crc32 valerij zaporogeci
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CANPuzFxGeZ_g2Zg7u-E1BgbCVJhqjL=TF0_yL8JCMUUj0pWmeQ@mail.gmail.com' \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox