-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
raspberry pi 3: out of memory when decrypting the master key #400
Comments
Hi, that's interesting. Master key decryption should only use 64MB of RAM, regardless of password length. Does a shorter password really fix this? |
Yes, cutting down in half the password will make it run flawlessly.
Tomorrow I will do some tests slowly decreasing the password length to see
how gocryptfs responds and then I will post the results :-)
|
One more idea: you have compiled with a pretty old Go version, go1.7.4, can you try again with this, compiled with go1.12 ? gocryptfs_v1.7-33_arm.zip |
Thank you for the more recent build, it runs without errors but it does not mount anything:
I noticed that if re-initializing the folder on the rpi3 with the same password then everything goes well, but if I try to mount it using the original config file created on a x64 linux PC then it goes OOM... so it seems the problem is config related. So I initialized some folders on the rpi3 and checked the differences versus the x64 config file, I discovered (ignoring I think the higher |
Yes, the N value explains it. So the question is: where does 1048576 come from? What is your gocryptfs version on x64? |
At that time I initialized the folder with gocryptfs v1.6.1. What should I do now? Have I to reinitialize all folders? |
When you created it on x64, did you pass
? 2^20 = 1048576, so this is how you would get that value. |
Grab the latest version from git (commit 991adfc ), then change your password like this:
You can use the same password again. This will set scryptn=16, which is the default value, and then it will use 64MB. |
I do not remember now but I must have used the `-scryptn 20` option 😱
Thank you for unveiling this mystery and for the very useful command to
change the password 😊
… |
Interesting riddle ;) |
Hello,
thank you for this wonderful software :)
I encountered a problem using it on a raspberry pi 3: using a password 68 characters long with 23 unique characters, gocryptfs goes out of memory when decrypting the master key, it wants to allocate 1GiB but the rpi3 has not enough memory.
I tried adding a big swapfile but it still fails to allocate the memory. :'(
Is it possible to workaround this problem or the only solution left is shortening the length of the password?
The text was updated successfully, but these errors were encountered: