diff options
Diffstat (limited to 'packages/meshbay-common/src/meshbay_common/groupbox.py')
| -rw-r--r-- | packages/meshbay-common/src/meshbay_common/groupbox.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/meshbay-common/src/meshbay_common/groupbox.py b/packages/meshbay-common/src/meshbay_common/groupbox.py index e020ed8..3b45dba 100644 --- a/packages/meshbay-common/src/meshbay_common/groupbox.py +++ b/packages/meshbay-common/src/meshbay_common/groupbox.py @@ -54,6 +54,10 @@ PURPOSE_UPLOAD = "upload" # the chat archive is encrypted under; this is only how they travel, which is # why rotating the group key costs a re-wrap and not a re-encryption. PURPOSE_CHAT_KEYS = "chat_keys" +# The group's roster of members and their device keys, on its way to a member. +# Sealed for the same reason the index is: it is the group's membership, and a +# peer that has not completed the handshake has no business reading it. +PURPOSE_ROSTER = "roster" # `salt=None` here and `salt: new Uint8Array(0)` in crypto.js agree — RFC 5869 # extracts with a zero key either way. Already proven in production by @@ -63,6 +67,7 @@ _INFO = { PURPOSE_ACK: b"meshbay:ack:v1", PURPOSE_UPLOAD: b"meshbay:upload:v1", PURPOSE_CHAT_KEYS: b"meshbay:chat_keys:v1", + PURPOSE_ROSTER: b"meshbay:roster:v1", } # One subkey per purpose, and `seal` draws a fresh 96-bit nonce per message, so |