How control-owl/eq works
1. Purpose and executable boundary
eQ is a native Rust desktop application for generating cryptocurrency wallets/keys across 284 coins. Its executable entry point is src/main.rs; reusable application modules are exposed through src/lib.rs. The UI is built with egui/eframe, not a web service.
2. Application/UI orchestration
The desktop event loop, user selections, generation actions, wallet presentation, file-save interactions, and optional on-screen keyboard are expected to be coordinated at the application layer in:
• src/main.rs
• src/lib.rs
• src/dev.rs
This is the main trust boundary: user-entered passphrases and generated secrets must remain in-process and be cleared after use.
3. Key-generation and derivation core
Cryptographic generation and coin-specific key/address derivation are concentrated in:
• src/keys.rs
• src/crypt.rs
• src/test_vectors.rs
The core supports secp256k1 and ed25519 ecosystems plus BIP32/BIP39/BIP44 and BIP86 paths. Entropy feeds mnemonic/private-key material; derivation produces coin-specific keys and encoded addresses. src/test_vectors.rs provides deterministic reference material for validating this sensitive pipeline.
4. Entropy sources and network boundary
Normal generation uses local/system randomness and is designed to work offline. An optional entropy path requests quantum randomness from the external ANU QRNG service via HTTP (ureq), creating the repository’s principal runtime network boundary. Crypto/entropy handling belongs in:
• src/crypt.rs
• src/keys.rs
External QRNG input should be treated as supplemental untrusted transport data until validated, while no wallet-generation dependency should require network availability.
5. Wallet protection and export
Generated wallet information is serialized into SVG-based wallet artifacts, encrypted with AES-256-GCM, and can optionally be split using Shamir secret sharing. The relevant encryption/export implementation is likely split between:
• src/crypt.rs
• src/keys.rs
• res/doc/wallet.md
The UI/file-dialog layer selects the destination, while cryptographic code owns encryption, secret handling, and zeroization. Exported SVG is the durable boundary; plaintext keys should not cross it.
6. Embedded coin and language data
Coin definitions and assets are repository resources rather than an online catalog:
• res/coin/ECDB.csv
• res/wordlists/english.txt
• res/wordlists/japanese.txt
Build-time/resource embedding is configured by build.rs, likely together with include_dir. BIP39 language wordlists and coin metadata flow into the derivation/UI layers, enabling offline operation and multi-language mnemonic support.
7. Runtime, packaging, and release infrastructure
The material runtime is a cross-platform native Rust binary: Windows, Linux, and macOS. Cargo defines crate features/dependencies in Cargo.toml; Windows-specific application metadata is under res/app.manifest and likely incorporated by build.rs. Platform release artifacts are built by:
• .github/workflows/release-linux-gnu.yml
• .github/workflows/release-macos-aarch64.yml
• .github/workflows/release-windows_x86_64.yml
Release integrity also includes GPG-signature verification in .github/workflows/verify-gpg-signature.yml.
Main entry points: keys.rs Key derivation · lib.rs Application modules · build.rs Resource embedding · crypt.rs Entropy and protection
Components 20
Desktop application
- Native executable · Starts the eframe desktop event loop.
src/main.rs - Application modules · Coordinates UI actions, secret lifecycle, and wallet presentation.
src/lib.rs - On-screen keyboard
src/dev.rs - Save destination · Chooses the durable export location.
Wallet core
- Key derivation · Builds coin-specific keys and addresses across BIP paths.
src/keys.rs - Entropy and protection · Handles local entropy, QRNG validation, encryption, and zeroization.
src/crypt.rs - Deterministic vectors · Validates sensitive generation and derivation behavior.
src/test_vectors.rs - Wallet export format
res/doc/wallet.md
Embedded offline data
- Coin definitions · Offline metadata for supported coins.
res/coin/ECDB.csv - English wordlist
res/wordlists/english.txt - Japanese wordlist
res/wordlists/japanese.txt
Build and release
- Resource embedding · Embeds application resources and Windows metadata.
build.rs - Crate definition · Defines Rust dependencies and feature selection.
Cargo.toml - Windows metadata
res/app.manifest - Linux release build
.github/workflows/release-linux-gnu.yml - macOS release build
.github/workflows/release-macos-aarch64.yml - Windows release build
.github/workflows/release-windows_x86_64.yml - GPG verification · Verifies release integrity signatures.
.github/workflows/verify-gpg-signature.yml
Other components
- ANU QRNG · Optional supplemental quantum-randomness source.
- Encrypted wallet SVG · Durable wallet artifact; plaintext keys must not cross this boundary.
Connections 26
- Native executable → Application modules: runs
- Application modules → On-screen keyboard: optional keyboard
- Application modules → Key derivation: generation actions
- Application modules → Entropy and protection: protects secrets
- Application modules → Save destination: selects destination
- Key derivation → Entropy and protection: entropy and encryption
- Entropy and protection → ANU QRNG: optional HTTP entropy
- Key derivation → Coin definitions: coin parameters
- Key derivation → English wordlist: BIP39 mnemonics
- Key derivation → Japanese wordlist: BIP39 mnemonics
- Deterministic vectors → Key derivation: validates derivation
- Entropy and protection → Encrypted wallet SVG: AES-256-GCM export
- Key derivation → Encrypted wallet SVG: serialized wallet data
- Save destination → Encrypted wallet SVG: writes
- Wallet export format → Encrypted wallet SVG: documents
- Resource embedding → Coin definitions: embeds
- Resource embedding → English wordlist: embeds
- Resource embedding → Japanese wordlist: embeds
- Resource embedding → Windows metadata: incorporates
- Crate definition → Native executable: builds binary
- Linux release build → Crate definition: builds
- macOS release build → Crate definition: builds
- Windows release build → Crate definition: builds
- GPG verification → Linux release build: verifies releases
- GPG verification → macOS release build: verifies releases
- GPG verification → Windows release build: verifies releases