Masques documentation wiki

Masques is an open source, distributed, encrypted social network

User Tools

Site Tools


Identities and Destinations

Identities are not user names, and user names are not unique

A Masques user may have multiple friends with the same user name. How does that work?

An identity is a set of public/private keys, with a user name attached. Masques sees public keys instead of user names any time Masques needs to know an identity. Users see the user names of their friends, not the public key, because user names are easier for humans.

The user name “morpheus” is much easier for a human to deal with than the public key:


One day you might friend a _second_ person with the user name “morpheus.” Masques is OK with that and will not get confused. User names are not (and can not) be forced to be unique because Masques does not (and can not) have a centralized database of user names.

Bothered by non-unique user names? Sorry. Welcome to the world of distributed social networking.

Non-unique user names are a fact in Masques (and any true p2p network) and, if they are to be viewed as a problem, must be viewed as a usability problem. That way the “problem” can be solved.

S-expressions (kinda)

Identities and destinations are persisted as Clojure maps (very similar to lisp S-expressions).

Early development versions of Masques used a single XML file to persist both the identity and destination. These are no longer valid.

Examples of valid identities and destinations are below.

Forbidden characters

There are only two forbidden characters and they are totally forbidden (you may not even use them if they are escaped). The two forbidden characters are:

  • double quote (”)
  • space ( )

All other characters are considered valid.


An identity includes (at least):

  • name (human friendly username)
  • key (public)
  • algorithm (encryption technique)

Example idenitity

{ :name “morpheus” :key “MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCKs53WL6vLEK1nO2smeb420aucS5ww3iNMv+ZnVPQfqmHDbQcySwfYcnorMA7+tlPOOCy0LGG7LzSJpy8/GDHIgHUKIf3wGPm/SiqU5Ina38HrMDh9hfXuLMErdEEL5nRD9Q+JJnG3x1RbRBhrzahIujS/Zw8dm8RYn3BOCjbsgwIDAQAB” :algorithm “RSA” }


A destination includes (only):

Example destination

{ :destination “rVPi1MYulYsXwM79N5tCXwuu4dPYIDvvHJPByZdzGRk5KjtNC4hqVCx74ilVVHc59fozQm230iOWL4lZtuRlCjsfXjqrTaFFRnQ8YIUfQ~HgbcBJiKsxZuIWmoQ4ojnBXVwvcg~OG78vVODb~sale1dJiDXmwatUnHWrcUYEJSICaa-IMM2KGDE0axty7QYSf4oJ-m9yela0YqrYNOPggtb9YWoL2vYiuVCkH90btubFsuY0F-U-99xcPG0hHw4YOGxTVC-~FeuqURF5uJXMG4a4RfmIyVnq7bVy08sKI8fbyKGUEcVAwmUweLd64195Xs0iuEB2pfQWgle~4WYMSDLTTjisfONyGMSnqrB2HV9q6borapavfCCGcJkHhrAvzm7UmM22XmeQSFOlnE1GwWkQI0rWsKzf4W5DeIZOlNg-KSeZAL2knBNGPsHRBWFX6Dv-fQA-efuKsRPNIb7uXy8aeKQ2JOJZc-nnfI8iQV70wEoMDkQokc61ey1oJeVNAAAA” }

  • The QR codes page has details on how to persist identities and destinations to QR codes.
  • The file encoding page has helpful information on persisting identites and destinations (hint: UTF-8).
identities_and_destinations.txt · Last modified: 2014/11/03 17:00 (external edit)