Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

message-sigs #93

Open
3 tasks
SoniEx2 opened this issue Feb 1, 2017 · 0 comments
Open
3 tasks

message-sigs #93

SoniEx2 opened this issue Feb 1, 2017 · 0 comments

Comments

@SoniEx2
Copy link

SoniEx2 commented Feb 1, 2017

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:

  1. Add sig tag with padding signature (all 0's).
  2. Clamp message tags to 512 bytes.
  3. Remove sig tag, without reordering tags.
  4. Calculate signature.
  5. Add sig tag with valid signature, without reordering tags.
  6. 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:

  1. Remove sig tag without reordering tags.
  2. Validate signature.

Clients may log signed messages for later sharing (through P2P) with other clients.

TODO:

  • Specify the procedure for key change.
  • Come up with a way to have different keys for each server on a network. Clients should keep track of all server keys and servers should sync keys somehow.
  • Specify the base64 dictionary to use.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant