Closed JanisErdmanis closed 8 months ago
After the last commit https://github.com/PeaceFounder/PeaceFounder.jl/commit/0440fffb9e9a29bd74cbe880251ff78d68ba7947 the ticketid
is now been made redundant for the client registration. Next step is to remove it from the sent invite and refactor ticket struct to have a tokenid as cache.
An invite to a deme now has a following short form:
deme:?xt=sha256:FLSdIo-DzJZf_geHi8eO8kMzmLOZo8axdA5fcO_y8dM&sr=http://peacefounder.org&tk=rROIpybpRBk
where hash and token is encoded with bas64 encoding with replacements '+'=>'-'
and '/'=>'_'
. The token is limited to 8 bytes which is sufficient as probability for adversary guessing it is $P=1/10^{20}$.
The current invitation format, while functional, is rather verbose. It takes up too much space in the email, and the size of it can be offputting to users who need to copy and paste it. Another consideration is that the code could perhaps be made clickable, similar to how a magnet link works for torrent clients now.
As a reference, the current invite that PeaceFounder sends over email is as follows:
There are three improvements which can be made to make the invites better:
Removing
ticketid
from Invites: Theticketid
field can be eliminated from the invite structure. Instead, we can use thetoken
to derive asessionid
by hashing the token.Adopting a Magnet Link Inspired Format: Transitioning from JSON to a magnet link-inspired format will further streamline the invitation system. The proposed format is more compact and human-readable, which is beneficial for both use and debugging:
This format maintains readability, which is essential for debugging while ensuring the invite is concise.