Skip to content

Bug report: HMAC incorrectly parses decimal key input #2139

@cross-of-north

Description

@cross-of-north

Describe the bug
As far as I understand, "Latin1" key "AA" for HMAC recipe should give result equal to the "Decimal" key "65 65". Currently this is not so.

To Reproduce
These URLs display "4e9483c3335f395a11f5a21df8497daa3206ee9e9a5cbadaaad7161497bf0c8a" which is correct:
https://gchq.github.io/CyberChef/#recipe=HMAC(%7B'option':'Latin1','string':'AA'%7D,'SHA256')&input=QQ&oenc=65001&ieol=FF&oeol=FF
https://gchq.github.io/CyberChef/#recipe=HMAC(%7B'option':'Hex','string':'41%2041'%7D,'SHA256')&input=QQ&oenc=65001&ieol=FF&oeol=FF

This URLs displays "ff333794c5afd126a4e75aef1a35595a846e9e1d4053017d78d7aa3d8373182a" which is not correct:
https://gchq.github.io/CyberChef/#recipe=HMAC(%7B'option':'Decimal','string':'65%2065'%7D,'SHA256')&input=QQ&oenc=65001&ieol=FF&oeol=FF

Expected behaviour
I expect that either "Decimal" won't show as a possible key format, or would yield a correct result.

Desktop

  • OS: Windows
  • Browser: Chrome 142.0.7444.135
  • CyberChef version: Version 10.19.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions