Skip to content

feat(btrfs,luks): better default checksum collision resistance with xxhash - #1291

Open
nikelborm wants to merge 1 commit into
nix-community:masterfrom
nikelborm:luks-btrfs-csum
Open

feat(btrfs,luks): better default checksum collision resistance with xxhash#1291
nikelborm wants to merge 1 commit into
nix-community:masterfrom
nikelborm:luks-btrfs-csum

Conversation

@nikelborm

@nikelborm nikelborm commented Aug 22, 2026

Copy link
Copy Markdown

Choose xxHash, which will catch errors with a higher probability. A single encrypted bit flip causes a 128-bit flip on the decrypted side. This makes the CRC32C property of being certain to catch 100% of errors in 1/2/3-bit flip use cases disappear and become probabilistic 1-2⁻³². And since we're already in a non-deterministic zone, it's better to choose the algorithm that has stronger collision resistance.

…xhash

Choose xxHash, which will catch errors with a higher probability. A single
encrypted bit flip causes a 128-bit flip on the decrypted side. This makes the
CRC32C property of being certain to catch 100% of errors in 1/2/3-bit flip use
cases disappear and become probabilistic `1-2⁻³²`. And since we're already in a
non-deterministic zone, it's better to choose the algorithm that has stronger
collision resistance.
@nikelborm

Copy link
Copy Markdown
Author

It probably would've been better to move this deeper into abstraction, like making disko detect btrfs-on-luks/btrfs-on-lvm-on-luks stacking and automatically add the necessary formatting option, but I'm not competent enough at the moment to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant