Skip to content

Bug report: Argon2 salts do not match between input and hash output #1881

@echec-et-math

Description

@echec-et-math

Describe the bug
Entering a salt in hex or base64 for Argon2 results in a hash with a different salt.

To Reproduce

  1. Compute any Argon2 hash
  2. Setup any hexadecimal or base64 salt and specify the adequate encoding
  3. In the case of an hexadecimal salt, manually convert it to base64, since Argon2 outputs always display the salt in base64.
  4. Compare the salts : they do not match.

Link to reproduce

Expected behaviour
The salt from the input and the output should be the same.

Desktop :

  • OS: Debian 12
  • Browser: Firefox 115.14.0esr (64 bits)
  • CyberChef version: 10.19.2

Additional context
Tweaking the parameters, salt size, salt base64 '=' padding does nothing significant.

However, using specific salts, sometimes the first bytes of the salts do match, and then look nothing alike : Link to reproduce

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