Exchange Protocol Messages - SafeSlingerProject/SafeSlinger-Media GitHub Wiki

This is a list of messages sent and received for any given client during a SafeSlinger Exchange protocol session. Several use cases are outlined along with required user interactions. This list can be used for planning the mode of transportation in future versions of the exchange library. That will allow developers to use the best communication system for their solution (internet, bluetooth, wifi direct, NFC) while the message generation and consumption is abstracted from the mode of transportation.

Messages sent in decentralized use cases can minimize messages received as the protocol scales to more users by allowing the host to send all available elements of the protocol for other group members which share the same link-id.

Terms

  • data: the data we intend to verify, commonly a public key, account number, or other PII.
  • -commit: 256-bit length, SHA-3 root of commitment tree.
  • -id: integer (low entropy, often ranging 11-99).
  • link-id: integer, common lowest -id number for grouping.
  • -encdata: 1920-bit minimum length, a triplet of 3 values: 128-bit minimum AES encrypted data, 1536-bit DH 1/2 key, 256-bit SHA-3 hash of decision fork.
  • -sig: 512-bit length, 2 256-bit SHA-3 or error nonce values of tree match/error decision fork.
  • -node: 1536-bit length, STR public node value (for 3+ users).
  • -encnonce: 256-bit length, AES encrypted 256-bit match nonce.

#Decentralized 2-User (5 msg out, 5 msg in)

Given 2 users, a and b, from the perspective of a, where users have no existing means of forming a group, messages sent and received using a host.

assignUser

  • to host (a-commit)
  • from host (a-id)

(display id to user, wait for choice)

syncCommit

  • to host (a-id, link-id)
  • from host (b-id, b-commit)

syncData

  • to host (a-id, a-encdata)
  • from host (b-id, b-encdata)

(display 3-word phrases to user, wait for choice)

syncSignatures

  • to host (a-id, a-sig)
  • from host (b-id, b-sig)

syncMatch

  • to host (a-id, a-encnonce)
  • from host (b-id, b-encnonce)

#Decentralized 3-User (6 msg out, 5 msg in)

Given 3 users, a, b, and c, from the perspective of a, where users have no existing means of forming a group, messages sent and received using a host.

assignUser

  • to host (a-commit)
  • from host (a-id)

(display id to user, wait for choice)

syncCommit

  • to host (a-id, link-id)
  • from host (b-id, b-commit, c-id, c-commit)

syncData

  • to host (a-id, a-data)
  • from host (b-id, b-data, c-id, c-data)

(display 3-word phrases to user, wait for choice)

syncSignatures

  • to host (a-id, a-sig)
  • from host (b-id, b-sig, c-id, c-sig)

syncNodes (if a and b are the first STR leaf nodes)

  • to host (c-id, c-node)
  • (Alternatively if b and c are the first STR leaf nodes, the message count becomes 5 msg out, 6 msg in, and the message changes to: "from host (c-id, c-node)" or "from host (b-id, b-node)")

syncMatch

  • to host (a-id, a-encnonce)
  • from host (b-id, b-encnonce, c-id, c-encnonce)

#Centralized 2-User (4 msg out, 4 msg in)

Given 2 users, a and b, from the perspective of a, where users do have an existing means of forming a group, messages sent and received directly.

syncCommit

  • to b (a-id, a-commit)
  • from b (b-id, b-commit)

syncData

  • to b (a-id, a-encdata)
  • from b (b-id, b-encdata)

(display 3-word phrases to user, wait for choice)

syncSignatures

  • to b (a-id, a-sig)
  • from b (b-id, b-sig)

syncMatch

  • to b (a-id, a-encnonce)
  • from b (b-id, b-encnonce)