study2025Completed

SHA-256 brute-force server

Multithreaded C server that brute-forces SHA-256 under priority scheduling.

study/2025

Overview

A multithreaded C TCP server answering SHA-256 brute-force search requests, evolved from a single-threaded baseline into a priority-aware thread pool with parallel per-request search threads and a lock-striped result cache.

Patrick was lead implementer on the threading baseline, the thread pool, cache concurrency, and the parallel multi-searcher design that became the final architecture.

Highlights

  • Five priority queues in a custom thread pool
  • Per-request brute-force split across 4 to 6 search threads with an atomic stop flag
  • 64 reader-writer locks over a 1024-bucket FNV-1a cache
  • 8-byte prefix early-reject before a full digest compare
  • Official benchmark score improved from about 251M to about 16M (94 percent)