olc — the Olvid library CLI / demo harness
olc is a low-level command-line tool that drives this repo's Olvid library directly. It is a
developer and testing harness — it exercises identity generation, authentication, device discovery,
the WebSocket, message send/receive, oblivious-channel creation, and the SAS trust exchange, against the
live Olvid servers or in a self-contained demo. For an end-user experience, use oigw
instead.
There is a step-by-step tour in ../../OLC_WALKTHROUGH.md.
go build ./cmd/olc
./olc # prints usage
Two families of commands
olc works either with a plaintext identity file (.olv, convenient for quick experiments) or with
the encrypted store (db-*, the same at-rest-encrypted SQLite database oigw uses).
Identity-file commands
| Command |
What it does |
gen |
generate a new owned identity and write it to a file |
whoami |
print an identity's public bytes + invitation link |
auth |
authenticate to the server and fetch a session token |
register |
register the device for push notifications |
discover |
run device discovery for a given identity |
ws |
open the notification WebSocket and print events (e.g. return receipts) |
send |
send an application message to a recipient (or to self) |
recv |
download and decrypt pending messages |
adddevice |
write a new device file for the same identity (fresh device UID) |
channeldemo |
create two ephemeral identities, establish an oblivious channel over the network, and exchange a forward-secret message |
sasdemo |
run the full SAS trust-establishment exchange between two ephemeral identities |
Encrypted-store commands (db-*)
| Command |
What it does |
db-init |
create and persist an identity in a new encrypted store (-paranoid for the strong KDF) |
db-send |
send a message using a store-backed session |
db-recv |
receive/decrypt using a store-backed session |
db-history |
print the stored state (identity, channels, contacts, …) |
db-passwd |
change the store passphrase |
db-migrate |
migrate a legacy plaintext store into the encrypted schema |
Passphrase
The db-* commands open the encrypted store, so they need a passphrase — from the -pass <p> flag, the
OIGW_PASSPHRASE environment variable, or an interactive prompt. The unlock prompt echoes (this is a
dev harness); db-init, which creates a store, uses a no-echo prompt asked twice and requires a
match, so a typo can't lock the store. (oigw uses no-echo throughout for the same store.)
export OIGW_PASSPHRASE='a strong passphrase'
./olc db-init -paranoid
./olc db-send -to <identity-hex> "hello"
./olc db-recv
Notes
- Identity
.olv files and the SQLite store both contain private keys — protect them.
olc talks to server.olvid.io by default; the demo commands (channeldemo, sasdemo) create
throwaway identities on the server.
- This tool is intentionally close to the metal so protocol behavior can be observed and debugged; the
polished, interoperating product is
oigw.