Quickbeam
November 15, 2025 ยท View on GitHub
quickbeam is a command-line interface tool built using Rust and the Fangorn library. It provides utilities for key management, cryptographic signing, and encrypted file handling (encryption and decryption) leveraging the features of the Fangorn framework.
Features
- Key Management: Generate and inspect SR25519 cryptographic keys stored in a local keystore.
- Cryptographic Signing: Sign arbitrary data (currently a nonce) using a key from the local keystore.
- File Encryption (
Encrypt): Encrypt a message file under a specified 'intent' (policy) and register it. - File Decryption (
Decrypt): Request and perform decryption of an encrypted file using a cryptographic 'witness' that satisfies the original intent.
๐ ๏ธ Usage
The application is structured around several subcommands. Use --help on the main command or any subcommand for detailed usage information.
Installation
- Ensure you have Rust and Cargo installed.
- Clone the repository and build the project:
git clone <repository-url>
cd quickbeam
cargo build --release
# The executable will be available at target/release/quickbeam
Key Management Commands
Key Generation
Generates a new SR25519 key and saves it to the specified keystore directory.
quickbeam keygen --keystore-dir /path/to/keystore
Key Inspection
Lists the keys (as SS58 addresses) currently stored in the specified keystore directory.
quickbeam inspect --keystore-dir /path/to/keystore
Signing
Signs a specified 32-bit nonce using the first key found in the keystore.
quickbeam sign --keystore-dir /path/to/keystore --nonce 12345
Encryption and Decryption Commands
These commands interface with both Fangorn and require a running substrate-node (where the iris contract is deployed).
Encrypt
Encrypts a plaintext message under a specific intent/policy.
| Argument | Description |
|---|---|
--message_path | Path to the plaintext file to encrypt. |
--filename | The filename to assign to the intent when registered. |
--config_path | Path to the file containing KZG parameters (Fangorn configuration - autogenerated). |
--keystore-dir | Path to the keystore. |
--intent | The condition under which the message is encrypted. |
--contract_addr | The address of the iris contract. |
quickbeam encrypt \
--message_path ./my_secret.txt \
--filename "secret_doc_2025" \
--config_path ./config.config \
--keystore-dir /path/to/keystore \
--intent "Password(strong_password)" \
--contract_addr 0x...
Decrypt
Requests and performs the decryption of an encrypted file.
| Argument | Description |
|---|---|
--config_path | Path to the directory of the KZG parameters (Fangorn config - autogenerated). |
--filename | The logical filename/identifier of the encrypted document (in iris). |
--witness | A plaintext "witness" that satisfies the encryption intent/policy. |
--pt_filename | The name of the file to write the decrypted plaintext to. |
--contract_addr | The address of the iris contract. |
quickbeam decrypt \
--config_path ./config.config \
--filename "secret_doc_2025" \
--witness "strong_password" \
--pt_filename ./decrypted_secret.txt \
--contract_addr 0x...