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. It give a non-zero exit code if no presence is matched or generated (like grep)
It can also produce presence signed with ed25519 if you specify SECRET (string to be hashed into a seed), SECRET_SEED (32 bytes as hex), or SECRET_SEED_FILE (file containing 32+ bytes in binary, only first 32 are read).
Install:
Usage:
generate a new token or a few
check a token
also works with stdin when no args are given
|
and you can use stdin to also generate tokens with empty line
|
ouroboros, printing the matching timestamp
| |
we can create the same presence token in shell easily
time=1710799816 salt=94640BA7
generate 3 x ed25519 signed presence revealing the public key
|
SECRET_SEED_FILE="/dev/stdin" REVEAL_PUBLIC_KEY=yp
stay present
; do ; done |