Equivalent of --integrity-recalculate
Marc SCHAEFER <[email protected]> Sat, 10 May 2025 17:51:17 +0200
| Newsgroups | dev.linux.lists.cryptsetup |
|---|---|
| Message-ID | <[email protected]> |
Hello,
If you create a cryptsetup/luks device with integrity with:
cryptsetup luksFormat -q --type luks2 --integrity hmac-sha256 $dev
and then open it:
cryptsetup open $dev backup-copy
you then get, according to lsblk, two additional devices:
- backup-copy (the transparently decrypted/encrypting volume)
- backup-copy_dif (the integrity device)
(which is similar, AFAIK, as when you use dm-integrity with LVM)
If you create an integrity device separately, you get a
integritysetup --integrity-recalculate open $dev integrity
command which allows to recalculate the integrity blocks.
I don't think cryptsetup has this option (*); is there a way to
do it anyway? Or maybe remove the backup-copy_dif and
re-add it?
Thank you for any pointer.
(*) it looks there is a feature request pending
https://gitlab.com/cryptsetup/cryptsetup/-/issues/854