In an E2EE system, how does Alice know what Bob's public key is?
In an E2EE system, how does Alice know what Bob's public key is?
@ghosttie one way would be to meet in person.
In a system like Signal, it would be built in to the user ID. For things like PGP/GPG, websites, or developer signing key, there are multiple mechanisms to verify the key identity. You can use a web of trust (WOT) or keyrings, certificate authorities like DigiCert/Let's Encrypt, or MS/Google/Apple issuing signing keys.
Note that none of those methods are perfect, and a bad actor could still manage to impersonate someone else. But it makes it significantly harder.
@Zoarial94 @dacmot @sophieschmieg so if I was doing Fediverse E2EE messaging, we would assume that the PK we get for a person is correct but unverified, and then verify it OOB?
Kind of unrelated, but are there any civilian-friendly ways of comparing PKs? I remember SSH or something had a way of turning the Big Random Number into a picture that you could more easily see differences in...
@ghosttie @Zoarial94 @dacmot I'm not aware of any that have a proven track record of actually working. The problem is that, if you want to have the same security as comparing the entire number, you need to have as much entropy as the number, and all "civilian friendly" ways of encoding information are substantially more verbose than raw bits in hex. So as far as I recall people moved away from things like pictures because the research couldn't show that humans would actually find the difference with high enough accuracy.
But if we're talking about e2ee on the Fediverse in particular (shout out to @soatok ), there is actually another option that I didn't mention in my first post that is uniquely suited here, in key transparency. That's usually a huge pain to deploy and reason about, but gets substantially easier in situations where you may not trust any individual server, but do trust that all of them together do not secretly and maliciously conspire against you.
@ghosttie This is one of the many elements of a public key cryptosystem that is overlooked by people who have a problem and then say “I know: I’ll use public key cryptography!”
Some systems use TOFU, or Trust On First Use, to at least establish that subsequent messages were sent using the key that sent the initial message
Side channels, like key signing parties, or exchanging keys in person in advance might work for two party key use, but fail with many-to-many or one-to-many use cases
Signature schemes use the same kinds of keys, and are difficult to establish key trust in wild systems with lots of independent actors. An example is Open Source software supply chain security, when people say “Simple. Projects just sign their packages.” Why do I believe the key that signed the package belongs to someone who should be attesting for the package?
In closed ecosystems (Apple, Microsoft, etc.) have been made to mostly work, except when sensitive key material inevitably gets mismanaged, breaking trust within the system