Skip to content

Commit

Permalink
WiP: cryptsetup 2.6.1 reencrypt changes addendum after testing
Browse files Browse the repository at this point in the history
- reencrypt with new default is having reencryption speed around 63Mb/s with --direct-io. Removing it for next test round.

Notes:
- We know that kernel crypto backend is supposed to take advantage of hw crypto backend to feed /dev/urandom. Is it optimized?
- We use kernel crypto backend. This is not default. Default is to use libgcrypt. Try on next round. Which I had more MX500 drives to test in parallel on other x230 with same cpu same firmware same disk only having cryptsetup version being different.
- We know that older version of cryptsetup was able to attain 150 Mb/s of reencryption. This slower speed will make users not want to reencrypt.

Signed-off-by: Thierry Laurion <[email protected]>
  • Loading branch information
tlaurion committed Nov 26, 2023
1 parent 61636a5 commit 9877d46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions initrd/etc/luks-functions
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,11 @@ luks_reencrypt() {
read -r luks_current_Disk_Recovery_Key_passphrase
echo -n "$luks_current_Disk_Recovery_Key_passphrase" >/tmp/luks_current_Disk_Recovery_Key_passphrase
warn "Reencrypting "$LUKS" LUKS encrypted drive content with current Recovery Disk Key passphrase..."
cryptsetup reencrypt --use-directio "$LUKS" --key-slot 0 --key-file /tmp/luks_current_Disk_Recovery_Key_passphrase
cryptsetup reencrypt "$LUKS" --key-slot 0 --key-file /tmp/luks_current_Disk_Recovery_Key_passphrase
else
echo -n "$luks_current_Disk_Recovery_Key_passphrase" >/tmp/luks_current_Disk_Recovery_Key_passphrase
warn "Reencrypting "$LUKS" LUKS encrypted drive content with current Recovery Disk Key passphrase..."
cryptsetup reencrypt --use-directio "$LUKS" --key-slot 0 --key-file /tmp/luks_current_Disk_Recovery_Key_passphrase
cryptsetup reencrypt "$LUKS" --key-slot 0 --key-file /tmp/luks_current_Disk_Recovery_Key_passphrase
fi
#Validate past cryptsetup reencrypt attempts
if [ $(echo $?) -ne 0 ]; then
Expand Down

0 comments on commit 9877d46

Please sign in to comment.