hhmx.de

Föderation EN Do 06.06.2024 07:38:03

Towards Federated Key Transparency

In late 2022, I blogged about the work needed to develop a specification for end-to-end encryption for the fediverse. I sketched out some of the key management components on GitHub, and then the public work abruptly stalled. A few of you have wondered what's the deal with that. This post covers why this effort stalled, what I'm proposing we do next.

soatok.blog/2024/06/06/towards

Föderation EN Do 06.06.2024 07:42:19

praise, but off topic

Föderation EN Do 06.06.2024 07:43:52

re: praise, but off topic

Föderation · Do 06.06.2024 07:58:07

@soatok

I say “limited” because it will only not support editing or deleting messages provided by another instance. It will only append data. [...] contains an Asymmetric Public Key, the user and instance that hosts it, and other metadata
that's enough data to count as PII under GDPR, you'd need to handle the right to be forgotten somehow

see
keys.openpgp.org/about for a pgp keyserver that solved this by separating the identity data from the public key data and letting you delete the former

Föderation EN Do 06.06.2024 08:18:30

@soatok instead of using user@server.example identities, I'd recommend just using the Actor's @id property: this shouldn't include PII or usernames, and is a URI of an actor document your service could routinely check (e.g., if the server indicates a brand new identity, you could automatically revoke keys), it's also returned from webfinger already

Föderation EN Do 06.06.2024 08:19:16

@thisismissem Sure. I *just* edited the post to deal with someone else's observation about GDPR.

Föderation EN Do 06.06.2024 08:30:18

@soatok this does pretty much match ideas I already had, just not a cryptographer so never knew how good those where.

Föderation EN Do 06.06.2024 08:31:03

@deetwenty The hard parts are making the protocol secure.

I kinda hand-waved those details for now.

Föderation EN Do 06.06.2024 08:45:02

@soatok probably not much a physicist who dabbles in computer science as a hobby can help with, I think

Föderation EN Do 06.06.2024 08:53:42

@soatok Is this finally a problem that distributed ledgers / blockchain is a solution for?

Oh, I see...

"Oh, and best of all? You can get all these wins without propping up any cryptocurrency bullshit either."

Föderation EN Do 06.06.2024 10:17:22

@soatok @frost I'd definitely go with `@id`s over `@@` handles. Mastodon is the odd one out for strongly keying on the latter and it's making life much harder for other implementors if they want to allow user-visible-handle changes (which would otherwise be trivial under AP).

That said, `@id`s are definitely PII in almost all implementations too, since most use predictable name-based URLs for that. You most likely need to make the server the authority for generating primary keys on request, or someone is going to make them predictable in a way that can't be disassociated from later.

Edit: User names also aren't 1:1 for identities. There's a primary one (usually), but any number of handles can refer to a single `@id`. The most common use is probably case-matching, but it can also be done cross-domain iirc.

Föderation EN Do 06.06.2024 17:11:29

@Qazm @frost OK. As long as @id is an understood pattern, I'll prefer that.

Föderation EN Do 06.06.2024 11:28:47

@soatok
Thanks for even doing the thinking about this! End-to-end-encryption and key management that isn't centralised is ... 😬 hard to get right

Föderation EN Do 06.06.2024 11:51:14

question: i don't see any verification of the identity. what's to stop me AddKey'ing my key as @soatok and not AddKey'ing your key until you pay up

also, what happens when someone deletes their account, ~~and also what happens when someone creates a new account with the same username~~ i guess this is no longer needed if usernames aren't the identifier

Föderation EN Do 06.06.2024 17:08:06

@tay Identity verification is out of scope. I don't care whether a public key maps to a government ID or not.

The only entity capable of issuing an initial AddKey for a given user is the instance. So you'd need access to their account or be the instance admin. And then the worst you can do is motivate them to switch instnaces lol

You can't publish an AddKey for accounts on any instance other than your own.

Föderation EN Do 06.06.2024 15:16:35

@soatok New PKI, sweet! Looks like it associates a string with a key in an append-only way? If that string doesn't need any special structure (say, a url pointing to a server that speaks a certain protocol), then it could be useful even for non AP-related projects?

Föderation EN Do 06.06.2024 18:51:37

Thanks for this post and your work! This will solve one of my current issues. @soatok

Föderation EN Do 06.06.2024 23:41:53

@soatok how would you handle a case where a server misses or is slow to process deletekey messages? Wouldn't some queries return keys that had actually been expired?

If a person tried to use an expired key, would they just fail to communicate with the recipient? (And that could present a bad experience)

Föderation EN Do 06.06.2024 23:48:51

@huxley Revocation is signed by the user, so we could let them send it directly to the directory service.

The first mile (AddKey) is the main piece that needs to be a Fedi message (with HTTP Signature).

Föderation · Fr 07.06.2024 02:12:34

@soatok The stated goals are similar to those of FEP-c390. In FEP-c390, however, the key is linked directly to an actor object, it doesn't require a separate server.

>We want Fediverse users to be able to publish a public key that is bound to their identity, which anyone else on the Internet can fetch and then use for various purposes.

Föderation EN Fr 07.06.2024 14:43:11

@soatok Interesting that revocation is *only* allowed when another key is live.

Does this mean that there would be no equivalent of a "revocation certificate", a pre-signed message that can be stored offline and produced at any later time to just say "this key is revoked"?

I guess you could mimic that by making an AddKey + RevokeKey pair. K1 adds K2, K2 revokes K1.

Föderation EN Fr 07.06.2024 15:04:15

@varx Because the rule of AddKey is once you exist, the server cannot push a self-sig

Föderation EN Fr 07.06.2024 20:08:35

@soatok Why can’t we move towards the #nostr model? This seems like bolting on a Keybase-like idea on top the #fediverse. I’d like to see derivable identities from a main secret key, which you can then use to sign/encrypt messages. This would seem to completely solve the instance-hopping issues newer users have at the same time – your identity is tied to the secret key signing the messages.