[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scrypt: Decrypting file would require too much memory



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
 
> Also, on the OpenBSD system, what do these output?
> # sysctl hw.usermem

hw.usermem=2130681856

> # sysctl hw.memsize

That's not available in OpenBSD, but hw.physmem gives:
hw.physmem=2130698240

> # limits

This command is also not available in OpenBSD, 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?

To narrow the issue down, I compiled scrypt-1.2 on OpenBSD, it gives the same
error. I also enc'ed another file on OSX, copied it over to OpenBSD, and it
gives the same error with both 1.1.6 and 1.2. On Linux and 1.1.6, the new
testfile also decrypts fine. 

Thanks!

Christoph