Skip to content

Supports all algorithms and versions of Argon2 #612

@sorairolake

Description

@sorairolake

Checklist

  • I have searched the existing issues

Summary

The resistance of Argon2id against GPU/ASIC attacks is somewhat weaker than Argon2d.1

Argon2d provides the best resistance against GPU/ASIC attacks. The resistance of Argon2id against GPU/ASIC attacks is somewhat weaker, but Argon2id additionally makes certain side-channel attacks slightly harder.

I think it would be better to also be able to choose the version. Currently available versions are 0x10 and 0x13 (latest). By allowing users to choose the version, it's possible to respond even when new versions are added.

Based on the reference implementation, I think the size of the version should be 4 bytes (u32). In this case, I think the size of the algorithm should also be 4 bytes (u32). Because the size of the header is divisible by 4.

I think these values ​​should be inserted between the version number of the file format and the parameters.

Offset Bytes Description
$7$ $1$ Version number.
$8$ $4$ Variant of Argon2.
$12$ $4$ Version of Argon2.
$16$ $4$ Memory size m (memoryCost).

This change requires a change to the version number of the file format.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Footnotes

  1. https://keepass.info/help/base/security.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions