Howto: encfs unter Android nutzen

02 Sep 2011

Nach meinen bisherigen Anleitungen zur Installation von encfs unter Windows, Mac, Linux und FreeBSD fehlt noch der Zugriff von Android heraus.

<Update>Mit Cryptonite steht mittlerweile auch eine kostenlose und freie Software zur Nutzung von encfs unter Android zur Verfügung. Mehr dazu findet ihr im entsprechenden Beitrag hier im Blog.</Update>

In meinem Anwendungsfall fehlte mir bisher immer der Zugriff auf meine mit encfs verschlüsselten Daten in meiner Dropbox von meinem Android-Smartphone heraus. Nun hat die Firma Acomba UG für ihr Produkt Boxcryptor, welches ich schon einmal im Zusammenhang mit encfs unter Windows erwähnte, eine Android-Version veröffentlicht. Diese verbindet sich mit der eigenen Dropbox. Anschließend wählt man noch das verschlüsselte Verzeichnis aus und gibt das Passwort ein. Schon hat man direkten Zugriff auf das verschlüsselte Verzeichnis. Ging auf meinem betagten Android-Smartphone etwas langsam aber es hat auf Anhieb funktioniert. Mehr Informationen zur Nutzung gibt es im zugehörigen Blogeintrag.

Da Boxcryptor zwar auf encfs basiert aber nicht alle Features unterstützt, muss man spezielle Optionen bei der Erstellung eines entsprechenden encfs-Verzeichnisses setzen. Also verwendet man gleich die Boxcryptor-Software zum initialen Erstellen eines verschlüsselten Verzeichnisses und mountet das erstellte Verzeichnis anschließend wie gewohnt mit encfs. In dieser Richtung funktioniert die Einrichtung ohne Probleme.

Aber man hat ja nicht immer ein Windows bei der Hand. Deswegen hier kurz eine Anleitung zur Erstellung eines Boxcryptor-kompatiblen Verzeichnisses mit encfs.


Zuerst erstellen wir die entsprechenden Verzeichnisse und erzeugen dann daraus ein encfs-Verzeichnis.

oliver@d24m.de:~$ mkdir -p ~/Dropbox/sec ~/share
oliver@d24m.de:~$ encfs ~/Dropbox/sec/ ~/share

Anschließend werden die Optionen wie folgt gesetzt. Ich habe dafür die gesamte Prozedur aufgeführt und meine Antworten jeweils Fett markiert. Wem das zu lang ist, hier die Kurzform: 

  • x
  • 1
  • 256
  • 1024
  • 3
  • n0
  • no
  • no
  • 0
  • yes
  • yes

 

Hier nun das auführliche Listing:

Creating new encrypted volume.
Please choose from one of the following options:
enter "x" for expert configuration mode,
enter "p" for pre-configured paranoia mode,
anything else, or an empty line will select standard mode.
?> x
 
Manual configuration mode selected.
The following cipher algorithms are available:
1. AES : 16 byte block cipher
-- Supports key lengths of 128 to 256 bits
-- Supports block sizes of 64 to 4096 bytes
2. Blowfish : 8 byte block cipher
-- Supports key lengths of 128 to 256 bits
-- Supports block sizes of 64 to 4096 bytes
 
Enter the number corresponding to your choice: 1
 
Selected algorithm "AES"
 
Please select a key size in bits. The cipher you have chosen
supports sizes from 128 to 256 bits in increments of 64 bits.
For example:
128, 192, 256
Selected key size: 256
 
Using key size of 256 bits
 
Select a block size in bytes. The cipher you have chosen
supports sizes from 64 to 4096 bytes in increments of 16.
Or just hit enter for the default (1024 bytes)
 
filesystem block size: 1024
 
Using filesystem block size of 1024 bytes
 
The following filename encoding algorithms are available:
1. Block : Block encoding, hides file name size somewhat
2. Null : No encryption of filenames
3. Stream : Stream encoding, keeps filenames as short as possible
 
Enter the number corresponding to your choice: 3
 
Selected algorithm "Stream""
 
Enable filename initialization vector chaining?
This makes filename encoding dependent on the complete path,
rather then encoding each path element individually.
The default here is Yes.
Any response that does not begin with 'n' will mean Yes: no
 
Enable per-file initialization vectors?
This adds about 8 bytes per file to the storage requirements.
It should not affect performance except possibly with applications
which rely on block-aligned file io for performance.
The default here is Yes.
Any response that does not begin with 'n' will mean Yes: no
 
External chained IV disabled, as both 'IV chaining'
and 'unique IV' features are required for this option.
Enable block authentication code headers
on every block in a file? This adds about 12 bytes per block
to the storage requirements for a file, and significantly affects
performance but it also means [almost] any modifications or errors
within a block will be caught and will cause a read error.
The default here is No.
Any response that does not begin with 'y' will mean No: no
 
Add random bytes to each block header?
This adds a performance penalty, but ensures that blocks
have different authentication codes. Note that you can
have the same benefits by enabling per-file initialization
vectors, which does not come with as great of performance
penalty.
Select a number of bytes, from 0 (no random bytes) to 8: 0
 
Enable file-hole pass-through?
This avoids writing encrypted blocks when file holes are created.
The default here is Yes.
Any response that does not begin with 'n' will mean Yes: yes
 
Configuration finished. The filesystem to be created has
the following properties:
Filesystem cipher: "ssl/aes", version 3:0:2
Filename encoding: "nameio/stream", version 2:1:2
Key Size: 256 bits
Block Size: 1024 bytes
File holes passed through to ciphertext.
 
Now you will need to enter a password for your filesystem.
You will need to remember this password, as there is absolutely
no recovery mechanism. However, the password can be changed
later using encfsctl.
 
New Encfs Password: supersecret
Verify Encfs Password: supersecret

 

 Im erzeugten Verzeichnis habe ich eine entsprechende Datei erzeugt.

 oliver@d24m.de:~$ echo "boxcryptortest" > ~/share/test.txt

Diese Datei konnte ich mithilfe von Boxcryptor auf meinem Smartphone ohne Probleme lesen. Super! Endlich kann ich wichtige Dokumente sicher verschlüsselt über die Cloud syncen. Hach - du schöne neue Welt.

(via caschy | Kommentar)

android cloud encfs encryption howto mobile security sicherheit sync unix verschlüsselung windows
comments powered by Disqus