#asahi-dev · 2022-10-06 05:48
ElvishJerricco[m]only been signed with MS secure boot keys instead of my own, it is unable to access my data because of measured boot and PCR 7.#asahi-dev · 2022-10-06 05:48
ElvishJerricco[m]oh it is worth noting that without measured boot, then we can't use the SEP for passwordless disk unlock without exposing the same issue of another booted OS being able to access the data. Not really a huge deal because I think people are generally ok with needing separate passwords for booting vs logging in. But I will say that's it's been quite nice to have passwordless booting on my steam deck. And when I boot another OS that's#asahi-dev · 2022-10-06 05:27
ElvishJerricco[m]Huh, never heard "swiss cheese model" before. Neat term: https://en.wikipedia.org/wiki/Swiss_cheese_model#asahi-dev · 2022-10-06 05:25
ElvishJerricco[m]but yes your point is taken#asahi-dev · 2022-10-06 05:25
ElvishJerricco[m]yea, but it seems like it means they do need to pwn at least one of them to even see the disk in the first place.#asahi-dev · 2022-10-06 05:23
ElvishJerricco[m]well yea but I'm assuming I'm pretty pwned no matter what if they've managed to steal my password in one OS#asahi-dev · 2022-10-06 05:22
ElvishJerricco[m]yea I probably should have moved this conversation out of the #asahi-dev room once it went from pontificating about measured boot and turned into encryption troubleshooting#asahi-dev · 2022-10-06 05:21
ElvishJerricco[m]but assuming external drive booting is enabled, anyone can show up with a macOS usb drive and steal any unencrypted partitions#asahi-dev · 2022-10-06 05:20
ElvishJerricco[m]ok that makes sense#asahi-dev · 2022-10-06 05:20
ElvishJerricco[m]got it#asahi-dev · 2022-10-06 05:19
ElvishJerricco[m]but if your macOS side has FV enabled, then the whole disk is inaccessible once you boot until you do some kind of authentication#asahi-dev · 2022-10-06 05:17
ElvishJerricco[m]gotcha#asahi-dev · 2022-10-06 05:14
ElvishJerricco[m]yea but you have to boot and login to macOS somehow, which would require the user password, unless there's a way to enable booting a different installation of macOS without owner authentication, and I thought a feature of 1TR was to prevent that.#asahi-dev · 2022-10-06 05:08
ElvishJerricco[m]wait it doesn't require user authentication? Just physical presence?#asahi-dev · 2022-10-06 05:06
ElvishJerricco[m](and have a secure boot style chain)#asahi-dev · 2022-10-06 05:06
ElvishJerricco[m]so then encrypting the drive in Linux is just completely pointless as long as you trust your login program.#asahi-dev · 2022-10-06 05:04
ElvishJerricco[m]even if you're worried about the physical NAND being ripped off, doesn't the SEP encrypt all actual data before sending it to NAND?#asahi-dev · 2022-10-06 05:03
ElvishJerricco[m]that's true. Though in that case it begs the question: Why even encrypt the disk with LUKS, if the boot chain can't be tampered with?#asahi-dev · 2022-10-06 05:02
ElvishJerricco[m]well and in that case we would be relying on m1n1 to measure itself, since it sounds like the SEP doesn't expose its final measurement state, which is no good#asahi-dev · 2022-10-06 04:58
ElvishJerricco[m]for instance on my steam deck i use them both so that my drive is encrypted with a TPM-bound key, and that way if secure boot settings or my boot chain is tampered with, it suspiciously falls back to a disk password prompt because the TPM won't unlock the key.#asahi-dev · 2022-10-06 04:57
ElvishJerricco[m]The difference between secure boot and measured boot is significant though, and it's reasonable to want either one regardless of whether you want the other.#asahi-dev · 2022-10-06 04:55
ElvishJerricco[m]right#asahi-dev · 2022-10-06 04:54
ElvishJerricco[m]that's... interesting#asahi-dev · 2022-10-06 04:54
ElvishJerricco[m]ohh#asahi-dev · 2022-10-06 04:54
ElvishJerricco[m](which is why I asked about m1n1 implementing a fTPM, so that the later stages could use existing code)#asahi-dev · 2022-10-06 04:53
ElvishJerricco[m]it would mean each stage needing new code to measure the next one, but if the SEP has such a measurement feature that measures m1n1 then we should be good#asahi-dev · 2022-10-06 04:52
ElvishJerricco[m]Right but if the SEP implements some kind of measured boot of its own, then m1n1 would be measured into it and could continue the chain#asahi-dev · 2022-10-06 04:51
ElvishJerricco[m]"measured" means that the stage is hashed and that hash is combined with the current state of the PCR, *that* is hashed, and stored in the PCR#asahi-dev · 2022-10-06 04:51
ElvishJerricco[m]it's a general thing with the TPM. Every stage in the boot chain is "measured" into some of the PCRs in the TPM, including the platform firmware#asahi-dev · 2022-10-06 04:50
ElvishJerricco[m]no#asahi-dev · 2022-10-06 04:49
ElvishJerricco[m]Also does the SEP actually enable measured boot? I don't see anything like that in their docs, outside of a boot monitor thingy that seems only relevant to sepOS: https://support.apple.com/guide/security/secure-enclave-sec59b0b31ff/web#asahi-dev · 2022-10-06 04:49
ElvishJerricco[m]s/verify/measure/#asahi-dev · 2022-10-06 04:48
ElvishJerricco[m]right but then u-boot has to verify the boot loader which has to verify the kernel#asahi-dev · 2022-10-06 04:45
ElvishJerricco[m]unless you just boot the kernel directly, but like boot loaders are good#asahi-dev · 2022-10-06 04:45
ElvishJerricco[m]so that's m1n1, u-boot, and systemd-boot or grub that all need updates.#asahi-dev · 2022-10-06 04:44
ElvishJerricco[m]but yea we would need m1n1 and every boot stage up until Linux to support using the SEP if we can't provide a regular TPM device#asahi-dev · 2022-10-06 04:43
ElvishJerricco[m]Right, I think "reduced security" means we're using self signed keys, right?#asahi-dev · 2022-10-06 04:37
ElvishJerricco[m]implementation would be best, but a TPM can tell you a little more than that). 2) There's a LOT of existing userspace tools for using a proper TPM device. Like systemd has a variety of things having to do with it that enable e.g. passwordless disk/credential encryption.#asahi-dev · 2022-10-06 04:37
ElvishJerricco[m]chadmed: Well there's a couple of reasons to want a TPM. 1) They're meant to be available early in the boot process so that the PCRs contain firmware measurements. And doesn't asahi used "reduced security" or something, with some self signed keys that get enrolled with the platform? Because that means we can trust m1n1 stage 1, but we don't know what got started in between then and Linux (of course a proper secure boot#asahi-dev · 2022-10-06 04:16
ElvishJerricco[m]I wonder if it would be reasonably possible to implement a firmware TPM in m1n1 using the SEP. Or is m1n1 just too far out of the picture by the time the OS has booted?