CyberChef icon indicating copy to clipboard operation
CyberChef copied to clipboard

Fletcher's Checksum algorithm implementation looks wrong

Open viniciusvillas opened this issue 4 years ago • 1 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.

viniciusvillas avatar Feb 10 '22 13:02 viniciusvillas

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

mikecat avatar Feb 15 '22 23:02 mikecat