| 1 |
|
| 2 |
# Encrypt with login protector |
| 3 |
|
| 4 |
IMPORTANT: See "MNT/dir/fscrypt_recovery_readme.txt" for |
| 5 |
important recovery instructions. It is *strongly recommended* to |
| 6 |
record the recovery passphrase in a secure location; otherwise you |
| 7 |
will lose access to this directory if you reinstall the operating |
| 8 |
system or move this filesystem to another system. |
| 9 |
|
| 10 |
ext4 filesystem "MNT" has 2 protectors and 1 policy. |
| 11 |
All users can create fscrypt metadata on this filesystem. |
| 12 |
|
| 13 |
PROTECTOR LINKED DESCRIPTION |
| 14 |
desc1 Yes (MNT_ROOT) login protector for fscrypt-test-user |
| 15 |
desc2 No custom protector "Recovery passphrase for dir" |
| 16 |
|
| 17 |
POLICY UNLOCKED PROTECTORS |
| 18 |
desc3 Yes desc1, desc2 |
| 19 |
ext4 filesystem "MNT_ROOT" has 1 protector and 0 policies. |
| 20 |
All users can create fscrypt metadata on this filesystem. |
| 21 |
|
| 22 |
PROTECTOR LINKED DESCRIPTION |
| 23 |
desc1 No login protector for fscrypt-test-user |
| 24 |
"MNT/dir" is encrypted with fscrypt. |
| 25 |
|
| 26 |
Policy: desc3 |
| 27 |
Options: padding:32 contents:AES_256_XTS filenames:AES_256_CTS policy_version:2 |
| 28 |
Unlocked: Yes |
| 29 |
|
| 30 |
Protected with 2 protectors: |
| 31 |
PROTECTOR LINKED DESCRIPTION |
| 32 |
desc1 Yes (MNT_ROOT) login protector for fscrypt-test-user |
| 33 |
desc2 No custom protector "Recovery passphrase for dir" |
| 34 |
|
| 35 |
# => Lock, then unlock with login passphrase |
| 36 |
"MNT/dir" is now locked. |
| 37 |
|
| 38 |
# => Lock, then unlock with recovery passphrase |
| 39 |
"MNT/dir" is now locked. |
| 40 |
|
| 41 |
# Encrypt with login protector, interactively |
| 42 |
spawn fscrypt encrypt MNT/dir |
| 43 |
The following protector sources are available: |
| 44 |
1 - Your login passphrase (pam_passphrase) |
| 45 |
2 - A custom passphrase (custom_passphrase) |
| 46 |
3 - A raw 256-bit key (raw_key) |
| 47 |
Enter the source number for the new protector [2 - custom_passphrase]: 1 |
| 48 |
|
| 49 |
IMPORTANT: Before continuing, ensure you have properly set up your system for |
| 50 |
login protectors. See |
| 51 |
https://github.com/google/fscrypt#setting-up-for-login-protectors |
| 52 |
|
| 53 |
Enter login passphrase for fscrypt-test-user: |
| 54 |
|
| 55 |
IMPORTANT: See "MNT/dir/fscrypt_recovery_readme.txt" for |
| 56 |
important recovery instructions. It is *strongly recommended* to |
| 57 |
record the recovery passphrase in a secure location; otherwise you |
| 58 |
will lose access to this directory if you reinstall the operating |
| 59 |
system or move this filesystem to another system. |
| 60 |
|
| 61 |
"MNT/dir" is now encrypted, unlocked, and ready for use. |
| 62 |
ext4 filesystem "MNT" has 2 protectors and 1 policy. |
| 63 |
All users can create fscrypt metadata on this filesystem. |
| 64 |
|
| 65 |
PROTECTOR LINKED DESCRIPTION |
| 66 |
desc10 Yes (MNT_ROOT) login protector for fscrypt-test-user |
| 67 |
desc11 No custom protector "Recovery passphrase for dir" |
| 68 |
|
| 69 |
POLICY UNLOCKED PROTECTORS |
| 70 |
desc12 Yes desc10, desc11 |
| 71 |
ext4 filesystem "MNT_ROOT" has 1 protector and 0 policies. |
| 72 |
All users can create fscrypt metadata on this filesystem. |
| 73 |
|
| 74 |
PROTECTOR LINKED DESCRIPTION |
| 75 |
desc10 No login protector for fscrypt-test-user |
| 76 |
"MNT/dir" is encrypted with fscrypt. |
| 77 |
|
| 78 |
Policy: desc12 |
| 79 |
Options: padding:32 contents:AES_256_XTS filenames:AES_256_CTS policy_version:2 |
| 80 |
Unlocked: Yes |
| 81 |
|
| 82 |
Protected with 2 protectors: |
| 83 |
PROTECTOR LINKED DESCRIPTION |
| 84 |
desc10 Yes (MNT_ROOT) login protector for fscrypt-test-user |
| 85 |
desc11 No custom protector "Recovery passphrase for dir" |
| 86 |
|
| 87 |
# Encrypt with login protector as root |
| 88 |
|
| 89 |
IMPORTANT: See "MNT/dir/fscrypt_recovery_readme.txt" for |
| 90 |
important recovery instructions. It is *strongly recommended* to |
| 91 |
record the recovery passphrase in a secure location; otherwise you |
| 92 |
will lose access to this directory if you reinstall the operating |
| 93 |
system or move this filesystem to another system. |
| 94 |
|
| 95 |
ext4 filesystem "MNT" has 2 protectors and 1 policy. |
| 96 |
All users can create fscrypt metadata on this filesystem. |
| 97 |
|
| 98 |
PROTECTOR LINKED DESCRIPTION |
| 99 |
desc19 Yes (MNT_ROOT) login protector for fscrypt-test-user |
| 100 |
desc20 No custom protector "Recovery passphrase for dir" |
| 101 |
|
| 102 |
POLICY UNLOCKED PROTECTORS |
| 103 |
desc21 Yes desc19, desc20 |
| 104 |
ext4 filesystem "MNT_ROOT" has 1 protector and 0 policies. |
| 105 |
All users can create fscrypt metadata on this filesystem. |
| 106 |
|
| 107 |
PROTECTOR LINKED DESCRIPTION |
| 108 |
desc19 No login protector for fscrypt-test-user |
| 109 |
"MNT/dir" is encrypted with fscrypt. |
| 110 |
|
| 111 |
Policy: desc21 |
| 112 |
Options: padding:32 contents:AES_256_XTS filenames:AES_256_CTS policy_version:2 |
| 113 |
Unlocked: Yes |
| 114 |
|
| 115 |
Protected with 2 protectors: |
| 116 |
PROTECTOR LINKED DESCRIPTION |
| 117 |
desc19 Yes (MNT_ROOT) login protector for fscrypt-test-user |
| 118 |
desc20 No custom protector "Recovery passphrase for dir" |
| 119 |
|
| 120 |
Protector is owned by fscrypt-test-user:fscrypt-test-user |
| 121 |
"MNT/dir" is now locked. |
| 122 |
"MNT/dir" is now locked. |
| 123 |
|
| 124 |
# Encrypt with login protector with --no-recovery |
| 125 |
ext4 filesystem "MNT" has 1 protector and 1 policy. |
| 126 |
All users can create fscrypt metadata on this filesystem. |
| 127 |
|
| 128 |
PROTECTOR LINKED DESCRIPTION |
| 129 |
desc28 Yes (MNT_ROOT) login protector for fscrypt-test-user |
| 130 |
|
| 131 |
POLICY UNLOCKED PROTECTORS |
| 132 |
desc29 Yes desc28 |
| 133 |
ext4 filesystem "MNT_ROOT" has 1 protector and 0 policies. |
| 134 |
All users can create fscrypt metadata on this filesystem. |
| 135 |
|
| 136 |
PROTECTOR LINKED DESCRIPTION |
| 137 |
desc28 No login protector for fscrypt-test-user |
| 138 |
"MNT/dir" is encrypted with fscrypt. |
| 139 |
|
| 140 |
Policy: desc29 |
| 141 |
Options: padding:32 contents:AES_256_XTS filenames:AES_256_CTS policy_version:2 |
| 142 |
Unlocked: Yes |
| 143 |
|
| 144 |
Protected with 1 protector: |
| 145 |
PROTECTOR LINKED DESCRIPTION |
| 146 |
desc28 Yes (MNT_ROOT) login protector for fscrypt-test-user |
| 147 |
|
| 148 |
# Encrypt with login protector on root fs (shouldn't generate a recovery passphrase) |
| 149 |
"MNT_ROOT/dir" is encrypted with fscrypt. |
| 150 |
|
| 151 |
Policy: desc34 |
| 152 |
Options: padding:32 contents:AES_256_XTS filenames:AES_256_CTS policy_version:2 |
| 153 |
Unlocked: Yes |
| 154 |
|
| 155 |
Protected with 1 protector: |
| 156 |
PROTECTOR LINKED DESCRIPTION |
| 157 |
desc35 No login protector for fscrypt-test-user |
| 158 |
ext4 filesystem "MNT_ROOT" has 1 protector and 1 policy. |
| 159 |
All users can create fscrypt metadata on this filesystem. |
| 160 |
|
| 161 |
PROTECTOR LINKED DESCRIPTION |
| 162 |
desc35 No login protector for fscrypt-test-user |
| 163 |
|
| 164 |
POLICY UNLOCKED PROTECTORS |
| 165 |
desc34 Yes desc35 |
| 166 |
|
| 167 |
# Try to give a login protector a name |
| 168 |
[ERROR] fscrypt encrypt: cannot assign name "prot" to new login protector for |
| 169 |
user "fscrypt-test-user" because login protectors are |
| 170 |
identified by user, not by name. |
| 171 |
|
| 172 |
To fix this, don't specify the --name=PROTECTOR_NAME option. |
| 173 |
ext4 filesystem "MNT" has 0 protectors and 0 policies. |
| 174 |
All users can create fscrypt metadata on this filesystem. |
| 175 |
|
| 176 |
ext4 filesystem "MNT_ROOT" has 0 protectors and 0 policies. |
| 177 |
All users can create fscrypt metadata on this filesystem. |
| 178 |
|
| 179 |
[ERROR] fscrypt status: file or directory "MNT/dir" is not |
| 180 |
encrypted |
| 181 |
|
| 182 |
# Try to use the wrong login passphrase |
| 183 |
[ERROR] fscrypt encrypt: incorrect login passphrase |
| 184 |
ext4 filesystem "MNT" has 0 protectors and 0 policies. |
| 185 |
All users can create fscrypt metadata on this filesystem. |
| 186 |
|
| 187 |
ext4 filesystem "MNT_ROOT" has 0 protectors and 0 policies. |
| 188 |
All users can create fscrypt metadata on this filesystem. |
| 189 |
|
| 190 |
[ERROR] fscrypt status: file or directory "MNT/dir" is not |
| 191 |
encrypted |
| 192 |
|
| 193 |
# Test that linked protector works even if UUID link is broken |
| 194 |
|
| 195 |
IMPORTANT: See "MNT/dir/fscrypt_recovery_readme.txt" for |
| 196 |
important recovery instructions. It is *strongly recommended* to |
| 197 |
record the recovery passphrase in a secure location; otherwise you |
| 198 |
will lose access to this directory if you reinstall the operating |
| 199 |
system or move this filesystem to another system. |
| 200 |
|
| 201 |
ext4 filesystem "MNT" has 2 protectors and 1 policy. |
| 202 |
All users can create fscrypt metadata on this filesystem. |
| 203 |
|
| 204 |
PROTECTOR LINKED DESCRIPTION |
| 205 |
desc39 No custom protector "Recovery passphrase for dir" |
| 206 |
desc40 Yes (MNT_ROOT) login protector for fscrypt-test-user |
| 207 |
|
| 208 |
POLICY UNLOCKED PROTECTORS |
| 209 |
desc41 Yes desc40, desc39 |