0

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.

2
  • If it is your data then you should have the password, if not then the idea is you should not get it.
    – Solar Mike
    Mar 28, 2023 at 9:50
  • @SolarMike: The step that fails, unwrapping the container keybag, doesn't require a password; see step 2 on p. 136 in the reference I linked to.
    – joriki
    Mar 28, 2023 at 10:17

0

You must log in to answer this question.

Browse other questions tagged .