diff --git a/BSP.markdown b/BSP.markdown index ac04fe9..be996b1 100644 --- a/BSP.markdown +++ b/BSP.markdown @@ -16,15 +16,16 @@ BSP uses a cryptographic hash function, H(m), with an output length of HASH_LEN > Implementation note: We propose to use BLAKE2s as the hash function, which gives HASH_LEN = 32. -### Channel identifiers +### Client identifiers -Each channel has a unique identifier HASH_LEN bytes long. This identifier is supplied by the client and is not interpreted by BSP, but to prevent collisions between clients, BSP specifies how channel identifiers may be generated. The channel identifier may be random: - -* `channel_id = R(HASH_LEN)` - -Alternatively, the channel identifier may be the hash of a random client identifier HASH_LEN bytes long and a client data structure describing the channel: +Each client has a unique identifier HASH_LEN bytes long: * `client_id = R(HASH_LEN)` + +### Channel identifiers + +Each channel has a unique identifier HASH_LEN bytes long, which is the hash of the client identifier and a client data structure describing the channel: + * `channel_id = HASH("CHANNEL_ID", client_id, client_data_structure)` Including the client identifier in the hash prevents collisions between clients that use similar data structures.