presence 0.2.0

Privacy friendly presence tokens
Documentation

Presence

Lib and tool to generate short discrete presence tokens.

The token can be verified for validity in a certain time range, but otherwise appears random and is plausibly deniable. This should be good for privacy!

Anatomy

The token shall be conveyed in a upper-hex string or in binary 8 bytes array.

The first 4 bytes is a sha256 hash of the salt upper-hex + the unix timestamp decimal string.

The other 4 bytes is the random salt.

CLI

The companion CLI tool will verify or generate presence tokens.

Install:

$ cargo install presence

Usage:

# generate a new token
$ presence new
67CE238185EA6D0B
# or a few
$ presence new new new new
54C2BACC2E2DAF45
FBB0E058058CFF1E
71FE18E54F52DC76
22E8DAEBBDD7A220
# check a token
$ presence 1234567890123456
1234567890123456 None
$ presence nonsense
nonsense Failed: string must be 16 bytes long
$ presence nonsenseXXXXXXXX
nonsenseXXXXXXXX Failed: string must be a hex
# also works with stdin when no args are given
$ presence 1234567890123456 | presence
1234567890123456 None
# and you can use stdin to also generate tokens with empty line
$ echo "" | presence
FFA86CA7292F9225