~ecryptfs/ecryptfs/trunk

« back to all changes in this revision

Viewing changes to doc/sourceforge_webpage/README

  • Committer: Dustin Kirkland
  • Date: 2009-02-13 15:57:24 UTC
  • Revision ID: kirkland@canonical.com-20090213155724-1q3qz2o0cbyimu9x
debian/ubuntu packaging

Initial checkin of the Debian/Ubuntu packaging

Signed-off-by: Dustin Kirkland <kirkland@canonical.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
eCryptfs: A stacked cryptographic filesystem for Linux
 
2
 
 
3
eCryptfs is free software. Please see the file COPYING for details.
 
4
For documentation, please see the files in the doc/ subdirectory.  For
 
5
building and installation instructions please see the INSTALL file.
 
6
 
 
7
Maintainer: Phillip Hellewell
 
8
Lead developer: Michael A. Halcrow <mhalcrow@us.ibm.com>
 
9
Developers: Michael C. Thompson
 
10
            Kent Yoder
 
11
            Trevor Highland
 
12
            Tyler Hicks
 
13
            Theresa Nelson
 
14
Current Release Version: 13
 
15
Web Site: http://ecryptfs.sf.net
 
16
 
 
17
As you should do with any filesystem, make sure to maintain a backup
 
18
copy of any data you write into eCryptfs.  In addition, you should
 
19
reliably store your secret keys in a secure location.  eCryptfs uses
 
20
industry-standard cryptographic ciphers, key generation, and
 
21
passphrase protection mechanisms; without your salt/passphrase or
 
22
private key, nobody will be able to retrieve your data.
 
23
 
 
24
eCryptfs requires the userspace tools downloadable from the
 
25
SourceForge site:
 
26
 
 
27
<http://sourceforge.net/projects/ecryptfs>
 
28
 
 
29
Requirements include:
 
30
 - Kernel version 2.6.19 or above
 
31
  - Build crypto API support with at least one symmetric key cipher
 
32
  - Build key retention support
 
33
  - If you have an older kernel, try the latest eCryptfs full package
 
34
    release to build a stand-alone kernel module
 
35
 - Userspace tools obtainable from the site listed above; requirements
 
36
   for the userspace tools are:
 
37
  - David Howells' userspace keyring headers and libraries (version
 
38
    1.0 or higher)
 
39
   - Finding its way into some distro's
 
40
   - Obtainable from <http://people.redhat.com/~dhowells/keyutils> 
 
41
  - libgcrypt
 
42
    - Part of most distro's; install the development package
 
43
    - If you need to build from source, you probably will want these:
 
44
     - <ftp://ftp.gnupg.org/gcrypt/libgpg-error>
 
45
     - <ftp://ftp.gnupg.org/gcrypt/libgcrypt>
 
46
 
 
47
 
 
48
KERNEL BUILD OPTIONS
 
49
 
 
50
Code maturity level options  --->
 
51
  [*] Prompt for development and/or incomplete code/drivers
 
52
 
 
53
Security options  --->
 
54
  <M> Enable access key retention support
 
55
 
 
56
Cryptographic options  --->
 
57
  <M>   MD5 digest algorithm
 
58
  <M>   AES cipher algorithms
 
59
 
 
60
File systems  --->
 
61
  Miscellaneous filesystems  --->
 
62
    <M> eCrypt filesystem layer support (EXPERIMENTAL)
 
63
 
 
64
 
 
65
NOTES
 
66
 
 
67
eCryptfs is still in a developmental stage. When you upgrade the
 
68
eCryptfs kernel module, it is possible that the eCryptfs file format
 
69
has been updated. For this reason you should copy your files to an
 
70
unencrypted location and then copy the files back into the new
 
71
eCryptfs mount point to migrate the files.
 
72
 
 
73
 
 
74
BUILD AND INSTALL INSTRUCTIONS
 
75
 
 
76
1) Consult the INSTALL file. In the majority of cases, this step
 
77
   should involve the standard procedure for Linux packages:
 
78
     % ./configure --prefix=/usr && make && make install
 
79
 
 
80
   If you are running a version of eCryptfs that ships as part of
 
81
   kernel version 2.6.18-rc6-mm2 or earlier, you need to pass the
 
82
   --enable-old-auth-tok option to the ./configure script.
 
83
 
 
84
2) Make sure that you have sysfs mounted and that a valid entry for
 
85
   the sysfs mount point is in your /etc/mtab file.
 
86
 
 
87
 
 
88
INTERACTIVE MOUNTING
 
89
 
 
90
Create a new directory into which eCryptfs will write its encrypted
 
91
files (i.e., /root/crypt).  Then, create the mount point directory
 
92
(i.e., /mnt/crypt).  Here is an example of how you might mount
 
93
eCryptfs:
 
94
 
 
95
mount -t ecryptfs /root/crypt /mnt/crypt
 
96
 
 
97
Note that you can also perform a layover mount (essentially,
 
98
converting an existing path into an eCryptfs mount point) to reduce
 
99
the likelihood of contention between eCryptfs and other applications
 
100
for access to the lower files; this is generally the recommended way
 
101
to mount eCryptfs:
 
102
 
 
103
mount -t ecryptfs /secret /secret
 
104
 
 
105
Navigate the menus to select your preferred mount options.
 
106
 
 
107
 
 
108
NON-INTERACTIVE MOUNTING
 
109
 
 
110
eCryptfs supports mounting through command-line options. You can do so
 
111
by passing groups of name=value attribute pairs as a -o option to the
 
112
mount helper.  Each key type has a set of name=value pairs associated
 
113
with it.  For instance, the ``passphrase'' key type can accept a
 
114
``passwd=XXX'' name=value pair and a ``salt=XXX'' name=value pair.
 
115
Attributes that apply to a particular key type immediately follow the
 
116
key type specifier ``key=XXX'' and are separated by colon's.
 
117
Attributes that do not apply to any specific key type (general
 
118
attributes) are separated by comma's.  The option string will take the
 
119
form:
 
120
 
 
121
 name1=value1,key=alias:name2=value2:name3=value3,name4=value4,name5=value5
 
122
 
 
123
name1=value1, name4=value4, and name5=value5 are all generic global
 
124
attributes that can apply to any key type.  name2=value2 and
 
125
name3=value3 are specific to the key type.
 
126
 
 
127
A BNF grammar for the option set follows:
 
128
 
 
129
<NULL> ::=
 
130
<letter> ::= (a | b | c | ... | z)
 
131
<letter-string> ::= <letter> (<letter-string> | <NULL>)
 
132
<character> ::= <any printable ASCII character that is not , or :>
 
133
<character-elem> ::= (<character> | <NULL>)
 
134
<character-string> ::= <character-elem> (<character-string> | <NULL>)
 
135
<name> ::= <letter-string>
 
136
<value> ::= <character-string>
 
137
<attr> ::= <name> "=" <value>
 
138
<comma-attr-list> ::= <attr> ("," <comma-attr-list> | <NULL>)
 
139
<colon-attr-list> ::= <attr> (":" <colon-attr-list> | <NULL>)
 
140
<key-attr-list> ::= "key=" <letter-string> (<colon-attr-list> | <NULL>)
 
141
<attr-list> ::= (<comma-attr-list> | <key-attr-list>)
 
142
<options-set> ::= <attr-list> (<attr-list> | <NULL>)
 
143
 
 
144
Values read from a file should be specified with name value pairs. For
 
145
example, a passphrase may be specified in a file by adding the following
 
146
line to the file:
 
147
 
 
148
passwd=<passphrase>
 
149
 
 
150
Currently supported aliases and attributes include:
 
151
 
 
152
 key alias passphrase:
 
153
     passwd=<passphrase>
 
154
     passfile=/path/to/file
 
155
     passfd=<file descriptor>
 
156
     passstdin (default)
 
157
     salt=<salt value>
 
158
 
 
159
 key alias openssl:
 
160
     keyfile=/path/to/key
 
161
     passwd=<passphrase>
 
162
     passfile=/path/to/file
 
163
     passfd=<file descriptor>
 
164
     passstdin (default)
 
165
 
 
166
Currently supported general attributes include:
 
167
 
 
168
 cipher=<cipher>
 
169
        Currently supported ciphers include:
 
170
         aes
 
171
         blowfish
 
172
         des3_ede
 
173
         cast5
 
174
         cast6
 
175
         twofish
 
176
 
 
177
 ecryptfs_key_bytes=<key bytes>
 
178
        With the exception of AES-192, eCryptfs requires that the
 
179
        keysize be a multiple of the block size.
 
180
 
 
181
 passthrough
 
182
        Allows for non-eCryptfs files to be read and written from within an
 
183
        eCryptfs mount. This option is disabled by default.
 
184
 
 
185
 verbosity=<value>
 
186
        0 eCryptfs will not prompt the user for unspecified options
 
187
        1 (default) eCryptfs will request unspecified options to be completed
 
188
 
 
189
 
 
190
If you wish to have the same passphrase used in previous passphrase
 
191
mounts and store it in a file (*not* recommended unless you can
 
192
provide sufficient protection of the file itself), you can take the
 
193
following steps:
 
194
 
 
195
(Previous mount; specify passphrase on command line)
 
196
mount -t ecryptfs /mnt/dev /mnt/dir -o key=passphrase:passwd=my_password
 
197
 
 
198
(Next mount; have passphrase read from a passfile)
 
199
echo "passwd=my_password" > ~/my_ecryptfs_password
 
200
mount -t ecryptfs /mnt/dev /mnt/dir -o key=passphrase:passfile=~/my_ecryptfs_password
 
201
 
 
202
Saving your unencrypted passphrase to a file on the same disk that
 
203
contains your encrypted files defeats the purpose of using a
 
204
cryptographic filesystem in the first place.  You should instead store
 
205
the file that contains your passphrase on a physically secure medium,
 
206
such as a USB flash drive that you keep locked in a drawer, if you
 
207
choose to store it to a file at all.
 
208
 
 
209
In general, it is probably best to just type in your passphrase via
 
210
stdin every time you need to perform a mount.  Future versions of
 
211
eCryptfs will allow hardware token devices, such as a TPM chip, to
 
212
protect your secret keys.
 
213
 
 
214
 
 
215
TESTING A NEW MOUNT POINT
 
216
 
 
217
Try writing a new file:
 
218
 
 
219
echo "Hello, World" > /secret/hello.txt
 
220
 
 
221
The operation will complete.  When you unmount eCryptfs, you will
 
222
Notice that there is a new file in /secret that is at least 12288
 
223
bytes in size (depending on your host page size).  This is the
 
224
encrypted underlying file for what you just wrote.  To test reading,
 
225
from start to finish, you need to clear the user session keyring:
 
226
 
 
227
keyctl clear @u
 
228
 
 
229
Then umount /secret and mount again per the instructions given above.
 
230
 
 
231
cat /secret/hello.txt
 
232
 
 
233
 
 
234
PAM MODULE
 
235
 
 
236
You can use the PAM module to automatically use a key based on your
 
237
login passphrase, which can then be used to perform an eCryptfs mount
 
238
non-interactively.
 
239
 
 
240
Perform an eCryptfs mount as root, using your user login:
 
241
 
 
242
root# mount -t ecryptfs /secret /secret
 
243
 
 
244
Then, grab your raw mount parameters from 
 
245
 
 
246
root# grep "ecryptfs" /etc/mtab
 
247
 
 
248
You should get something like this:
 
249
 
 
250
---
 
251
/secret /secret ecryptfs rw,ecryptfs_sig=deadbeefdeadbeef,ecryptfs_key_bytes=16,ecryptfs_cipher=aes 0 0
 
252
---
 
253
 
 
254
Add ``user'' to the mount options:
 
255
 
 
256
---
 
257
/secret /secret ecryptfs user,rw,ecryptfs_sig=deadbeefdeadbeef,ecryptfs_key_bytes=16,ecryptfs_cipher=aes 0 0
 
258
---
 
259
 
 
260
Append your edited line to your /etc/fstab file. Now it's time to test
 
261
the mount.
 
262
 
 
263
root# umount /secret
 
264
 
 
265
Verify that eCryptfs is not mounted. Then, log in as the regular
 
266
user. Manually add your passphrase to the user session keyring via the
 
267
ecryptfs-manager utility. Then, perform the mount, while telling the
 
268
mount application to not call the mount helper:
 
269
 
 
270
user# mount -i /secret
 
271
 
 
272
Verify that eCryptfs mounted correctly. Then, unmount:
 
273
 
 
274
user# umount /secret
 
275
 
 
276
Clear your user session keyring:
 
277
 
 
278
user# keyctl clear @u
 
279
 
 
280
Add the mount command into your login script (e.g., ~/.bash_profile):
 
281
 
 
282
---
 
283
mount -i /secret
 
284
---
 
285
 
 
286
Finally, add this to the appropriate /etc/pam* file (e.g.,
 
287
/etc/pam.d/login):
 
288
 
 
289
---
 
290
auth required pam_ecryptfs.so
 
291
---
 
292
 
 
293
From another window, try logging in as the user. If all went well, the
 
294
eCryptfs PAM module will insert a key derived from your login
 
295
passphrase into the user session keyring. Then, the login script will
 
296
perform the mount, using the parameters in your /etc/fstab.
 
297
 
 
298
 
 
299
NOTES
 
300
 
 
301
eCryptfs shipping in kernel version 2.6.19 does not support public
 
302
key.  To determine what your current kernel supports, load the
 
303
ecryptfs module and view the contents of fs/ecryptfs/version_str under
 
304
your sysfs mount point.
 
305
 
 
306
eCryptfs should only be mounted on (1) empty directories or (2)
 
307
directories containing files only created by eCryptfs. If you mount a
 
308
directory that has pre-existing files not created by eCryptfs, then
 
309
behavior is undefined. Do not run eCryptfs in higher verbosity levels
 
310
unless you are doing so for the sole purpose of development, since
 
311
secret values will be written out to the system log in that case.
 
312
 
 
313
 
 
314
TROUBLESHOOTING
 
315
 
 
316
See <doc/ecryptfs-faq.html>. For the most up-to-date FAQ, see
 
317
<http://ecryptfs.sourceforge.net/ecryptfs-faq.html>.
 
318
 
 
319
 
 
320
BUGS
 
321
 
 
322
Please send bug reports to the lead developer, an eCryptfs mailing
 
323
list hosted from SourceForge, or to the SourceForge bug tracker for
 
324
the eCryptfs project. For kernel bugs, please follow the procedure
 
325
detailed in the kernel documentation (Documentation/oops-tracing.txt)
 
326
to help us figure out what is happening.
 
327
 
 
328
 
 
329
Mike Halcrow
 
330
mhalcrow@us.ibm.com