mirror of
https://git.sr.ht/~sircmpwn/mkproof
synced 2024-05-08 19:06:09 +02:00
Set .version field in the Argon2 context
I couldn't get my own, independent mkproof implementation to match outputs. After some debugging, I discovered this is because mkproof implicitly uses 0 for its Argon2 version number. As a result, mkproof's actual KDF is something unique, slightly different from Argon2id. Of course, challenges generated before this patch will be incompatible with proofs created after this patch, so perhaps it's too late to correct? On the other hand, most Argon2 libraries hardcode the version number, so leaving it creates serious challenges for alternative implementations.
This commit is contained in:
parent
7de01c930f
commit
14cfc3f783
|
@ -65,6 +65,7 @@ main(int argc, char *argv[])
|
|||
.lanes = 1,
|
||||
.threads = 1,
|
||||
.flags = ARGON2_DEFAULT_FLAGS,
|
||||
.version = ARGON2_VERSION_NUMBER,
|
||||
};
|
||||
|
||||
die(1, strlen(argv[2]) != 32, "Invalid proof");
|
||||
|
|
|
@ -66,6 +66,7 @@ main(int argc, char *argv[])
|
|||
.lanes = 1,
|
||||
.threads = 1,
|
||||
.flags = ARGON2_DEFAULT_FLAGS,
|
||||
.version = ARGON2_VERSION_NUMBER,
|
||||
};
|
||||
|
||||
if (isatty(STDERR_FILENO)) {
|
||||
|
|
Loading…
Reference in New Issue