[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: scrypt: Decrypting file would require too much memory
On 10/16/15 01:06, Christoph Borsbach wrote:
> On Thu, Oct 15, 2015 at 13:33:30 -0700, Colin Percival wrote:
>> The relevant limits value is the datasize, not the stacksize. But to answer
>> your question, scrypt uses a large amount of memory -- the larger the better
>> -- to convert your passphrase into the key used for encryption; so this is
>> entirely independent of the amount of data you're processing.
>
> I have access to another OpenBSD System with 6 GB Ram. I cranked the datasize
> limit to ~5GB and still I get the same error:
>
> $ ulimit -a
> time(cpu-seconds) unlimited
> file(blocks) unlimited
> coredump(blocks) unlimited
> data(kbytes) 5316608
> stack(kbytes) 4096
> lockedmem(kbytes) 2026642
> memory(kbytes) 6078248
> nofiles(descriptors) 512
> processes 256
Hmm, I wonder why scrypt thinks you don't have enough memory then.
> Anyway, do I understand the -M option to scrypt correctly that if I use, say,
> -M 536870912 (512MB), on all of my machines, it should decrypt on all machines
> (that have a ulimit of 512MB or more) without error?
You'll need a slightly higher ulimit than that (since there is a small amount
of memory used by other things), but yes, if you use -M to set a reasonably
low limit everywhere then you should be fine. If that doesn't work on the
systems you've mentioned above, I definitely want to know.
--
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid