Dual-stack HTTP message signatures for ActivityPub.
Provides signing and verification for both:
- Cavage draft-12 — the de-facto Fediverse standard (Mastodon, Pleroma, Lemmy, Misskey, …)
- RFC 9421 — the finalized IETF HTTP Message Signatures standard (Mastodon 4.5+ accepts both)
Algorithms supported out of the box:
rsa-sha256(2048/4096-bit) — legacy main-key format, required for interop with current Mastodoned25519— FEP-521a Multikey, recommended for new deployments
All cryptographic primitives are backed by aws-lc-rs, a memory-safe,
constant-time, FIPS 140-3 validated library maintained by AWS. This crate
is therefore not affected by RUSTSEC-2023-0071 (Marvin Attack) that
impacts the pure-Rust rsa crate.
The crate is HTTP-framework agnostic: it operates on [http::Request]
values and leaves transport to the caller.
Example — Cavage signing
# use ;
# use ;
let key = generate_ed25519;
let body: = br#"{"type":"Follow"}"#.to_vec;
let mut req = builder
.method
.uri
.header
.header
.header
.header
.body
.unwrap;
let signer = new;
signer.sign.unwrap;
assert!;