@@ -745,16 +745,66 @@ const federation = createFederation({
745745HTTP Signatures
746746---------------
747747
748- [ HTTP Signatures] is a de facto standard for signing ActivityPub activities.
749- It is widely used in the fediverse to verify the sender's identity and
750- the integrity of the activity.
748+ Draft cavage [ HTTP Signatures] is a de facto standard for signing ActivityPub
749+ activities. Although it is not a finalized specification, it is still widely
750+ used in the fediverse to verify the sender's identity and the integrity of
751+ the activity.
751752
752753Fedify automatically signs activities with the sender's private key if
753754the [ actor keys dispatcher is set] ( ./actor.md#public-keys-of-an-actor ) and
754755the actor has any RSA-PKCS #1 -v1.5 key pair. If there are multiple key pairs,
755756Fedify selects the first RSA-PKCS #1 -v1.5 key pair among them.
756757
757- [ HTTP Signatures ] : https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures
758+ [ HTTP Signatures ] : https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures-12
759+
760+
761+ HTTP Message Signatures
762+ -----------------------
763+
764+ * This API is available since Fedify 1.6.0.*
765+
766+ [ RFC 9421] , also known as * HTTP Message Signatures* , is the final revision of
767+ the HTTP Signatures specification. Although it is the official standard,
768+ it is not widely used in the fediverse yet. As of May 2025, major ActivityPub
769+ implementations, such as Mastodon, et al., still rely on the draft cavage
770+ version of HTTP Signatures for signing portable activities.
771+
772+ Fedify automatically signs activities with the sender's private key if
773+ the [ actor keys dispatcher is set] ( ./actor.md#public-keys-of-an-actor ) and
774+ the actor has any RSA-PKCS #1 -v1.5 key pair. If there are multiple key pairs,
775+ Fedify selects the first RSA-PKCS #1 -v1.5 key pair among them.
776+
777+ > [ !NOTE]
778+ > Although HTTP Message Signatures support other than RSA-PKCS #1 -v1.5,
779+ > Fedify currently supports only RSA-PKCS #1 -v1.5 key pairs for generating
780+ > HTTP Message Signatures. This limitation will be lifted in the future
781+ > releases.
782+
783+ [ RFC 9421 ] : https://www.rfc-editor.org/rfc/rfc9421
784+
785+
786+ Double-knocking HTTP Signatures
787+ -------------------------------
788+
789+ * This API is available since Fedify 1.6.0.*
790+
791+ As you read above, there are two revisions of HTTP Signatures:
792+ the [ draft cavage] [ HTTP Signatures ] version and the [ RFC 9421] version.
793+ The draft cavage version is declared as obsolete, but it is still widely used
794+ in the fediverse, and many ActivityPub implementations still rely on it.
795+ On the other hand, the RFC 9421 version is the official standard, but
796+ it is not widely used yet.
797+
798+ To support both versions of HTTP Signatures, Fedify uses the [ double-knocking]
799+ mechanism: trying one version, then falling back to another if rejected.
800+ If it's the first encounter with the recipient server, Fedify tries
801+ the RFC 9421 version first, and if it fails, it falls back to the draft
802+ cavage version. If the recipient server accepts the RFC 9421 version,
803+ Fedify remembers it and uses the RFC 9421 version for the next time.
804+ If the recipient server rejects the RFC 9421 version, Fedify falls back
805+ to the draft cavage version and remembers it for the next time.
806+
807+ [ double-knocking ] : https://swicg.github.io/activitypub-http-signature/#how-to-upgrade-supported-versions
758808
759809
760810Linked Data Signatures
@@ -914,3 +964,5 @@ new Follow({
914964~~~~
915965
916966[ Threads ] : https://www.threads.net/
967+
968+ <!-- cSpell: ignore cavage -->
0 commit comments