Skip to content

About

A web-based cryptographic seed generator.

Resources

Contributing

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

Blockchain Commons seedtool.info

By Jonas Wagner

seedtool.gordianstack.com is a version of seedtool that is accessible to anyone with a web browser -- no technical skills needed. It aims to be a simple, easy to use, and secure way for everyone to generate seeds and Shamir shares of seeds.

Additional Information

All documentation is integrated in the online version, accessible through https://seedtool.gordianstack.com.

Usage Instructions

Browse to https://seedtool.gordianstack.com and follow the hints. You can type --help into the "seedtool arguments..." field for more detailed instructions.

Status - Alpha

seedtool.info is currently under active development and in the alpha testing phase. It should not be used for production tasks until it has had further testing and auditing.

Roadmap

  • Write documentation and integrate directly into seedtool
  • Update development workflow such that the output is truly a standalone, single HTML file.
  • Improve the recovery features in seedtool.info, so that they are as easy to use as the seed generation features
  • Make it easier for the user to use the tool correctly and securely:
    • Warn if not in aeroplane mode
    • Maybe: warn if not in an incognito window
    • Use color coding to indicate whether something is public or private
    • Add guards to prevent a weak or reused entropy

Development

The site is served by GitHub Pages straight from docs/. There is no deploy step: everything in docs/ is committed, including build output, and whatever is on main is live.

File in docs/ Where it comes from
index.html, page.js, media/, CNAME Edited by hand, directly in docs/.
page.css Generated by Tailwind from src/page.css.
seedtool.wasm seedtool-cli (Rust), compiled to WebAssembly for WASI.
lib/qrcodejs/qrcode.js Copied from the lib/qrcodejs submodule.

Setup

git submodule update --init --recursive
mise install    # Node and Rust, see mise.toml
npm ci

How it works

seedtool.wasm is the unmodified seedtool command-line program, compiled for WASI. docs/page.js contains a minimal WASI implementation (arguments, standard output, random numbers, clock) and runs the program once per output format, as one would in a terminal. The build targets WASI 0.1 (wasm32-wasip1) because that produces a plain WebAssembly module that browsers can run directly; later WASI versions produce components, which would need a transpiler and generated glue code.

Two things differ from running seedtool in a terminal:

  • The random numbers that seedtool gets from the "operating system" are derived from the entropy field (with HKDF), instead of being fresh for every run. seedtool uses them to split a seed into SSKR shares. This way, the page's output depends only on the entropy, and the shares shown as text and as QR codes belong together.
  • Words that don't belong to an option are joined into a single input, so --in bip39 word1 word2 ... works without quotes. Inputs that consist of several multi-word items need quotes: --in sskr "tuna next ..." "tuna next ...".

Earlier versions of this page used the C++ seedtool. Two of its outputs are no longer read by the Rust seedtool, so the page converts them to equivalent formats that are (see convertLegacyInput in page.js):

  • SSKR shares in Bytewords that start with tuna acid epic (the old CBOR tag) are passed on as ur:crypto-sskr.
  • ur:crypto-seed is passed on as ur:seed; use it with --in seed.

Preview locally

The page must be served over HTTP, because browsers won't load WebAssembly from file://.

python3 -m http.server -d docs    # then open http://localhost:8000

Rebuild the CSS

Tailwind (v4) scans the HTML and JS files in docs/ for class names and only emits the classes that are used. All configuration lives in src/page.css; there is no tailwind.config.js. Rebuild after adding classes to index.html or page.js:

npx @tailwindcss/cli -i src/page.css -o docs/page.css

Add --watch to rebuild on every change.

Run the tests

The end-to-end tests in tests/ use Playwright to check the page in a real browser. They start their own web server.

npx playwright install chromium    # once
npx playwright test

Rebuild seedtool (WebAssembly)

This is only needed when updating the lib/seedtool-cli submodule or its dependencies. Besides Rust (installed by mise install), the build needs a C compiler that can target WebAssembly, because some of seedtool's dependencies contain C code. On Debian:

sudo apt install clang lld wasi-libc libclang-rt-dev-wasm32

Then run lib/build-seedtool-cli.sh. It runs seedtool's own tests, builds it for the wasm32-wasip1 target, and copies the result to docs/seedtool.wasm:

lib/build-seedtool-cli.sh
npx playwright test

The build is known to work with Rust 1.94.1 and Debian 13's clang 19. With a different WASI sysroot (e.g., the WASI SDK), set CC_wasm32_wasip1 and WASI_SDK_DIR accordingly.

seedtool-cli doesn't come with a Cargo.lock, so the versions of its dependencies are pinned in lib/seedtool-cli.Cargo.lock. To update them, run cargo update in lib/seedtool-cli (after copying the lock file there as Cargo.lock), and copy the result back.

Publishing

  1. If page.css or page.js changed, bump the ?v=... cache-busting parameter in docs/index.html. If seedtool.wasm changed, do the same for its URL in docs/page.js.
  2. Run the tests, and check the page locally: it should show a seed in hex, btw, bip39 and sskr formats plus QR codes, with no errors in the browser console.
  3. Commit the changes in docs/ and push to main.

Gordian Principles

seedtool.info is a reference implementation meant to display the Gordian Principles, which are philosophical and technical underpinnings to Blockchain Commons' Gordian technology. This includes:

  • Independence. seedtool.info enables anyone to generate their own cryptographic seeds. There are no dependencies and conditions, except having a device that can run a recent web browser (for example, a post-2017 Android phone).
  • Privacy. seedtool.info can run locally, in aeroplane mode, and does not log or store any user interaction.
  • Resilience. One of the main use cases for seedtool.info is to generate Shamir shares of seeds. It thus provides a way to store seeds that is resiliant to loss and theft of individual shares, if used correctly.
  • Openness. seedtool.info is open-source software and based on open standards like SSKR and ByteWords.

Origin, Authors, Copyright & Licenses

Unless otherwise noted (either in this README.md or in the file's header comments), the contents of this repository are Copyright © 2022 by Blockchain Commons, LLC, and are licensed under the spdx:BSD-2-Clause Plus Patent License.

In most cases, the authors, copyright, and license for each file reside in header comments in the source code.

seedtool.info relies on other open-source software, see .gitmodules.

Derived from ...

This seedtool.info project is either derived from or was inspired by:

Financial Support

seedtool.info is a project of Blockchain Commons. We are proudly a "not-for-profit" social benefit corporation committed to open source & open development. Our work is funded entirely by donations and collaborative partnerships with people like you. Every contribution will be spent on building open tools, technologies, and techniques that sustain and advance blockchain and internet security infrastructure and promote an open web.

To financially support further development of seedtool.info and other projects, please consider becoming a Patron of Blockchain Commons through ongoing monthly patronage as a GitHub Sponsor. You can also support Blockchain Commons with bitcoins at our BTCPay Server.

Contributing

We encourage public contributions through issues and pull requests! Please review CONTRIBUTING.md for details on our development process. All contributions to this repository require a GPG signed Contributor License Agreement.

Discussions

The best place to talk about Blockchain Commons and its projects is in our GitHub Discussions areas.

Gordian Developer Community. For standards and open-source developers who want to talk about interoperable wallet specifications, please use the Discussions area of the Gordian Developer Community repo. This is where you talk about Gordian specifications such as Gordian Envelope, bc-shamir, Sharded Secret Key Reconstruction, and bc-ur as well as the larger Gordian Architecture, its Principles of independence, privacy, resilience, and openness, and its macro-architectural ideas such as functional partition (including airgapping, the original name of this community).

Gordian User Community. For users of the Gordian reference apps, including Gordian Coordinator, Gordian Seed Tool, Gordian Server, Gordian Wallet, and SpotBit as well as our whole series of CLI apps. This is a place to talk about bug reports and feature requests as well as to explore how our reference apps embody the Gordian Principles.

Blockchain Commons Discussions. For developers, interns, and patrons of Blockchain Commons, please use the discussions area of the Community repo to talk about general Blockchain Commons issues, the intern program, or topics other than those covered by the Gordian Developer Community or the Gordian User Community.

Other Questions & Problems

As an open-source, open-development community, Blockchain Commons does not have the resources to provide direct support of our projects. Please consider the discussions area as a place where you might get answers to questions. Alternatively, please use this repository's issues feature. Unfortunately, we can not make any promises on response time.

If your company requires support to use our projects, please feel free to contact us directly about options. We may be able to offer you a contract for support from one of our contributors, or we might be able to point you to another entity who can offer the contractual support that you need.

Credits

The following people directly contributed to this repository. You can add your name here by getting involved. The first step is learning how to contribute from our CONTRIBUTING.md documentation.

Name Role Github Email GPG Fingerprint
Jonas Wagner Software Engineer @Sjlver <ltlygwayh@gmail.com> B61A 9761 C9D2 789C 0896 6C63 209C 9222 DB5F BD15

Page background photo by Markus Spiske on Unsplash.

Responsible Disclosure

We want to keep all of our software safe for everyone. If you have discovered a security vulnerability, we appreciate your help in disclosing it to us in a responsible manner. We are unfortunately not able to offer bug bounties at this time.

We do ask that you offer us good faith and use best efforts not to leak information or harm any user, their data, or our developer community. Please give us a reasonable amount of time to fix the issue before you publish it. Do not defraud our users or us in the process of discovery. We promise not to bring legal action against researchers who point out a problem provided they do their best to follow the these guidelines.

Reporting a Vulnerability

Please report suspected security vulnerabilities in private via email to ChristopherA@BlockchainCommons.com (do not use this email for support). Please do NOT create publicly viewable issues for suspected security vulnerabilities.

The following keys may be used to communicate sensitive information to developers:

Name Fingerprint
Christopher Allen FDFE 14A5 4ECB 30FC 5D22 74EF F8D3 6C91 3574 05ED

You can import a key by running the following command with that individual’s fingerprint: gpg --recv-keys "<fingerprint>" Ensure that you put quotes around fingerprints that contain spaces.

About

A web-based cryptographic seed generator.

Resources

Contributing

Stars

1 star

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages