Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

topic in HDF should be hashed #260

Open
arnauorriols opened this issue Jun 14, 2022 · 4 comments
Open

topic in HDF should be hashed #260

arnauorriols opened this issue Jun 14, 2022 · 4 comments

Comments

@arnauorriols
Copy link
Contributor

Description

BranchAnnouncements securely mask the topic of the new branch being created. However, messages published to the branch include the topic in the HDF, which is readable by anybody.

Solution

BranchAnnouncements and Keyloads (assuming #259) carry over the topic of the branch in a secure manner. This means that any subscriber that is supposed to be aware of a topic to which a message is sent, must have already gotten access to the topic plaintext. If the mapping of the cursors of the branches is done with the hash of the topics instead of their plaintext, the HDF only need to include such hash.

@DyrellC
Copy link
Contributor

DyrellC commented Jun 20, 2022

The only problem I see with this is that we store cursors based off of Topic, so if we don't have the Topic in the HDF, the insert_cursor() function will have to occur after unwrapping (which can potentially fail). This would change the logic order for handling each of the messages.

@arnauorriols
Copy link
Contributor Author

arnauorriols commented Jun 21, 2022

If the mapping of the cursors of the branches is done with the hash of the topics instead of their plaintext, the HDF only need to include such hash.

Doesn't this already account for that?

@DyrellC
Copy link
Contributor

DyrellC commented Jun 21, 2022

Ah, yes it would, I misread that part. If we map by hash though we can only display hashes later (like when pulling topics() or when printint cursor store). Essentially in this approach once you've seen the plaintext and hash/store it, you'd never see the plaintext anywhere else again, which might make the creation of a new branch from an old topic a bit of a problem unless it's stored external to the stream for the users. 🤔

@kwek20
Copy link
Contributor

kwek20 commented Jun 21, 2022

Hmm it would also make it hard to join a stream and iterate all topics to join the ones you want (like we discussed a few weeks ago)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants