On Sun 12/01/2020 15:38, Björn Ketelaars wrote: > On Thu 02/01/2020 06:27, Björn Ketelaars wrote: > > On Wed 01/01/2020 23:03, Ted Unangst wrote: > > > Björn Ketelaars wrote: > > > > - When estimating the amount of available RAM, scrypt ignores > > > > RLIMIT_DATA on systems which have mmap. > > > > > > This is wrong on OpenBSD. I sent an email to Colin, but the update should > > > patch this out in the meantime. > > > > Although I'm not doubting that you are right, I fail to understand why > > ignoring RLIMIT_DATA on OpenBSD is bad. Could you explain why? > > > > I prepared a patch, which: > > - addresses ignoring RLIMIT DATA, reverting > > > > https://github.com/Tarsnap/scrypt/commit/2b478e7ce590a6564d89417ddad4f3dd4bbdcaf6 > > - fixes compiling on base-gcc archs (found by kmos@) > > > > OK? > > Ping...
Oops, forgot to mention the following: Following https://github.com/Tarsnap/scrypt/issues/226: Without patch: $ ulimit -d 123456 $ scrypt enc -v Makefile Makefile.enc Please enter passphrase: Please confirm passphrase: Parameters used: N = 262144; r = 8; p = 1; This requires at least 268 MB bytes of memory (995 MB available), and will take approximately 0.4 seconds (limit: 5.0 seconds). scrypt: Error computing derived key: Cannot allocate memory With patch: $ ulimit -d 123456 $ scrypt enc -v Makefile Makefile.enc Please enter passphrase: Please confirm passphrase: Parameters used: N = 8192; r = 8; p = 48; This requires at least 8.3 MB bytes of memory (15 MB available), and will take approximately 0.6 seconds (limit: 5.0 seconds).