syntax = "proto3"; package libp2p.topic_descriptor.v1; //!Topic Descriptor //! //! The topic descriptor message is used to define various options and parameters of a topic. It currently specifies //! the topic's human readable name, its authentication options, and its encryption options. The AuthOpts and EncOpts //! of the topic descriptor message are not used in current implementations, but may be used in future. For clarity, //! this is added as a comment in the file, and may be removed once used. //! //! https://github.com/libp2p/specs/blob/master/pubsub/README.md#the-topic-descriptor message TopicDescriptor { optional string name = 1; optional AuthOpts auth = 2; optional EncOpts enc = 3; message AuthOpts { optional AuthMode mode = 1; repeated bytes keys = 2; // root keys to trust enum AuthMode { NONE = 0; // no authentication, anyone can publish KEY = 1; // only messages signed by keys in the topic descriptor are accepted WOT = 2; // web of trust, certificates can allow publisher set to grow } } message EncOpts { optional EncMode mode = 1; repeated bytes key_hashes = 2; // the hashes of the shared keys used (salted) enum EncMode { NONE = 0; // no encryption, anyone can read SHAREDKEY = 1; // messages are encrypted with shared key WOT = 2; // web of trust, certificates can allow publisher set to grow } } }