On 10/15/21 23:02, Robert Haas wrote:
> On Fri, Oct 15, 2021 at 3:22 PM Stephen Frost <sfrost@snowman.net> wrote:
>> Specifically: The default cipher for LUKS is nowadays aes-xts-plain64
>>
>> and then this:
>>
>> https://gitlab.com/cryptsetup/cryptsetup/-/wikis/DMCrypt
>>
>> where plain64 is defined as:
>>
>> plain64: the initial vector is the 64-bit little-endian version of the
>> sector number, padded with zeros if necessary
>>
>> That is, the default for LUKS is AES, XTS, with a simple IV. That
>> strikes me as a pretty ringing endorsement.
>
> Yes, that sounds promising. It might not hurt to check for other
> precedents as well, but that seems like a pretty good one.
>
TrueCrypt/VeraCrypt uses XTS too, I think. There's an overview of other
FDE products at [1], and some of them use XTS, but I would take that
with a grain of salt - some of the products are somewhat obscure, very
old, or both.
What is probably more interesting is that there's an IEEE standard [2]
dealing with encrypted shared storage, and that uses XTS too. I'd bet
there's a bunch of smart cryptographers involved.
[1] https://en.wikipedia.org/wiki/Comparison_of_disk_encryption_software
[2] https://en.wikipedia.org/wiki/IEEE_P1619
> I'm not very convinced that using the LSN for any of this is a good
> idea. Something that changes most of the time but not all the time
> seems more like it could hurt by masking fuzzy thinking more than it
> helps anything.
>
I haven't been following the discussion about using LSN, but I agree
that while using it seems convenient, the consequences of some changes
not incrementing LSN seem potentially disastrous, depending on the
encryption mode.
regards
--
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company