# v1337q/dereth-tools architecture

> Architecture diagram of the GitHub repository v1337q/dereth-tools, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/v1337q/dereth-tools
- Repository: https://github.com/v1337q/dereth-tools

## Overview

DerETH is a GUI tool for deriving Ethereum addresses from private keys and recovering one missing character in a partial key by trying candidate keys against a known address. The principal workflow runs from GUI input through the registered brute-force handler, candidate search, and address derivation. The derivation uses secp256k1 public-key generation and Keccak hashing. The README documents these capabilities, while the sampled Rust source shows their implementation; the Slint UI source was not sampled, so its detailed behavior is not mapped.

Main entry points: [`src/main.rs`](https://github.com/v1337q/dereth-tools/blob/main/src/main.rs) (Address derivation), [`ui/app-window.slint`](https://github.com/v1337q/dereth-tools/blob/main/ui/app-window.slint) (Slint GUI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_ui["Slint GUI<br/>[app-window.slint]"]
  node_handler["Input handler<br/>[main.rs]"]
end

subgraph group_recovery["Key recovery"]
  node_search["Missing-character search<br/>[main.rs]"]
end

subgraph group_derivation["Address derivation"]
  node_derive["Address derivation<br/>[main.rs]"]
  node_secp["secp256k1"]
  node_keccak["Keccak hashing"]
  node_hex["Hex encoding"]
end

node_user(("User"))

node_user -->|"enters key data"| node_ui
node_ui -->|"triggers callback"| node_handler
node_handler -->|"calls search"| node_search
node_search -->|"tests candidates"| node_derive
node_derive -->|"generates public key"| node_secp
node_derive -->|"hashes public key"| node_keccak
node_derive -->|"decodes and encodes"| node_hex

click node_ui "https://github.com/v1337q/dereth-tools/blob/main/ui/app-window.slint"
click node_handler "https://github.com/v1337q/dereth-tools/blob/main/src/main.rs"
click node_search "https://github.com/v1337q/dereth-tools/blob/main/src/main.rs"
click node_derive "https://github.com/v1337q/dereth-tools/blob/main/src/main.rs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_ui,node_handler,node_user toneBlue
class node_search toneAmber
class node_derive,node_secp,node_keccak,node_hex toneMint
```

## Components

### User interface

- [Slint GUI](https://github.com/v1337q/dereth-tools/blob/main/ui/app-window.slint): `ui/app-window.slint`
- [Input handler](https://github.com/v1337q/dereth-tools/blob/main/src/main.rs): `src/main.rs`

### Key recovery

- [Missing-character search](https://github.com/v1337q/dereth-tools/blob/main/src/main.rs): `src/main.rs`

### Address derivation

- [Address derivation](https://github.com/v1337q/dereth-tools/blob/main/src/main.rs): `src/main.rs`
- **secp256k1**
- **Keccak hashing**
- **Hex encoding**

### Other components

- **User**

## Connections

- User → Slint GUI: enters key data (evidence: `README.md`)
- Slint GUI → Input handler: triggers callback (evidence: `src/main.rs`)
- Input handler → Missing-character search: calls search (evidence: `src/main.rs`)
- Missing-character search → Address derivation: tests candidates (evidence: `src/main.rs`)
- Address derivation → secp256k1: generates public key (evidence: `src/main.rs`)
- Address derivation → Keccak hashing: hashes public key (evidence: `src/main.rs`)
- Address derivation → Hex encoding: decodes and encodes (evidence: `src/main.rs`)
