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

General improvements to WakuRelay spec #316

Merged
merged 5 commits into from
Apr 6, 2021

Conversation

jm-clius
Copy link
Contributor

@jm-clius jm-clius commented Apr 1, 2021

This PR closes #266.

It adds improvements to the WakuRelay specification, including:

  • several clarifications of WakuRelay's relationship to libp2p GossipSub and the scope of each specification
  • corrections to Wire Specification, including how fields must be populated according to a StrictNoSign policy. This section should not be a review of PubSub, but a specification of WakuRelay's use of PubSub.
  • removed content that purely deals with how GossipSub works and has no bearing on WakuRelay and its goals
  • adding semantic line breaks according to https://sembr.org/. (Thanks for this suggestion, @D4nte. I think it will improve our specs if we use this as a best practice.)
  • general cleanup

Copy link
Contributor

@staheri14 staheri14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice set of clarifications and edits! well-done!

content/docs/rfcs/11/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@oskarth oskarth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clean up PR, looks good!


**Protocol identifier***: `/vac/waku/relay/2.0.0-beta2`
`WakuRelay` specifies a [Publish/Subscribe approach](https://docs.libp2p.io/concepts/publish-subscribe/) to peer-to-peer messaging with a strong focus on privacy, censorship-resistance, security and scalability.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead if WakuRelay I'd call this 11/WAKU2-RELAY (ditto other parts of the spec)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in aeae2b5


**Protocol identifier***: `/vac/waku/relay/2.0.0-beta2`
`WakuRelay` specifies a [Publish/Subscribe approach](https://docs.libp2p.io/concepts/publish-subscribe/) to peer-to-peer messaging with a strong focus on privacy, censorship-resistance, security and scalability.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add all the unique links to a Reference section at the end, so we know what we are building on / make sure it is a canonical place / no dead links etc. No need for reference number though, just in addition to what exists now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in aeae2b5


# Security Requirements

The `WakuRelay` protocol is designed to provide the following security properties under a static [Adversarial Model](#adversarial-model). Note that data confidentiality, integrity, and authenticity are currently considered out of the scope of the `WakuRelay` protocol and must be handled by the upper-level protocols such as [WakuMessage](https://github.com/vacp2p/specs/blob/master/specs/waku/v2/waku-message.md).
The `WakuRelay` protocol is designed to provide the following security properties under a static [Adversarial Model](#adversarial-model).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting - the spacing looks bigger than one newline but maybe this is just GH preview? (Same in other places, but doesn't look like newline or newspace)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmm, interesting. There's only a single LF-character each after lines 24 and 25. Think this may be a preview thing - there were double LFs elsewhere, which I've fixed in aeae2b5.


# Security Requirements

The `WakuRelay` protocol is designed to provide the following security properties under a static [Adversarial Model](#adversarial-model). Note that data confidentiality, integrity, and authenticity are currently considered out of the scope of the `WakuRelay` protocol and must be handled by the upper-level protocols such as [WakuMessage](https://github.com/vacp2p/specs/blob/master/specs/waku/v2/waku-message.md).
The `WakuRelay` protocol is designed to provide the following security properties under a static [Adversarial Model](#adversarial-model).
Note that data confidentiality, integrity, and authenticity are currently considered out of scope for the `WakuRelay` protocol and must be handled by higher layer protocols such as [WakuMessage](https://github.com/vacp2p/specs/blob/master/specs/waku/v2/waku-message.md).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should link to rfc site url

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think @oskarth was able to use relative links in another PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in aeae2b5


## Signature Policy

The `StrictNoSign` option MUST be used.
The [`StrictNoSign` option](https://github.com/libp2p/specs/blob/master/pubsub/README.md#signature-policy-options) MUST be used, to ensure that messages are built without the `signature`, `key`, `from` and `seqno` fields. Note that this does not merely imply that these fields be empty, but that they MUST be _absent_ from the marshalled message.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the significance of this distinction?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use sembr

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a slight semantic difference between an empty field and an absent field in protobuf (an empty field will still have a populated field tag number when marshalled, which could lead to dodgy interpretations when unmarshalled). The latter is specified by PubSub for StrictNoSign, but repeated here as it may be an important implementation requirement for 11/WAKU2-RELAY.

content/docs/rfcs/11/README.md Outdated Show resolved Hide resolved
Integrity and authenticity are typically addressed through digital signatures and Message Authentication Code (MAC) schemes, however, the usage of digital signatures (where each signature is bound to a particular peer) contradicts with the unlinkability requirement (messages signed under a certain signature key are verifiable by a verification key that is bound to a particular publisher).
As such, integrity and authenticity are missing features in the `WakuRelay` protocol in the interest of unlinkability.
In future work, advanced signature schemes like group signatures can be utilized to enable authenticity, integrity, and unlinkability simultaneously.
In a group signature scheme, a member of a group can anonymously sign a message on behalf of the group as such the true signer is indistinguishable from other group members. <!-- TODO: shall I add a reference for group signatures?-->


# Changelog
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the simplification of lifecycle we could probably do away with this section. Draft means things can change, and once in stable it should only have cosmetic changes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean to move this content away from the "Future Work"-section or to remove this section completely, including the content?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, wait. I realise now that you're probably referring to the Changelog section, not the Future Work section? 😀

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct

Co-authored-by: Sanaz Taheri Boshrooyeh <35961250+staheri14@users.noreply.github.com>
content/docs/rfcs/11/README.md Outdated Show resolved Hide resolved

# Security Requirements

The `WakuRelay` protocol is designed to provide the following security properties under a static [Adversarial Model](#adversarial-model). Note that data confidentiality, integrity, and authenticity are currently considered out of the scope of the `WakuRelay` protocol and must be handled by the upper-level protocols such as [WakuMessage](https://github.com/vacp2p/specs/blob/master/specs/waku/v2/waku-message.md).
The `WakuRelay` protocol is designed to provide the following security properties under a static [Adversarial Model](#adversarial-model).
Note that data confidentiality, integrity, and authenticity are currently considered out of scope for the `WakuRelay` protocol and must be handled by higher layer protocols such as [WakuMessage](https://github.com/vacp2p/specs/blob/master/specs/waku/v2/waku-message.md).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think @oskarth was able to use relative links in another PR.


## Signature Policy

The `StrictNoSign` option MUST be used.
The [`StrictNoSign` option](https://github.com/libp2p/specs/blob/master/pubsub/README.md#signature-policy-options) MUST be used, to ensure that messages are built without the `signature`, `key`, `from` and `seqno` fields. Note that this does not merely imply that these fields be empty, but that they MUST be _absent_ from the marshalled message.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use sembr

jm-clius and others added 3 commits April 6, 2021 10:53
Co-authored-by: Sanaz Taheri Boshrooyeh <35961250+staheri14@users.noreply.github.com>
@jm-clius jm-clius merged commit 608b04a into master Apr 6, 2021
@jm-clius jm-clius deleted the improvement/waku-relay-improvements branch April 6, 2021 15:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

11/WAKU2-RELAY: General spec improvement
4 participants