CRC-32 hash tutorial

Helpful script writing tricks and HowTo's
User avatar
jeeswg
Posts: 2650
Joined: 19 Dec 2016, 01:58
Location: UK

CRC-32 hash tutorial

09 Aug 2017, 17:20

The mathematics of CRC-32:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



==================================================

Some scripts/functions for 'CRC division' and calculating CRC-32 hashes:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



==================================================

BEST LINKS:

crc_v3.txt
http://www.ross.net/crc/download/crc_v3.txt
get CRC-32 hash value, read file in chunks - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=31329
CRC-32 - Rosetta Code
https://rosettacode.org/wiki/CRC-32#AutoHotkey
CRC32 algorithm/implementation in C without a look up table and with a public license - Stack Overflow
https://stackoverflow.com/questions/21001659/crc32-algorithm-implementation-in-c-without-a-look-up-table-and-with-a-public-li
crc.c.txt
http://www.hackersdelight.org/hdcodetxt/crc.c.txt
How to calculate CRC32 by hand? – An Integrated World
https://www.anintegratedworld.com/how-to-calculate-crc32-by-hand/

==================================================

LINKS:

[example calculations]
crc_v3.txt
http://www.ross.net/crc/download/crc_v3.txt
Sunshine's Homepage - Understanding CRC
http://www.sunshine2k.de/articles/coding/crc/understanding_crc.html
How to calculate CRC32 by hand? – An Integrated World
https://www.anintegratedworld.com/how-to-calculate-crc32-by-hand/

[dll function]
Wine API: RtlComputeCrc32
https://source.winehq.org/WineAPI/RtlComputeCrc32.html

[algorithms / AutoHotkey code]
get CRC-32 hash value, read file in chunks - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=31329
CRC-32 - Rosetta Code
https://rosettacode.org/wiki/CRC-32#AutoHotkey
AHK_Scripts/CRC32.ahk at master · jNizM/AHK_Scripts · GitHub
https://github.com/jNizM/AHK_Scripts/blob/master/src/hash_checksum/CRC32.ahk#L2
CRC32 algorithm/implementation in C without a look up table and with a public license - Stack Overflow
https://stackoverflow.com/questions/21001659/crc32-algorithm-implementation-in-c-without-a-look-up-table-and-with-a-public-li
crc.c.txt
http://www.hackersdelight.org/hdcodetxt/crc.c.txt
[pdf appendix contains algorithms]
SAR-PR-2006-05.pdf
http://stigge.org/martin/pub/SAR-PR-2006-05.pdf
Calculating 32-bit CRCs (CRC-32)
http://mdfs.net/Info/Comp/Comms/CRC32.htm

[online solver]
On-line CRC calculation and free library
https://www.lammertbies.nl/comm/info/crc-calculation.html

[other hashes: information about other hashing algorithms e.g. MD5 and SHA-1]
MD5 - Scripts and Functions - AutoHotkey Community
https://autohotkey.com/board/topic/16409-md5/
SHA: Secure Hashing Algorithm - Computerphile - YouTube
https://www.youtube.com/watch?v=DMtFhACPnTY
EXTRA BITS - SHA1 Problems - Computerphile - YouTube
https://www.youtube.com/watch?v=f8ZP_1K2Y-U
Hashing Algorithms and Security - Computerphile - YouTube
https://www.youtube.com/watch?v=b4b8ktEV4Bg

[Stack Exchange discussions]
c - How is a CRC32 checksum calculated? - Stack Overflow
https://stackoverflow.com/questions/2587766/how-is-a-crc32-checksum-calculated
algorithm design - How do I calculate CRC32 mathematically? - Cryptography Stack Exchange
https://crypto.stackexchange.com/questions/3367/how-do-i-calculate-crc32-mathematically
c# - Is there a built-in function to reverse bit order - Stack Overflow
https://stackoverflow.com/questions/3587826/is-there-a-built-in-function-to-reverse-bit-order

==================================================

SOME OTHER 'HOW DOES IT WORK?' QUESTIONS:

How does a PC work?
Charles Petzold - Code

How do txt files work?
ANSI: 1 byte per character (0-255).
UTF-8: 1 byte per character (0-127, ASCII). 2 bytes per character (128-2047). 3 bytes per character (4096-65535).
UTF-16: 2 bytes per character (0-65535).
Note: where ANSI 128-255 ('extended ASCII') is often similar to, but not exactly the same as, Unicode 128-255, and where ANSI 128-255 varies depending on the codepage.

How do bmp files work?
graphics: create bmp files from scratch - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=34952

How do wav files work?
create wav files from scratch (draw a wav file) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=34584

How do file hashes work?
CRC-32 hash tutorial - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=7&t=35671

Return to “Tutorials”

Who is online

Users browsing this forum: No registered users and 5 guests