1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235
|
@cmdline
Feature: Command line volume modification
Scenario: Simple volume #1 (change passphrase, pos)
Given I create a volume tmpvol1 of size 10M with the following parameters:
| passphrase | test |
| pbkdf_prf | SHA512 |
| cipher | AES-256-XTS |
And I modify volume tmpvol1 using the following settings:
| passphrase | test |
| new_passphrase | new |
And I map volume tmpvol1 as tcplay_test using the following settings:
| passphrase | new |
And I request information about volume tmpvol1 using the following settings:
| passphrase | new |
Then I expect tcplay to succeed
And I expect dmsetup to have the following tables:
| name | begin | end | algo | offset | iv_offset |
| tcplay_test | 0 | 19968 | aes-xts-plain64 | 256 | 256 |
And I expect tcplay to report the following:
| PBKDF2 PRF | SHA512 |
| PBKDF2 iterations | 1000 |
| Cipher | AES-256-XTS |
| Key Length | 512 bits |
| Sector size | 512 |
| Volume size | 19968 sectors |
| IV offset | 256 sectors |
| Block offset | 256 sectors |
Scenario: Simple volume #1 (change PBKDF PRF)
Given I create a volume tmpvol1 of size 10M with the following parameters:
| passphrase | test |
| pbkdf_prf | SHA512 |
| cipher | AES-256-XTS |
And I modify volume tmpvol1 using the following settings:
| passphrase | test |
| new_passphrase | test |
| new_pbkdf_prf | whirlpool |
And I map volume tmpvol1 as tcplay_test using the following settings:
| passphrase | test |
And I request information about volume tmpvol1 using the following settings:
| passphrase | test |
Then I expect tcplay to succeed
And I expect dmsetup to have the following tables:
| name | begin | end | algo | offset | iv_offset |
| tcplay_test | 0 | 19968 | aes-xts-plain64 | 256 | 256 |
And I expect tcplay to report the following:
| PBKDF2 PRF | whirlpool |
| PBKDF2 iterations | 1000 |
| Cipher | AES-256-XTS |
| Key Length | 512 bits |
| Sector size | 512 |
| Volume size | 19968 sectors |
| IV offset | 256 sectors |
| Block offset | 256 sectors |
Scenario: Cascade volume #1 (change passphrase)
Given I create a volume tmpvol1 of size 10M with the following parameters:
| passphrase | test |
| pbkdf_prf | whirlpool |
| cipher | AES-256-XTS,SERPENT-256-XTS |
And I modify volume tmpvol1 using the following settings:
| passphrase | test |
| new_passphrase | new |
And I map volume tmpvol1 as tcplay_test using the following settings:
| passphrase | new |
And I request information about volume tmpvol1 using the following settings:
| passphrase | new |
Then I expect dmsetup to have the following tables:
| name | begin | end | algo | offset | iv_offset |
| tcplay_test.0 | 0 | 19968 | serpent-xts-plain64 | 256 | 256 |
| tcplay_test | 0 | 19968 | aes-xts-plain64 | 256 | 0 |
And I expect tcplay to report the following:
| PBKDF2 PRF | whirlpool |
| PBKDF2 iterations | 1000 |
| Cipher | AES-256-XTS,SERPENT-256-XTS |
| Key Length | 1024 bits |
| Sector size | 512 |
| Volume size | 19968 sectors |
| IV offset | 256 sectors |
| Block offset | 256 sectors |
Scenario: Hidden volume #1 (change passphrase)
Given I create a volume tmpvol1 of size 10M with the following parameters:
| passphrase | test |
| pbkdf_prf | whirlpool |
| cipher | TWOFISH-256-XTS |
| create_hidden | yes |
| hidden_mb | 2 |
| keyfiles_hidden | key.2 |
| pbkdf_prf_hidden | RIPEMD160 |
| cipher_hidden | SERPENT-256-XTS |
And I modify volume tmpvol1 using the following settings:
| keyfiles | key.2 |
| new_passphrase | new_hidden |
And I map volume tmpvol1 as tcplay_test using the following settings:
| passphrase | test |
And I request information about volume tmpvol1 using the following settings:
| passphrase | test |
Then I expect dmsetup to have the following tables:
| name | begin | end | algo | offset | iv_offset |
| tcplay_test | 0 | 19968 | twofish-xts-plain64 | 256 | 256 |
And I expect tcplay to report the following:
| PBKDF2 PRF | whirlpool |
| PBKDF2 iterations | 1000 |
| Cipher | TWOFISH-256-XTS |
| Key Length | 512 bits |
| Sector size | 512 |
| Volume size | 19968 sectors |
| IV offset | 256 sectors |
| Block offset | 256 sectors |
Scenario: Hidden volume #2 (change passphrase, keyfiles)
Given I create a volume tmpvol1 of size 10M with the following parameters:
| passphrase | test |
| pbkdf_prf | whirlpool |
| cipher | TWOFISH-256-XTS |
| create_hidden | yes |
| hidden_mb | 2 |
| keyfiles_hidden | key.2 |
| pbkdf_prf_hidden | RIPEMD160 |
| cipher_hidden | SERPENT-256-XTS |
And I modify volume tmpvol1 using the following settings:
| keyfiles | key.2 |
| new_passphrase | new_hidden |
| new_keyfiles | key.1, key.2 |
And I map volume tmpvol1 as tcplay_test using the following settings:
| passphrase | new_hidden |
| keyfiles | key.1, key.2 |
And I request information about volume tmpvol1 using the following settings:
| passphrase | new_hidden |
| keyfiles | key.1, key.2 |
Then I expect dmsetup to have the following tables:
| name | begin | end | algo | offset | iv_offset |
| tcplay_test | 0 | 4096 | serpent-xts-plain64 | 16128 | 16128 |
And I expect tcplay to report the following:
| PBKDF2 PRF | RIPEMD160 |
| PBKDF2 iterations | 2000 |
| Cipher | SERPENT-256-XTS |
| Key Length | 512 bits |
| Sector size | 512 |
| Volume size | 4096 sectors |
| IV offset | 16128 sectors |
| Block offset | 16128 sectors |
Scenario: Hidden volume #3 (change keyfiles, PBKDF PRF)
Given I create a volume tmpvol1 of size 10M with the following parameters:
| passphrase | test |
| pbkdf_prf | whirlpool |
| cipher | TWOFISH-256-XTS |
| create_hidden | yes |
| hidden_mb | 2 |
| keyfiles_hidden | key.2 |
| pbkdf_prf_hidden | RIPEMD160 |
| cipher_hidden | SERPENT-256-XTS |
And I modify volume tmpvol1 using the following settings:
| keyfiles | key.2 |
| new_keyfiles | key.1, key.2 |
| new_pbkdf_prf | SHA512 |
And I map volume tmpvol1 as tcplay_test using the following settings:
| keyfiles | key.1, key.2 |
And I request information about volume tmpvol1 using the following settings:
| keyfiles | key.1, key.2 |
Then I expect dmsetup to have the following tables:
| name | begin | end | algo | offset | iv_offset |
| tcplay_test | 0 | 4096 | serpent-xts-plain64 | 16128 | 16128 |
And I expect tcplay to report the following:
| PBKDF2 PRF | SHA512 |
| PBKDF2 iterations | 1000 |
| Cipher | SERPENT-256-XTS |
| Key Length | 512 bits |
| Sector size | 512 |
| Volume size | 4096 sectors |
| IV offset | 16128 sectors |
| Block offset | 16128 sectors |
Scenario: Hidden volume #4 (restore from backup, outer)
Given I create a volume tmpvol1 of size 10M with the following parameters:
| passphrase | test |
| pbkdf_prf | whirlpool |
| cipher | TWOFISH-256-XTS |
| create_hidden | yes |
| hidden_mb | 2 |
| keyfiles_hidden | key.2 |
| pbkdf_prf_hidden | RIPEMD160 |
| cipher_hidden | SERPENT-256-XTS |
And I corrupt sector 0 of volume tmpvol1
And I modify volume tmpvol1 by restoring from the backup header using the following settings:
| passphrase | test |
And I map volume tmpvol1 as tcplay_test using the following settings:
| passphrase | test |
And I request information about volume tmpvol1 using the following settings:
| passphrase | test |
Then I expect dmsetup to have the following tables:
| name | begin | end | algo | offset | iv_offset |
| tcplay_test | 0 | 19968 | twofish-xts-plain64 | 256 | 256 |
And I expect tcplay to report the following:
| PBKDF2 PRF | whirlpool |
| PBKDF2 iterations | 1000 |
| Cipher | TWOFISH-256-XTS |
| Key Length | 512 bits |
| Sector size | 512 |
| Volume size | 19968 sectors |
| IV offset | 256 sectors |
| Block offset | 256 sectors |
Scenario: Hidden volume #5 (restore from backup, hidden)
Given I create a volume tmpvol1 of size 10M with the following parameters:
| passphrase | test |
| pbkdf_prf | whirlpool |
| cipher | TWOFISH-256-XTS |
| create_hidden | yes |
| hidden_mb | 2 |
| keyfiles_hidden | key.2 |
| pbkdf_prf_hidden | RIPEMD160 |
| cipher_hidden | SERPENT-256-XTS |
And I corrupt sector 128 of volume tmpvol1
And I modify volume tmpvol1 by restoring from the backup header using the following settings:
| keyfiles | key.2 |
And I map volume tmpvol1 as tcplay_test using the following settings:
| keyfiles | key.2 |
And I request information about volume tmpvol1 using the following settings:
| keyfiles | key.2 |
Then I expect dmsetup to have the following tables:
| name | begin | end | algo | offset | iv_offset |
| tcplay_test | 0 | 4096 | serpent-xts-plain64 | 16128 | 16128 |
And I expect tcplay to report the following:
| PBKDF2 PRF | RIPEMD160 |
| PBKDF2 iterations | 2000 |
| Cipher | SERPENT-256-XTS |
| Key Length | 512 bits |
| Sector size | 512 |
| Volume size | 4096 sectors |
| IV offset | 16128 sectors |
| Block offset | 16128 sectors |
|