Argon2 Algorithm in PHP7: understanding the time_cost parameter Argon2 Algorithm in PHP7: understanding the time_cost parameter php php

Argon2 Algorithm in PHP7: understanding the time_cost parameter


From what I can tell, it's the number of iterations in the ARGON2 algo.

If you track it back through the PHP source, you get

https://github.com/php/php-src/blob/master/ext/standard/password.c#L528

which calls

https://github.com/P-H-C/phc-winner-argon2/blob/master/src/argon2.c#L67

So here, t_cost maps to the number of passes ^

Also note:

See https://password-hashing.net/submissions/specs/Argon-v3.pdf - 2.1.1 - Inputs:Number of iterations t can be any integer number from 1 to 232 − 1