On 14/05/2019 12:17, Kristian Klausen wrote: > I have a weak Intel Atom(N450) server and three external HDDs. I want to use the HDDs in RAID 5 with encryption and integrity[1]. > > The Atom CPU is rather weak: > # Algorithm | Key | Encryption | Decryption > aes-xts 256b 36.5 MiB/s 37.0 MiB/s > xchacha12,aes-adiantum 256b 83.4 MiB/s 84.3 MiB/s > So I want to use Adiantum, is it safe to combine them? > Ex[2][3]: cryptsetup luksFormat --type luks2 <device> --cipher xchacha12,aes-adiantum --integrity poly1305 Hi, this combination will not work. Adiantum is fast, but integrity checking will slow it down, so these requirements are going againts themselves. But thew problem is technical here: - the proper parameter is "--cipher xchacha12,aes-adiantum-IV" (IV is plain64 for non-integrity mode, but should be random for integrity protection modes) - the "poly1305" authenticator is intended to be used with chacha20 through RFC7539 wrapper, so it will try to wrap Adiantum using the RFC7539 and it is not supported. (Cipher test will return fail because constructed kernel cipher string is not supported.) (The intended use was --cipher chacha20-random --integrity poly1305, but it will be quite slow here.) - You should be able to use Adiantum with other authentication tags (like --integrity hmac-sha256) but it will be slow on Atom. If you do not need authenticated encryption, but just add crc32 integrity checking, maybe stacking RAID over dm-integrity (using integritysetup) will work better (with optional LUKS layer on top using fast Adiantum cipher). There are currently some experiments with new bitmap mode in dm-integrity (will be supported by next integritysetup) that are intended exactly for this RAID stacking scenario, but it is not stable yet. Milan > > [1] https://gist.github.com/MawKKe/caa2bbf7edcc072129d73b61ae7815fb > [2] https://mirrors.edge.kernel.org/pub/linux/utils/cryptsetup/v2.0/v2.0.0-ReleaseNotes > [3] https://mirrors.edge.kernel.org/pub/linux/utils/cryptsetup/v2.0/v2.0.6-ReleaseNotes > > Regards > Kristian Klausen > > _______________________________________________ > dm-crypt mailing list > dm-crypt@xxxxxxxx > https://www.saout.de/mailman/listinfo/dm-crypt > _______________________________________________ dm-crypt mailing list dm-crypt@xxxxxxxx https://www.saout.de/mailman/listinfo/dm-crypt