# 10gic/vanitygen-plusplus architecture

> Architecture diagram of the GitHub repository 10gic/vanitygen-plusplus, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/10gic/vanitygen-plusplus
- Repository: https://github.com/10gic/vanitygen-plusplus

## Overview

Vanitygen++ generates cryptocurrency vanity addresses and corresponding keys by searching for user-specified patterns. The main CPU workflow accepts coin and format options, searches candidate keys against patterns, encodes matching addresses and keys, and reports results. Separate paths support GPU search for secp256k1 and Ed25519 chains, plus key conversion and split-key operations. The README documents capabilities beyond the sampled excerpts; dashed links mark documented or plausible integrations whose call sites were not shown.

Main entry points: [`vanitygen.c`](https://github.com/10gic/vanitygen-plusplus/blob/master/vanitygen.c) (Vanity CLI), [`pattern.c`](https://github.com/10gic/vanitygen-plusplus/blob/master/pattern.c) (Pattern search), [`simplevanitygen.c`](https://github.com/10gic/vanitygen-plusplus/blob/master/simplevanitygen.c) (CPU key search), [`oclvanitygen_ed25519.c`](https://github.com/10gic/vanitygen-plusplus/blob/master/oclvanitygen_ed25519.c) (Ed25519 GPU search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cpu["CPU generation"]
  node_vanity_cli["Vanity CLI<br/>[vanitygen.c]"]
  node_pattern_search["Pattern search<br/>[pattern.c]"]
  node_cpu_search["CPU key search<br/>[simplevanitygen.c]"]
  node_avl["AVL pattern index<br/>[avl.h]"]
end

subgraph group_gpu["GPU generation"]
  node_gpu_cli["OpenCL CLI<br/>[oclvanitygen.c]"]
  node_ocl_engine["secp256k1 GPU engine<br/>[oclengine.c]"]
  node_ed_gpu_cli["Ed25519 GPU search"]
  node_ed_gpu_engine["Ed25519 GPU engine<br/>[ocled25519engine.c]"]
  node_gpu_miner["GPU miner<br/>[oclvanityminer.c]"]
end

subgraph group_crypto["Encoding and crypto"]
  node_address_encode["Address encoding<br/>[util.c]"]
  node_base32["Base32 encoding<br/>[base32.c]"]
  node_segwit["Witness formats<br/>[segwit_addr.c]"]
  node_bech32["Bech32 encoding<br/>[bech32.c]"]
  node_hashing["Hash algorithms<br/>[sha3.c]"]
  node_groestl["Groestl hash<br/>[groestl.c]"]
  node_ed25519["Ed25519 keys<br/>[ed25519.c]"]
  node_stellar["Stellar encoding<br/>[stellar.c]"]
  node_ticker["Coin ticker<br/>[ticker.h]"]
  node_compat["Platform compatibility<br/>[compat.c]"]
  node_winglue["Windows compatibility<br/>[winglue.c]"]
end

subgraph group_tools["Key utilities"]
  node_keyconv["Key conversion<br/>[keyconv.c]"]
end

node_user(("User"))
node_results["Generated keys and addresses"]

node_user -->|"configures search"| node_vanity_cli
node_vanity_cli -->|"sets patterns"| node_pattern_search
node_vanity_cli -.->|"starts search"| node_cpu_search
node_cpu_search -.->|"tests candidates"| node_pattern_search
node_pattern_search -->|"indexes prefixes"| node_avl
node_pattern_search -->|"uses hashing"| node_hashing
node_vanity_cli -->|"supports Ed25519"| node_ed25519
node_ed25519 -->|"uses pattern context"| node_pattern_search
node_ed25519 -->|"encodes key data"| node_base32
node_ed25519 -->|"uses Stellar encoding"| node_stellar
node_cpu_search -->|"encodes addresses"| node_address_encode
node_cpu_search -->|"encodes candidates"| node_base32
node_cpu_search -->|"formats witness addresses"| node_segwit
node_segwit -->|"uses encoding"| node_bech32
node_address_encode -->|"uses hashes"| node_hashing
node_address_encode -->|"uses Groestl"| node_groestl
node_vanity_cli -->|"selects coin"| node_ticker
node_user -->|"selects GPU search"| node_gpu_cli
node_gpu_cli -->|"runs secp256k1 engine"| node_ocl_engine
node_ocl_engine -->|"uses search context"| node_pattern_search
node_ocl_engine -->|"uses platform layer"| node_winglue
node_gpu_cli -->|"dispatches Ed25519"| node_ed_gpu_cli
node_ed_gpu_cli -->|"runs GPU batches"| node_ed_gpu_engine
node_ed_gpu_cli -->|"uses random source"| node_compat
node_ed_gpu_cli -->|"supports XLM output"| node_stellar
node_user -.->|"runs mining search"| node_gpu_miner
node_gpu_miner -->|"uses OpenCL engine"| node_ocl_engine
node_user -->|"converts keys"| node_keyconv
node_keyconv -->|"encodes keys"| node_address_encode
node_vanity_cli -->|"reports matches"| node_results
node_gpu_cli -->|"reports matches"| node_results
node_ed_gpu_cli -->|"reports matches"| node_results
node_keyconv -->|"prints converted keys"| node_results

click node_vanity_cli "https://github.com/10gic/vanitygen-plusplus/blob/master/vanitygen.c"
click node_pattern_search "https://github.com/10gic/vanitygen-plusplus/blob/master/pattern.c"
click node_cpu_search "https://github.com/10gic/vanitygen-plusplus/blob/master/simplevanitygen.c"
click node_address_encode "https://github.com/10gic/vanitygen-plusplus/blob/master/util.c"
click node_base32 "https://github.com/10gic/vanitygen-plusplus/blob/master/base32.c"
click node_segwit "https://github.com/10gic/vanitygen-plusplus/blob/master/segwit_addr.c"
click node_bech32 "https://github.com/10gic/vanitygen-plusplus/blob/master/bech32.c"
click node_hashing "https://github.com/10gic/vanitygen-plusplus/blob/master/sha3.c"
click node_groestl "https://github.com/10gic/vanitygen-plusplus/blob/master/groestl.c"
click node_ed25519 "https://github.com/10gic/vanitygen-plusplus/blob/master/ed25519.c"
click node_stellar "https://github.com/10gic/vanitygen-plusplus/blob/master/stellar.c"
click node_gpu_cli "https://github.com/10gic/vanitygen-plusplus/blob/master/oclvanitygen.c"
click node_ocl_engine "https://github.com/10gic/vanitygen-plusplus/blob/master/oclengine.c"
click node_ed_gpu_cli "https://github.com/10gic/vanitygen-plusplus/blob/master/oclvanitygen_ed25519.c"
click node_ed_gpu_engine "https://github.com/10gic/vanitygen-plusplus/blob/master/ocled25519engine.c"
click node_gpu_miner "https://github.com/10gic/vanitygen-plusplus/blob/master/oclvanityminer.c"
click node_keyconv "https://github.com/10gic/vanitygen-plusplus/blob/master/keyconv.c"
click node_ticker "https://github.com/10gic/vanitygen-plusplus/blob/master/ticker.h"
click node_avl "https://github.com/10gic/vanitygen-plusplus/blob/master/avl.h"
click node_compat "https://github.com/10gic/vanitygen-plusplus/blob/master/compat.c"
click node_winglue "https://github.com/10gic/vanitygen-plusplus/blob/master/winglue.c"

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_vanity_cli,node_pattern_search,node_cpu_search,node_avl,node_user toneBlue
class node_gpu_cli,node_ocl_engine,node_ed_gpu_cli,node_ed_gpu_engine,node_gpu_miner toneAmber
class node_address_encode,node_base32,node_segwit,node_bech32,node_hashing,node_groestl,node_ed25519,node_stellar,node_ticker,node_compat,node_winglue toneMint
class node_keyconv toneRose
class node_results toneIndigo
```

## Components

### CPU generation

- [Vanity CLI](https://github.com/10gic/vanitygen-plusplus/blob/master/vanitygen.c): `vanitygen.c`
- [Pattern search](https://github.com/10gic/vanitygen-plusplus/blob/master/pattern.c): `pattern.c`
- [CPU key search](https://github.com/10gic/vanitygen-plusplus/blob/master/simplevanitygen.c): `simplevanitygen.c`
- [AVL pattern index](https://github.com/10gic/vanitygen-plusplus/blob/master/avl.h): `avl.h`

### GPU generation

- [OpenCL CLI](https://github.com/10gic/vanitygen-plusplus/blob/master/oclvanitygen.c): `oclvanitygen.c`
- [secp256k1 GPU engine](https://github.com/10gic/vanitygen-plusplus/blob/master/oclengine.c): `oclengine.c`
- [Ed25519 GPU search](https://github.com/10gic/vanitygen-plusplus/blob/master/oclvanitygen_ed25519.c): `oclvanitygen_ed25519.c`
- [Ed25519 GPU engine](https://github.com/10gic/vanitygen-plusplus/blob/master/ocled25519engine.c): `ocled25519engine.c`
- [GPU miner](https://github.com/10gic/vanitygen-plusplus/blob/master/oclvanityminer.c): `oclvanityminer.c`

### Encoding and crypto

- [Address encoding](https://github.com/10gic/vanitygen-plusplus/blob/master/util.c): `util.c`
- [Base32 encoding](https://github.com/10gic/vanitygen-plusplus/blob/master/base32.c): `base32.c`
- [Witness formats](https://github.com/10gic/vanitygen-plusplus/blob/master/segwit_addr.c): `segwit_addr.c`
- [Bech32 encoding](https://github.com/10gic/vanitygen-plusplus/blob/master/bech32.c): `bech32.c`
- [Hash algorithms](https://github.com/10gic/vanitygen-plusplus/blob/master/sha3.c): `sha3.c`
- [Groestl hash](https://github.com/10gic/vanitygen-plusplus/blob/master/groestl.c): `groestl.c`
- [Ed25519 keys](https://github.com/10gic/vanitygen-plusplus/blob/master/ed25519.c): `ed25519.c`
- [Stellar encoding](https://github.com/10gic/vanitygen-plusplus/blob/master/stellar.c): `stellar.c`
- [Coin ticker](https://github.com/10gic/vanitygen-plusplus/blob/master/ticker.h): `ticker.h`
- [Platform compatibility](https://github.com/10gic/vanitygen-plusplus/blob/master/compat.c): `compat.c`
- [Windows compatibility](https://github.com/10gic/vanitygen-plusplus/blob/master/winglue.c): `winglue.c`

### Key utilities

- [Key conversion](https://github.com/10gic/vanitygen-plusplus/blob/master/keyconv.c): `keyconv.c`

### Other components

- **User**
- **Generated keys and addresses**

## Connections

- User → Vanity CLI: configures search
- Vanity CLI → Pattern search: sets patterns (evidence: `vanitygen.c`)
- Vanity CLI → CPU key search: starts search
- CPU key search → Pattern search: tests candidates
- Pattern search → AVL pattern index: indexes prefixes (evidence: `pattern.c`)
- Pattern search → Hash algorithms: uses hashing (evidence: `pattern.c`)
- Vanity CLI → Ed25519 keys: supports Ed25519 (evidence: `vanitygen.c`)
- Ed25519 keys → Pattern search: uses pattern context (evidence: `ed25519.c`)
- Ed25519 keys → Base32 encoding: encodes key data (evidence: `ed25519.c`)
- Ed25519 keys → Stellar encoding: uses Stellar encoding (evidence: `ed25519.c`)
- CPU key search → Address encoding: encodes addresses (evidence: `simplevanitygen.c`)
- CPU key search → Base32 encoding: encodes candidates (evidence: `simplevanitygen.c`)
- CPU key search → Witness formats: formats witness addresses (evidence: `simplevanitygen.c`)
- Witness formats → Bech32 encoding: uses encoding (evidence: `segwit_addr.c`)
- Address encoding → Hash algorithms: uses hashes (evidence: `util.c`)
- Address encoding → Groestl hash: uses Groestl (evidence: `util.c`)
- Vanity CLI → Coin ticker: selects coin (evidence: `vanitygen.c`)
- User → OpenCL CLI: selects GPU search
- OpenCL CLI → secp256k1 GPU engine: runs secp256k1 engine (evidence: `oclvanitygen.c`)
- secp256k1 GPU engine → Pattern search: uses search context (evidence: `oclengine.c`)
- secp256k1 GPU engine → Windows compatibility: uses platform layer (evidence: `oclengine.c`)
- OpenCL CLI → Ed25519 GPU search: dispatches Ed25519 (evidence: `oclvanitygen.c`)
- Ed25519 GPU search → Ed25519 GPU engine: runs GPU batches (evidence: `oclvanitygen_ed25519.c`)
- Ed25519 GPU search → Platform compatibility: uses random source (evidence: `oclvanitygen_ed25519.c`)
- Ed25519 GPU search → Stellar encoding: supports XLM output (evidence: `oclvanitygen_ed25519.c`)
- User → GPU miner: runs mining search
- GPU miner → secp256k1 GPU engine: uses OpenCL engine (evidence: `oclvanityminer.c`)
- User → Key conversion: converts keys
- Key conversion → Address encoding: encodes keys (evidence: `keyconv.c`)
- Vanity CLI → Generated keys and addresses: reports matches
- OpenCL CLI → Generated keys and addresses: reports matches
- Ed25519 GPU search → Generated keys and addresses: reports matches
- Key conversion → Generated keys and addresses: prints converted keys
