I was told by an IRCv3 member to make a non-IRCv3 draft/implementation before attempting an IRCv3 draft for it. So this goes here.
The basic idea is a mammon.io/message-sigs capability. Clients are encouraged to use this capability together with message IDs and server time.
The capability should look like mammon.io/message-sigs=<encoding>,<type>/<key>. Valid values for <type> are Ed25519. Valid values for <encoding> are base64 and hex. Valid values for <key> are hex-encoded (since this is only sent once, there's no point base64ing it) Ed25519 public keys.
Each message should have a mammon.io/sig tag, referred to as just sig from now on. The signature should be calculated by following these steps:
- Add
sig tag with padding signature (all 0's).
- Clamp message tags to 512 bytes.
- Remove
sig tag, without reordering tags.
- Calculate signature.
- Add
sig tag with valid signature, without reordering tags.
- Dispatch message.
(IRCv3 says nothing about reordering tags, so the "no reordering" restriction is fine.)
Servers may optionally validate the resulting message before dispatching it (between steps 5 and 6).
Clients should validate tags by following these steps:
- Remove
sig tag without reordering tags.
- Validate signature.
Clients may log signed messages for later sharing (through P2P) with other clients.
TODO:
I was told by an IRCv3 member to make a non-IRCv3 draft/implementation before attempting an IRCv3 draft for it. So this goes here.
The basic idea is a
mammon.io/message-sigscapability. Clients are encouraged to use this capability together with message IDs and server time.The capability should look like
mammon.io/message-sigs=<encoding>,<type>/<key>. Valid values for<type>areEd25519. Valid values for<encoding>arebase64andhex. Valid values for<key>are hex-encoded (since this is only sent once, there's no point base64ing it) Ed25519 public keys.Each message should have a
mammon.io/sigtag, referred to as justsigfrom now on. The signature should be calculated by following these steps:sigtag with padding signature (all 0's).sigtag, without reordering tags.sigtag with valid signature, without reordering tags.(IRCv3 says nothing about reordering tags, so the "no reordering" restriction is fine.)
Servers may optionally validate the resulting message before dispatching it (between steps 5 and 6).
Clients should validate tags by following these steps:
sigtag without reordering tags.Clients may log signed messages for later sharing (through P2P) with other clients.
TODO: