Doc #76290 [NEW]: Wrong info in argon2i memory_cost

From: Date: Mon, 30 Apr 2018 15:45:45 +0000
Subject: Doc #76290 [NEW]: Wrong info in argon2i memory_cost
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-15632@lists.php.net to get a copy of this message
From: redir1 at npn dot fi Operating system: N/A PHP version: 7.2.5 Package: Documentation problem Bug Type: Documentation Problem Bug description:Wrong info in argon2i memory_cost Description: ------------ --- From manual page: http://www.php.net/function.password-hash --- The manual page says: "memory_cost (integer) - Maximum memory (in bytes) that may be used to compute the Argon2 hash. Defaults to PASSWORD_ARGON2_DEFAULT_MEMORY_COST." The memory in reality is in kilobytes, not bytes. Confirmed by testing the memory usage, execution speed and also by reading the source code. Test script: --------------- password_hash('passu', PASSWORD_ARGON2I, [ 'memory_cost' => 1024 * 1024, // According to documentation, should be 1MB 'time_cost' => 4, 'threads' => 2, ]); Expected result: ---------------- Check the memory usage of the script. It's 1GB. Actual result: -------------- Memory usage should not be a lot more than 1MB. -- Edit bug report at https://bugs.php.net/bug.php?id=76290&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76290&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76290&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76290&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=76290&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=76290&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=76290&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=76290&r=needscript Try newer version: https://bugs.php.net/fix.php?id=76290&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=76290&r=support Expected behavior: https://bugs.php.net/fix.php?id=76290&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=76290&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=76290&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=76290&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76290&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=76290&r=dst IIS Stability: https://bugs.php.net/fix.php?id=76290&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=76290&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=76290&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=76290&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=76290&r=mysqlcfg

« previous php.doc.bugs (#15632) next »