I’m trying to understand encryption in APFS. The Apple File System Reference (p. 136) states several times (steps 2, 5 and 7) that unwrapping is performed “according to the algorithm described in RFC 3394”. But all the open-source tools I can find agree with the answer at How does APFS encryption work? that in fact XTS (XEX-based tweaked-codebook mode with ciphertext stealing) is used. That doesn’t seem to be the algorithm described in RFC 3394.
Is the reference wrong on this? Or are there cases where RFC 3394 is (or was) indeed used? Or perhaps I misunderstand the algorithms and they’re the same after all?
The context is that I’m trying to recover data from an encrypted volume on the internal SSD of a mid-2019 MacBook Pro, and unwrapping the container keybag using XTS doesn't yield a valid block, so I’m wondering whether this discrepancy with the reference might indicate that the tools aren’t using the algorithm appropriate to this case. Any other tips on what I might do to obtain the correct keybag (e.g. look for it in other blocks) are of course also welcome.
Update:
I think I figured out what my problem is: The disk is hardware-encrypted. I’d still be interested in an answer to the question, though.