[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: scrypt: Decrypting file would require too much memory
On 10/15/15 00:38, Christoph Borsbach wrote:
> On Wed, Oct 14, 2015 at 21:53:21 -0700, Colin Percival wrote:
>> On 10/14/15 21:01, Christoph Borsbach wrote:
>>> On Wed, Oct 14, 2015 at 19:52:30 -0700, Colin Percival wrote:
>>>> How much memory does this system have? Did you encrypt the file on the same
>>>> system? If you encrypt a new file now, can you decrypt it? Has anything
>>>> changed on the system since you encrypted the file?
>>> The system has 2GB of memory and I can encrypt and decrypt new files just
>>> fine. But I traced my steps and I actually did the last encryption on another
>>> system: scrypt 1.2 on OSX. (I actually forgot that). So that might be it? It
>>> is still a bit strange that I can decrypt the file on Linux and scrypt 1.1.6.
>> How much memory did the OS X system have?
> 8 GB
Ok, this may just be a matter of the OS X box legitimately encrypting using
more memory than the OpenBSD box has, then.
>> # limits
> This command is also not available in OpenBSD,
Huh, I thought it was a shell builtin. Turns out that's only on csh...
> looking at /etc/login.conf I
> see :stacksize-cur=4M:\, which may be a bit low, as Dimitry already suggested.
> On the other hand, as the file is only 3kb, I doubt that so much memory is
> actually needed?
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.
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid