gchq / CyberChef

The Cyber Swiss Army Knife - a web app for encryption, encoding, compression and data analysis

Home Page:https://gchq.github.io/CyberChef

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fletcher's Checksum algorithm implementation looks wrong

viniciusvillas opened this issue · comments

Describe the bug
The Fletcher's Algorithm results does not match the validation values that can be found in the Wikipedia article about the algorithm (I validated by implementing the algorithm myself) for Fletcher-32 and Fletcher-64.

Steps To Reproduce
Just use the Fletcher-32 and Fletcher-64 for the input "abcdefgh".

Expected behaviour
The Fletcher-32 for "abcdefgh" should be 3957429649 (0xEBE19591).
The Fletcher-64 for "abcdefgh" should be 3543817411021686982 (0x312E2B28CCCAC8C6).

Screenshots
I don't think it's needed. Please let me know if it's needed.

Desktop (if relevant, please complete the following information):

  • OS: Windows 10
  • Browser: Edge (Chromium)
  • CyberChef version: 9.32.3 (current online version)

Additional context
Please let me know if additional context is needed.

Hmmm, it looks like each bytes are added instead of 16-bit or 32-bit blocks as specified in Wikipedia.

From Hex, Fletcher-32 Checksum - CyberChef