secure-reader

command
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Command secure-reader is a sample architecture (docs/examples/secure-reader): a site where readers log in and read the PDF books they own, which are never sent as files. The server converts each book to bdf once and keeps it; the browser asks for ten pages at a time, and each answer is a segment sealed for a key pair the browser made for that request alone (package segment, @bdfkit/core's SegmentLoader). Once a segment is open, neither side keeps the key that opens it: what a recording of the traffic holds stays sealed even if the server's TLS key, a reader's password or a session cookie is taken later.

A reader who does not own a book may read its first segment (a sample); the server refuses the pages after it, and a reader who asks for pages faster than a person reads them.

cd examples/secure-reader && node web/build.mjs && go run .
open http://127.0.0.1:8084/   (alice / alice-pass owns both books, bob / bob-pass one)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL