Encrypting Your Filesystem with ZFS and AES128
By Stefan Hinker-Oracle on Nov 24, 2010
ZFS filesystem encryption is finally available in Solaris 11 Express. This closes a gap in Solaris that hurt all those that carried their data around with them. But of course there are many good reasons to encrypt data living on disks well secured in a datacenter. After all, they will all leave the datacenter in one way or another eventually...
Enough introduction, here's how simple this is:
- You will need to upgrade the zpool intended to host the encrypted filesystem to version 30. Issue a simple "zpool upgrade <poolname>. Of course, you can skip this step on a newly installed Solaris 11 Express.
- Now create a new filesystem, with encryption enabled: zfs create -o encryption=on <poolname/newfs>
The command will interactively prompt for a passphrase which will be used to generate the key for this filesystem. You're done! You can not encrypt an already existing filesystem. Of course there are several more options on how and where to store the key. Just have a look at the manpage
Likewise, you also have a choice of three different key lengths for AES, the algorithm used for encryption. The default used for "encryption=on" is AES-128 in CCM mode. But you can also choose the longer 192 or 256 bit keys. While developing ZFS crypto, it was discussed what default keylength to choose. AES-128 was chosen for two reasons: First, of course, the 128 bit variant is faster than the longer key lengths, especially without hardware acceleration like it is available in the SPARC T2/T3 and Intel 5600 Chips. Second, there is new research including successful attacks on AES256 and AES 192 that requires a search of only 2\^39. These attacks don't work for AES128, which is therefore, as of today, not only faster, but also more secure than the variants with longer keys.
More details about ZFS Crypto in the ZFS Admin Guide.