A tool for secret-shared passphrases.

Related tags

Cryptography harpo
Overview

harpo

harpo is a tool and library that provides the following functionality:

  • It can generate a seed phrase.
  • Given a seed phrase, it can generate any number of secret-shared seed phrases.
  • Given sufficiently many generated seed phrases, it can reconstruct the original seed phrase.

The harpo crate gets its name from Harpocrates, the ancient god of silence, secrecy, and confidentiality.

While harpo is reasonably well tested, use it at your own risk.

Compilation

Make sure that Rust is installed.

After cloning the repository and changing the directory to harpo, run the following command:

cargo build --release

The binary can then be found under target/release (or target/debug when running the command without the --release flag).

Usage

Generation of a Seed Phrase

A seed phrase can be generated by running the following command:

harpo generate --length [L]

The length [L] must be either 12, 15, 18, 21, or 24. The generated seed phrase is written to standard output.

Creation of Secret-Shared Seed Phrases

In order to create secret-shared seed phrases, run the following command:

harpo create --num-shares [N] --threshold [T] (--file [F] | --interactive)

The input is provided in one of two ways:

  • Using the --file (-f) option, providing the path [F] to the file containing the space-delimited seed phrase.
  • Using the --interactive (-i) flag, providing the seed phrase on the command line.

For example, the content of the file or input provided interactively may be:

cat swing flag economy stadium alone churn speed unique patch report train

Note that the input seed phrase must be BIP-0039 compliant, otherwise the execution will terminate with an error message.

Apart from specifying the input source, two other parameters are required:

  • --num-shares (-n) [N]: The desired number [N] of secret-shared seed phrases must be provided.
  • --threshold (-t) [T]: The desired threshold [T], i.e., the minimum number of secret-shared seed phrases required to reconstruct the original seed phrase, must be provided.

The created seed phrases are written to standard output.

Reconstruction of a Secret-Shared Seed Phrase

In order to reconstruct the original seed phrase, run the following command:

harpo reconstruct (--file [F] | --interactive)

Again, the input is provided in one of two ways:

  • Using the --file (-f) option, providing the path [F] to the file containing the space-delimited seed phrases, one seed phrase per line.
  • Using the --interactive (-i) flag, providing the seed phrases on the command line, one after the other.

The reconstructed seed phrase is written to standard output. If at least [T] secret-shared seed phrases are provided, the output will match the original seed phrase. Otherwise, the output is indistinguishable from a random seed phrase.

Additional Parameters

The following additional parameters can be specified (before entering the subcommand):

  • --verbose (-v): Add this flag in order to activate verbose output.
  • --word-list (-w) [W]: A different word list (other than the standard English word list) can be provided. It has to be a list of 2048 words, with one word per line.

There is one optional parameter for the create subcommand:

  • --no-embedding (-N): By default, the secret-shared seed phrases are not BIP-0039 compliant because they encode an index that is required for the reconstruction. In order to obtain BIP-0039 compliant seed phrases, the embedding can be turned off using this flag. In this case, the indices must be provided explicitly when using the reconstruct command. The format is [INDEX]: [SEED PHRASE].

All available parameters can be printed using the --help (-h) flag for each subcommand.

You might also like...
🔑 Threshold Shamir's secret sharing in Rust

Rusty Secrets Rusty Secrets is an implementation of a threshold Shamir's secret sharing scheme. Documentation (latest) Documentation (master) Design g

Rusty Hog is a secret scanner built in Rust for performance, and based on TruffleHog which is written in Python.
Rusty Hog is a secret scanner built in Rust for performance, and based on TruffleHog which is written in Python.

Rusty Hog is a secret scanner built in Rust for performance, and based on TruffleHog which is written in Python. Rusty Hog provides the following bina

A CLI application that implements multi-key-turn security via Shamir's Secret Sharing.

agree agree is a CLI tool for easily applying multi-key-turn security via Shamirs Secret Sharing. Project state agree is unstable. Version semantics:

Ethereum key tool - Lightweight CLI tool to deal with ETH keys written in rust

ekt - Etherum Key Tool ekt is a lightweight tool to generate ethereum keys and addresses. Installation Either clone it and run it with cargo or instal

A fast tool to scan prototype pollution vulnerability written in Rust. 🦀
A fast tool to scan prototype pollution vulnerability written in Rust. 🦀

ppfuzz Prototype Pollution Fuzzer A fast tool to scan prototype pollution vulnerability written in Rust. 🦀 Installation Binary Source Dependencies Us

The Metaplex NFT-standard Swiss Army Knife tool.

Metaboss The Solana Metaplex NFT 'Swiss Army Knife' tool. Current supported features: Decode NFT mint account metadata Get a list of mint accounts for

🔗 Tool for rebasing a chain of local git branches.

git-chain Tool for rebasing a chain of local git branches. Motivation Suppose you have branches, each depending on a parent branch (usually called "st

A command-line tool to export FoundationDB stored protocol buffers to ClickhouseDB

fdb-ch-proto-export A command-line tool to export FoundationDB stored Protocol buffers to ClickhouseDB. Installation N/A Usage fdb-ch [command] fdb-c

CLI tool written in Rust which can be used to generate hashes

rustgenhash rustgenhash is a tool to generate hashes on the commandline from stdio. It can be used to generate single or multiple hashes for usage in

Owner
Thomas Locher
Thomas Locher
Generate or convert random bytes into passphrases. A Rust port of niceware.

niceware My blog post: Porting Niceware to Rust A Rust port of niceware. Sections of this README have been copied from the original project. This libr

Andrew Healey 20 Sep 7, 2022
Ursa - Hyperledger Ursa is a shared cryptography library

HYPERLEDGER URSA Introduction Features Libursa Libzmix Dependencies Building from source Contributing Introduction Ursa was created because people in

Hyperledger 307 Dec 20, 2022
Simple shared types for multi-threaded Rust programs

Keep Calm (and call Clone) Simple shared types for multi-threaded Rust programs: keepcalm gives you permission to simplify your synchronization code i

Matt Mastracci 5 Mar 6, 2023
A value transfer bridge between the Monero blockchain and the Secret Network.

Secret-Monero-Bridge A value transfer bridge between the Monero blockchain and the Secret Network. Proof-of-Concept Video Demonstration: https://ipfs.

null 28 Dec 7, 2022
secret folders generator to hide hentais in your computer

hentai dream 95 secret folders generator to hide hentais in your computer, but its really old way as **** used techniquee one injection technique from

jumango pussu 7 Jul 8, 2021
A pure-Rust implementation of various threshold secret sharing schemes

Threshold Secret Sharing Efficient pure-Rust library for secret sharing, offering efficient share generation and reconstruction for both traditional S

Snips 137 Dec 29, 2022
Manage secret values in-repo via public key cryptography

amber Manage secret values in-repo via public key cryptography. See the announcement blog post for more motivation. Amber provides the ability to secu

FP Complete 82 Nov 10, 2022
Cross-platform Secure TUI Secret Locker

SafeCloset keeps your secrets in password protected files. SafeCloset is designed to be convenient and avoid common weaknesses like external editing o

Canop 63 Dec 26, 2022
Rust implementation of Shamir's Secret Sharing

Horcrux - Rust implementation of Shamir's Secret Sharing This program is an example implementation of Shamir's Secret Sharing in Rust. You can find mo

null 13 Dec 29, 2022
Secret contract for Anons project.

Snip-721 Protocal by Baedrik template with several edits Minting Limits mint() caps tokens max at 580 mint() will keep count of how many anons each ad

Stake or Die 14 Jul 9, 2022