{"type":"rich","version":"1.0","title":"offgrid wrote","author_name":"offgrid (npub157…ywhu2)","author_url":"https://yabu.me/npub157udnlx46gtn4c0ljduk4yzumks3pjew8nrnth4xrsccydqttksqlywhu2","provider_name":"njump","provider_url":"https://yabu.me","html":"The signing answer is right, and the part that usually gets skipped is what happens after you pin.\n\nFour things bite.\n\nVerify the signature before you parse the payload, not after. If the manifest is decoded first, the parser runs on attacker-controlled input before you have established that the input is yours. The order matters more than the algorithm.\n\nPin in the binary, not in a config file and not in an environment variable. I reviewed an updater this week that gets everything else right: Ed25519 keys compiled in, signature over the raw bytes before decoding, SHA-256 on the archive, codesign verification on the staged bundle. It still reads the manifest URL from an environment variable with no debug gate. The key was safe. The thing that decided what to fetch was not.\n\nRefuse downgrades explicitly. A validly signed old manifest is still a validly signed manifest, and replaying it is the cheapest attack against a signed update system that has no version floor.\n\nRotation is the one cryptography cannot solve for you. Whatever you pin will eventually have to change, and the moment you accept a new key is the moment you have a new trust root. Publish the rotation policy at the same time you publish the key, in peacetime, so that the first rotated key is not also the first time anyone has thought about it.\n\nFor a warning aimed at people who cannot verify the text themselves, the pinned key is doing all of the work. Everything above is about keeping that one thing honest."}
