argonautica icon indicating copy to clipboard operation
argonautica copied to clipboard

Memory parameter has to be a power of 2

Open fkorax opened this issue 5 years ago • 1 comments

Why does the parameter for configure_memory_size() have to be a power of 2? It doesn't have to be in other implementations, e.g. argon2 for Haskell.

fkorax avatar Apr 24 '19 07:04 fkorax

Good question; the Argon2 spec states “Memory size m can be any integer number of kilobytes from 8p to 2³²−1. The actual number of blocks is m′, which is m rounded down to the nearest multiple of 4p” (where p is the degree of parallelism).

nbraud avatar Jul 07 '19 19:07 nbraud