Rename to crypsetup-reencrypt.
[platform/upstream/cryptsetup.git] / man / cryptsetup-reencrypt.8
1 .TH CRYPTSETUP-REENCRYPT "8" "June 2012" "cryptsetup-reencrypt" "Maintenance Commands"
2 .SH NAME
3 cryptsetup-reencrypt - tool for offline LUKS device re-encryption
4 .SH SYNOPSIS
5 .B cryptsetup-reencrypt <options> <device>
6 .SH DESCRIPTION
7 .PP
8 Cryptsetup-reencrypt can be used to change reencryption parameters
9 which otherwise require full on-disk data change (re-encryption).
10
11 You can regenerate \fBvolume key\fR (the real key used in on-disk encryption
12 unclocked by passphrase), \fBcipher\fR, \fBcipher mode\fR.
13
14 Cryptsetup-reencrypt reencrypts data on LUKS device in-place. During
15 reencryption process the LUKS device is marked unavailable.
16
17 \fIWARNING\fR: The cryptsetup-reencrypt program is not resistant to hardware
18 or kernel failures during reencryption (you can lose you data in this case).
19
20 \fIALWAYS BE SURE YOU HAVE RELIABLE BACKUP BEFORE USING THIS TOOL.\fR
21 .br
22 \fITHIS TOOL IS EXPERIMENTAL.\fR
23
24 The reencryption can be temporarily suspended (by TERM signal or by
25 using ctrl+c) but you need to retain temporary files named LUKS-<uuid>.[log|org|new].
26 LUKS device is unavailable until reencryption is finished though.
27
28 For more info about LUKS see cryptsetup(8).
29 .PP
30 .SH OPTIONS
31 .TP
32 To start (or continue) re-encryption for <device> use:
33 .PP
34 \fIcryptsetup-reencrypt\fR <device>
35
36 \fB<options>\fR can be [\-\-block-size, \-\-cipher, \-\-hash, \-\-iter-time,
37 \-\-use-random | \-\-use-urandom, \-\-key-file, \-\-key-slot, \-\-keyfile-offset,
38 \-\-keyfile-size, \-\-tries, \-\-use-directio, \-\-use-fsync, \-\-write-log]
39
40 For detailed description of encryption and key file options see \fIcryptsetup(8)\fR
41 man page.
42 .TP
43 .B "\-\-verbose, \-v"
44 Print more information on command execution.
45 .TP
46 .B "\-\-debug"
47 Run in debug mode with full diagnostic logs. Debug output
48 lines are always prefixed by '#'.
49 .TP
50 .B "\-\-cipher, \-c" \fI<cipher-spec>\fR
51 Set the cipher specification string.
52 .TP
53 .B "\-\-hash, \-h \fI<hash-spec>\fR"
54 Specifies the hash used in the LUKS key setup scheme and volume key digest.
55 .TP
56 .B "\-\-iter-time, \-i \fI<milliseconds>\fR"
57 The number of milliseconds to spend with PBKDF2 passphrase processing for the
58 new LUKS header.
59 .TP
60 .B "\-\-use-random"
61 .TP
62 .B "\-\-use-urandom"
63 Define which kernel random number generator will be used to create the volume key.
64 .TP
65 .B "\-\-key-file, \-d \fIname\fR"
66 Read the passphrase from file.
67 .br
68 WARNING: \-\-key-file option can be used only if there only one active keyslot,
69 or alternatively, also if \-\-key-slot option is specified (then all other keyslots
70 will be disabled in new LUKS device).
71
72 If this option is not used, cryptswtup-reencrypt will ask for all active keyslot
73 passphrases.
74 .TP
75 .B "\-\-key-slot, \-S <0-7>"
76 Specify which key slot is used.
77 .br
78 WARNING: All other keyslots will be disabled if this option is used.
79 .TP
80 .B "\-\-keyfile-offset \fIvalue\fR"
81 Skip \fIvalue\fR bytes at the beginning of the key file.
82 .TP
83 .B "\-\-keyfile-size, \-l"
84 Read a maximum of \fIvalue\fR bytes from the key file.
85 Default is to read the whole file up to the compiled-in
86 maximum.
87 .TP
88 .B "\-\-tries, \-T"
89 Number of retries for invalid passphrase entry.
90 .TP
91 .B "\-\-block-size, \-B \fIvalue\fR"
92 Use re-encryption block size of <value> in MiB.
93 .br
94 Values can be between 1 and 64 MiB.
95 .TP
96 .B "\-\-use-directio"
97 Use direct-io (O_DIRECT) for all read/write data operations.
98 .br
99 Usefull if direct-io operations perform better than normal buffered
100 operations (e.g. in virtual environments).
101 .TP
102 .B "\-\-use-fsync"
103 Use fsync call after every written block.
104 .TP
105 .B "\-\-write-log"
106 Update log file after every block write. This can slow down reencryption
107 but will minimize data loss in the case of system crash.
108 .TP
109 .B "\-\-batch-mode, \-q"
110 Suppresses all warnings and reencryption progress output.
111 .TP
112 .B "\-\-version"
113 Show the program version.
114 .SH RETURN CODES
115 Cryptsetup-reencrypt returns 0 on success and a non-zero value on error.
116
117 Error codes are: 1 wrong parameters, 2 no permission,
118 3 out of memory, 4 wrong device specified, 5 device already exists
119 or device is busy.
120 .SH REPORTING BUGS
121 Report bugs, including ones in the documentation, on
122 the cryptsetup mailing list at <dm-crypt@saout.de>
123 or in the 'Issues' section on LUKS website.
124 Please attach the output of the failed command with the
125 \-\-debug option added.
126 .SH AUTHORS
127 Cryptsetup-reencrypt was written by Milan Broz <gmazyland@gmail.com>.
128 .SH COPYRIGHT
129 Copyright \(co 2012 Milan Broz
130 .br
131 Copyright \(co 2012 Red Hat, Inc.
132
133 This is free software; see the source for copying conditions.  There is NO
134 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
135 .SH SEE ALSO
136 The project website at \fBhttp://code.google.com/p/cryptsetup/\fR