gitwtfhub

wtf is octra-hfhe-challenge-recovery?

iamknownasfesal/octra-hfhe-challenge-recovery — explained in plain English

Analysis updated 2026-05-18

1C++Audience · researcherComplexity · 5/5Setup · hard

TL;DR

A writeup and toolkit demonstrating a full recovery of a public wallet challenge's secret phrase from a flawed cryptographic commitment.

Mindmap

mindmap
  root((HFHE challenge recovery))
    What it does
      Recovers wallet mnemonic
      Uses public data only
      Exploits commitment flaw
    Tech stack
      C++
      Python
      SHA-256
      Ed25519
    Use cases
      Cryptography research
      Commitment scheme study
      Security education
    Audience
      Security researchers
      Cryptography students
      CTF players

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Study a real world example of a cryptographic commitment scheme failing due to missing randomness.

REASON 2

Reproduce a documented ciphertext-only key recovery attack step by step.

REASON 3

Verify a recovered wallet phrase against a public blockchain address and checksum.

REASON 4

Learn how public commitment oracles can leak secret values.

What's in the stack?

C++PythonSHA-256Ed25519BIP39

How it stacks up

iamknownasfesal/octra-hfhe-challenge-recoveryallentdan/shape_based_matchingamu2mod/radeonmon
Stars111
LanguageC++C++C++
Last pushed2019-03-01
MaintenanceDormant
Setup difficultyhardmoderatemoderate
Complexity5/53/53/5
Audienceresearcherdevelopervibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · hard Time to first run · 1h+

Requires a C++17 compiler with hardware AES and SHA support, plus Python with pynacl for verification.

No license information is stated in the provided README.

Wtf does this do

This repository documents a successful attack against a public cryptography challenge. The challenge, called the Octra HFHE seed challenge, invited people to try to recover a hidden 12 word wallet recovery phrase using only publicly shared files, without access to the private key. This project shows that it can be done, and walks through exactly how. The author found a weakness in how the encryption scheme builds a piece of data called a commitment. A commitment is supposed to let you prove you know a secret value without revealing it, but in this case the commitment was built entirely from public information plus the secret value itself, with no additional hidden randomness added in. That mistake means anyone can guess a possible answer, recompute the commitment using only public data, and check if it matches. If it matches, the guess was correct. This turns something that should protect a secret into a tool for checking guesses about that secret. Because the hidden phrase is made up of common English recovery words from a fixed list of possibilities, and the text is broken into small chunks, the author was able to guess each chunk piece by piece rather than needing to search the entire space at once. Using some clever shortcuts to speed up the guessing, the entire 12 word phrase was recovered on an ordinary laptop in under five minutes. The repository includes the recovered phrase, proof that it matches the intended wallet address, and a signed message proving control of the wallet without ever exposing the recovered phrase publicly in a way that could be used maliciously beyond the challenge itself. It also provides full instructions and source code so others can reproduce the same recovery from scratch, along with technical details of exactly which part of the encryption code contained the flaw. The author includes a clear warning that anyone who runs these tools will recover the same wallet phrase and could move real funds, since this documents a public challenge that explicitly invited this kind of security research.

Yoink these prompts

Prompt 1
Explain why a commitment built only from public data plus a secret value is not actually hiding.
Prompt 2
Walk me through building the solver tools in this repo and running the recovery on the sample challenge.
Prompt 3
Help me understand how the R_com commitment oracle allowed guessing the mnemonic block by block.
Prompt 4
Show me how the verify_addr.py script checks a recovered mnemonic against a wallet address.

Frequently asked questions

wtf is octra-hfhe-challenge-recovery?

A writeup and toolkit demonstrating a full recovery of a public wallet challenge's secret phrase from a flawed cryptographic commitment.

What language is octra-hfhe-challenge-recovery written in?

Mainly C++. The stack also includes C++, Python, SHA-256.

What license does octra-hfhe-challenge-recovery use?

No license information is stated in the provided README.

How hard is octra-hfhe-challenge-recovery to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is octra-hfhe-challenge-recovery for?

Mainly researcher.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.