crossbario / crossbario/autobahn-python

Cryptobox review: signature scope

Open
#916 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs-discussion wamp
Dominant language
Python
Stars
2.5k
Forks
768
PR merge metrics
No merged PRs in 30d

Description

WAMP-cryptobox works by computing a signature over and encrypting a bytes serialization of the following:

payload = {
    u'uri': uri,
    u'args': args,
    u'kwargs': kwargs
}

However, the URI is the only WAMP metadata that is included and checked under the signature.

The design question is: is that signature scope (uri/args/kwargs) enough?

Are there other things besides uri/args/kwargs a receiving client would expect to be untampered under end-to-end encryption (by being part of the stuff that goes into signature)?

Essentially, everything not under the scope of the signature must be treated "untrusted" by the receiving peer. Any intermediary WAMP router between the sending and the receiving peer might have tampered with stuff not under the signature.


Implementation wise the main thing to check is: is the URI contained within the bytes under the signature (still) the same as the URI in the WAMP message envelope? If not, someone tampered with the URI, and this should be treated as "fatal".

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read autobahn/wamp/cryptobox.py around line 197 and autobahn/wamp/protocol.py around line 738 to trace the signed bytes and the WAMP message envelope. Determine which metadata must be covered and verify whether the embedded URI matches the envelope URI. Done means a decided signature scope and a defined fatal-handling requirement.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cryptography, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.