Tested on:Raspbian Jessie; Kivy; RPi B+, RPi 2
Prerequisites:Raspberry Pi with Raspbian Jessie and internet connection (see steps 1-7 in the Introduction)
0

Protect your data: directory encryption on a Raspberry Pi with ecryptfs

EcryptFS is a widely used tool for disk encryption under Linux. It is perfect for protecting data on a Raspberry Pi. The method described here is very basic and does nothing more than preventing read access to a specific directory if that directory was not mounted with a passphrase.

EcryptFS installation
First, update the software repositories and install ecryptfs with

Create an encrypted directory
Think of a good PASSWORD, then perform these steps:

Answer both questions asked with yes. ~/secret is the directory used for encryption.

Check the encryption
With the directory still being mounted, create a test file with

enter “test” and display it with

which will show “test”.
After unmounting the directory with

trying to display the file content like above just shows characters in machine language. Use the same mount command used for creating the encrypted directory for remounting (decyphering) the content on the Raspberry Pi again.
Check out the Bodhizazen EcryptFS Tutorial for much more info, e.g. how to store the password on an USB stick.

Links
Bodhizazen EcryptFS Tutorial: http://bodhizazen.net/Tutorials/Ecryptfs

Knight of Pi

Johannes Bergs aka Knight of Pi. Diploma in Bioinformatics, some Webdesign and Python coding then. Living in the beautiful city of Vienna.

Comment

Time limit is exhausted. Please reload CAPTCHA.