135 points · by funkaster · 9y ago · 55 comments
Getting this right would make it a lot easier to have faith in encrypted backups. Right now, you have to trust that each network backup product like bacula is doing it right.
I just randomly picked bacula and then looked up what they are doing. They're using OpenSSL with AES-CBC. I don't think anyone would recommend that.
As a start, it would be nice if Datto could document the design decisions. For instance, AES-CCM is a bit of a strange default and it's not explained anywhere. I see Solaris chose AES-128-CCM and maybe that influenced why OpenZFS is using AES-256-CCM. I haven't found a cryptographer in favor of CCM over GCM. For instance, Matthew Green doesn't appear to like it over GCM.
https://blog.cryptographyengineering.com/2012/05/19/how-to-c...
According to Crypto++'s benchmark, AES-GCM is 2,448 MB/s and AES-CCM is 710 MB/s. Does that match your experience with OpenZFS?
https://www.cryptopp.com/benchmarks.html
Given that GCM IV reuse is catastrophic and one of the main use cases for this is backups to potentially untrusted sources, I'm curious if AES-GCM-SIV would be a more conservative choice.
[1] http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/propose...
It's great they're taking their time, but I've been looking forward to a stable release since its announcement almost a year ago :)
Update: Ahh well it helps to whole article before posting. Both encrypted and decrypted send/receive are possible. But this also suggests multiple keys per pool, a key per file system I guess?
When ZFS gets there, I will probably switch to it. Until then, however, I find manually partitioning volumes on the command-line to be terrifying, and I imagine I'm not alone.
32 bytes => 64 hex digits, which is probably not a coincidence. :-)
http://52.24.230.241/bc/password_generation.php
This produces memorable passphrases pretty close to that limit, as described in http://www-scf.usc.edu/~mghazvin/papers/marjan15.pdf
Or did I miss your point?
We use PBKDF2 as a key derivation function, which is specifically designed to turn low entropy, arbitrary length strings into fixed length, high entropy keys suitable for encryption. It also has the added bonus of making password brute forcing significantly harder.
OT: one of the sed lines is hard to read
sed -i 's/github.com\/zfsonlinux\/zfs.git/github.com\/tcaputi\/zfs.git/' PKGBUILD
the OP might leverage that you can use other quoting characters, like sed -i 's,github.com/zfsonlinux/zfs.git,github.com/tcaputi/zfs.git,' PKGBUILDThis instead is ZFS doing the actual encryption on a normal block device.
Be aware:
Uefi did not work for me in VirtualBox with ZFS.
Booting with UEFI, ZFS and RAIDz works, but I did not figure out how to install the UEFI grub-boot on all RAIDz drives.
Therefore, if the one and only drive with the boot partition fails, I have to rely on an USB-stick as a backup-plan for the bootloader.
Probably if I could start over I would try to skip UEFI and use legacy booting and installing Grub in the MBR of each drive (if that is possible).
For encryption we are using Luks right now, since it encrypts block devices and ZFS uses these block devices to form its raid.
Luks needs to decrypt ALL raid devices inside the Grub boot prompt in order for ZFS to start its raidz.
To make this happen, we had to modify:
/usr/share/initramfs-tools/hooks/cryptroot and remove an early return in a for-loop in get_fs_devices() , since otherwise only the first device was decrypted.
Make sure /etc/lvm/lvm.conf contains use_lvmetad = 0
Make sure /etc/default/grub contains GRUB_ENABLE_CRYPTODISK=y GRUB_CMDLINE_LINUX_DEFAULT=“text"
So, yeah, I am looking forward for zfs-native encryption on Linux to make booting "safer/easier".
Multiple UEFI boot partition are possible, but just like you note in your article, they have to be outside the ZFS pool. All of them. Then you set order for each one using efibootmgr. For each, you will get a separate entry in UEFI boot manager.
It is not necessary to install grub2 after rebooting into ZFS root. It is perfectly fine to run grub2-install in chroot from your temporary installation.
[1]: http://docs.oracle.com/cd/E19253-01/819-5461/gamnq/index.htm...
I'm not in a good position to judge whether this is the correct level of detail for someone new to ZFS; it seems slightly lighter on explanation of concepts than I'd prefer.
[2] seems reasonably nice at a quick look.
[1] - https://github.com/zfsonlinux/zfs/wiki/Ubuntu-16.04-Root-on-...
That's for Ubuntu 14, but it's basically the same process for Ubuntu 16. Neither installer supports root on ZFS, so you have to install Ubuntu to a flash drive, create the ZFS pool from the live environment, and then copy the contents of the flash drive onto the ZFS pool.
Just ignore the bits about dual-booting Mac OS X.
Use https://www.proxmox.com/. They use Debian and it just works with ZFS.
Oracle closed off Solaris. The decendent of Open Solaris is Illumos. Oracle ZFS and OpenZFS are not hte same thing.
OpenZFS repo is the upstream, though it is closely tracks the Illumos version.
From there the projects pull on OpenZFS to create their implementations. New features are developed independently by the projects with rules that a new feature must be enabled in a downstream distro for X period of time before it can be upstreamed into OpenZFS.