last time I did a benchmark, using using geli was around 3x faster than zfs encryption with heavy random read-write tests, however, I can't remember when that was. Furthermore, at some point I injected random bits to the disk and the filenames with errors were listed when printing the status although the keys were not loaded (when I used zfs encryption)Assuming people are interested in encryption: Why would one use Geli with ZFS on top, given that ZFS encryption is available?
Last I heard ZFS encryption isn't very highly developed wrt key handling. Also note this from the zfs-set-key(8) manpage:
" If the user's key is compromised, zfs change-key does not necessarily
protect existing or newly-written data from attack. Newly-written data
will continue to be encrypted with the same master key as the existing
data. The master key is compromised if an attacker obtains a user key
and the corresponding wrapped master key. Currently, zfs change-key
does not overwrite the previous wrapped master key on disk, so it is
accessible via forensic analysis for an indeterminate length of time.
"
do you have a link to a commit or an issue?Just a note that the corruption bug affected systems with encrypted datasets after unencrypted (that is, not raw) zfs send of one of such datasets.
The root cause has been recently established and the problem has been fixed.
There are two key use cases that ZFS encryption enables: sending an encrypted dataset for backup to an untrusted (where the key never exists remotely) third party — including the ability to later send incremental updates, and using the same encrypted dataset (not concurrently) on different OSes (Linux/FreeBSD; possibly Mac and Windows, but I haven’t checked the status of those ZFS ports lately.).Assuming people are interested in encryption: Why would one use Geli with ZFS on top, given that ZFS encryption is available?
do you have a link to a commit or an issue?
Well that discussion is a little unsettling. It looks like everyone agrees it's a good fix, but there's some uncertainty on how it addresses the problem.![]()
Fix 2 bugs in non-raw send with encryption by gamanakis · Pull Request #17340 · openzfs/zfs
Motivation and Context Closes #12014 Description Bisecting identified the redacted send/receive as the source of the bug for issue #12014. Specifically the call to dsl_dataset_hold_obj(&from...github.com
Why would one don't talk about cryptographic algorithms and data integrity verification?Assuming people are interested in encryption:
That's not the impression I got.Well that discussion is a little unsettling. It looks like everyone agrees it's a good fix, but there's some uncertainty on how it addresses the problem.
Agreed that it's a clear and obvious fix, but there's some uncertainty on how it causes the observed symptoms:That's not the impression I got.
The bug was pretty clear and obvious (once spotted).
Has anyone done a full analysis to understand how this bug manifested as the myriad encryption bugs, panics and other quirks we've seen over the years?
Don't get me wrong; this PR is obviously right for what it is, and I won't be surprised if it closes a locking gap somewhere that could be hit if you're unlucky, but I'd like those dots connected so I can feel comfortable saying yes, this definitely sorts it out. Especially since the forums are starting to pick up on it and the high-fives and cheers are making me a bit uncomfortable.
(and yes, I am a blast at parties![]()
)
If not, I've got some spare time this afternoon; I'll try to do the analysis myself. (Ed: No analysis follows.)
@robn I don't think there is still a proper understanding of what's going on. At least I haven't seen and don't have one.
During a detailed discussion in ZFS Ask Me Anything - 12 Dec 2024 with Allan Jude, Mark Maybee and Jim Salter:There are two key use cases that ZFS encryption enables
A variation on the quoted use cases for ZFS encryption came up in the segment Should you use ZFS Built-in Encryption and the immediate following segment: Best practices for ZFS Encryption, from ca. 4:30-15:19 min. Use case mentioned there is the provable and reliable destruction of data limited to an encrypted dataset. Apart from this law firm based example, also ZFS' encryption in the context of a medical setting was discussed. Followed by discussion on ZFS 'encryption bugs'; I think that the discussion there probably pre-dates the issue discussed in this thread.Do you recommend ZFS built-in encryption or running ZFS on top of another encryption mechanism?
I heard recently there's been some bugs around sending encrypted snapshots between ZFS pools.