Last active
January 19, 2026 08:34
-
-
Save evanp/874d92e8f5965fa59352e8c551507254 to your computer and use it in GitHub Desktop.
A minimal key object for ActivityPub
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "@context": [ | |
| "https://www.w3.org/ns/activitystreams", | |
| "https://w3id.org/security/v1", | |
| ], | |
| "id": "https://social.example/key/MZ46DLELS2e2sdggQO4aD", | |
| "type": "Key", | |
| "owner": "https://social.example/person/SEv678nDpuylYzZmdsfB9", | |
| "publicKeyPem": "<key material goes here>", | |
| "to": "as:Public", | |
| "attributedTo": "https://social.example/person/SEv678nDpuylYzZmdsfB9", | |
| "published": "2026-01-11T18:19:14Z" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://w3id.org/security/v1defines this asCryptographicKey(which maps to"@id": "sec:Key"or fullyhttps://w3id.org/security#Key)minimally, this is not needed. using the security v1 context, all you need is
publicKeyPem(from which you can infer the current object is a sec:Key) andowner(which is sec:owner, your backlink to the key's owner)the minimal object is this:
also of note:
ownerwas deprecated in favor ofcontroller(sec:controller,https://w3id.org/security#controller) because the concept of "ownership" doesn't really make sense for keys -- the key can be used by a controller for various purposes, and newer work using the Security Vocabulary defines an identity'sverificationMethods which may be used forauthentication(logging in),assertionMethod(making claims),keyAgreement(initiating communication sessions),capabilityInvocation(using object capabilities), andcapabilityDelegation(granting limited or full capabilities to another identity on your behalf). support for newer vocab (controller,publicKeyMultibase) is less widespread than older vocab (owner,publicKeyPem) but more than zero.