Skip to content

Allocate a mailbox without a nameplate #307

@timmc

Description

@timmc

I'm developing an application called "breakmancer" where the two parties would like to connect via wormhole but have an existing piece of shared information. Ideally I would just derive a mailbox code from this shared information (by hashing it and converting to a large number) but the Rust implementation does not allow for directly creating a Mailbox object and using it in the rendezvous protocol -- everything has to go through Codes instead.

In practice, supporting this might just involve the following:

  • Undeprecate RendezvousServer
  • Make Mailbox public
  • Applications can then use RendezvousServer.html::open_directly

My workaround has been to generate a nameplate+password (in a similar manner) where the nameplate is deterministically random within 0..i64::MAX. [EDIT: Upper bound.] This makes it very unlikely that there will be a collision with a nameplate already in use. The generated code looks like 2169281208640752923-34d1MHZZDjhn7SHG7. It works, but it would be nice if I could instead target a Mailbox directly, which I believe the Python implementation allows.

One wrinkle here is that the protocol documentation doesn't indicate what range of numeric strings should be accepted by a rendezvous server. I could imagine specifying a minimum range directly in the protocol (my preference), having the server advertise it, or extending the protocol to convert a string deterministically into a mailbox number.

(I might also be able to refactor my application in such a way that it could ask the rendezvous server for a random Code, but it might be non-trivial to do so.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions