CLI for Shamir's Secret Sharing and AES key generation, encryption, and decryption.

Shush 🤫

This simple program will help you run Shamir's Secret Sharing algorithm on any file using the split and merge commands. It also contains tools to easily generate an AES key and encrypt and decrypt files using said key.

There is a bitcoin bounty ready to be claimed if you can bypass this scheme.

If you are backing up a bitcoin wallet, you might be better off doing something with multisig. This article summarizes some of the drawbacks of Shamir, but I think in some cases it's still a good solution!

This is not security-hardened code. Use at your own risk.

Usage

Screen recording of shush usage

Encrypt and Decrypt Files

# Generate a new AES Key
shush generate my.key

# Encrypt a secret file or archive with your AES Key
shush encrypt -key=my.key secrets.tar 

# Decrypt a payload using an AES key
shush decrypt -key=my.key secrets.tar.shush 

Split and Merge with Shamir's Secret Sharing Algorithm

# Split a file into 5 shards, requiring a threshold of at least 3 shards for recovery
shush split -t=3 -s=5 my.key

# Merge shards back into the original file
shush merge my.key.shard0 my.key.shard2 my.key.shard4

# On unix you can also use a wildcard, if the names are preserved.
shush merge my.key.shard*

Build & Install

# On a unix-based system with go installed...
go build -o shush main.go
# install on your system
mv shush /usr/local/bin

FAQ

Why is this useful?

If you've distributed the shards of an AES key to your team (read: family, friends, coworkers), they will be able to recover any encrypted data in case you lose it, become incapacitated, or worse.

Can't I just split a key into chunks, and distribute the chunks?

With Shamir's algorithm, you can specify a threshold for recovery that is lower than the total number of shards. This approach protects you against some members of your team losing their shards.

How do I safely generate and distribute shards & encrypted payloads?

Run this program in Tails with no internet connection. Be extremely careful about how you store your key! Distribute shards to your team on physical media (like flash drives). You may also want to notify your team members who else is on their team, but ideally that information will live in their heads, not in their emails.

What should I include when distributing shards?

You may want to consider including any of the following things when distributing shards:

  • instructions on how to merge shards and decrypt files
  • information about the location of other potential payloads
  • a copy of the encrypted payload(s)
  • a copy of shush
  • a copy of the shush source code

How do I safely merge shards and decrypt payloads?

Since the payload likely has sensitive contents, you should take similar precautions (tails, offline, etc.) when re-assembling keys and decrypting payloads.

Can I encrypt additional or updated secrets?

If you hold onto your original AES key, you can create new encrypted payloads whenever you want, and redistribute or upload just the payload without having to generate new keys or distribute new shards.

What stops the people on my team from coordinating to steal my secrets against my will?

Nothing. Choose your team wisely.

Similar Resources

Go-api-cli - Small CLI to fetch data from an API sync and async

Async API Cli CLI to fetch data on "todos" from a given API in a number of ways.

Jan 13, 2022

Syno-cli - Synology unofficial API CLI and library

Synology CLI Unofficial wrapper over Synology API in Go. Focus on administrative

Jan 6, 2023

Nebula Diagnosis CLI Tool is an information diagnosis cli tool for the nebula service and the node to which the service belongs.

Nebula Diagnosis CLI Tool is an information diagnosis cli tool for the nebula service and the node to which the service belongs.

Jan 12, 2022

Elegant CLI wrapper for kubeseal CLI

Overview This is a wrapper CLI ofkubeseal CLI, specifically the raw mode. If you just need to encrypt your secret on RAW mode, this CLI will be the ea

Jan 8, 2022

CLI to run a docker image with R. CLI built using cobra library in go.

CLI  to run a docker image with R. CLI built using cobra library in go.

BlueBeak Installation Guide Task 1: Building the CLI The directory structure looks like Fastest process: 1)cd into bbtools 2)cd into bbtools/bin 3)I h

Dec 20, 2021

A wrapper of aliyun-cli subcommand alidns, run aliyun-cli in Declarative mode.

aliyun-dns A wrapper of aliyun-cli subcommand alidns, run aliyun-cli in Declarative mode. Installation Install aliyun-cli. Usage $ aliyun-dns -h A wra

Dec 21, 2021

Symfony-cli - The Symfony CLI tool For Golang

Symfony CLI Install To install Symfony CLI, please download the appropriate vers

Dec 28, 2022

Cli-algorithm - A cli program with A&DS in go!

cli-algorithm Objectives The objective of this cli is to implement 4 basic algorithms to sort arrays been Merge Sort Insertion Sort Bubble Sort Quick

Jan 2, 2022

Nebulant-cli - Nebulant's CLI

Nebulant-cli - Nebulant's CLI

Nebulant CLI Website: https://nebulant.io Documentation: https://nebulant.io/docs.html The Nebulant CLI tool is a single binary that can be used as a

Jan 11, 2022
Comments
  • Bitcoin Bounty 💰

    Bitcoin Bounty 💰

    I've used shush to...

    1. generate a key
    2. encrypt a tarball containing a bitcoin private key among other things
    3. split a 3 of 5 shamir of the key

    bounty_files.zip contains 2 of the shards and the encrypted payload containing a private key for this address.

    If you successfully break the AES or the shamir shares, then you can transfer ~$200 of BTC to your own wallet.


    If you submit an issue explaining how you did it, or better yet how to fix it, I'll double the reward.

Teller - the open-source universal secret manager for developers
 Teller - the open-source universal secret manager for developers

A secrets management tool for developers built in Go - never leave your command line for secrets.

Jan 8, 2023
A personal knowledge management and sharing system for VSCode
A personal knowledge management and sharing system for VSCode

Foam ?? This is an early stage project under rapid development. For updates join the Foam community Discord! ?? Foam is a personal knowledge managemen

Jan 9, 2023
VSCode Remote-SSH and configuration sharing on WSL.

Wslssh Wslssh forwards SSH command from VSCode Remote-SSH to WSL and enables SSH configuration sharing. Quick Start Guide Download or compile wslssh a

Dec 2, 2021
Upterm is an open-source solution for sharing terminal sessions instantly over the public internet via secure tunnels.
Upterm is an open-source solution for sharing terminal sessions instantly over the public internet via secure tunnels.

Upterm is an open-source solution for sharing terminal sessions instantly over the public internet via secure tunnels.

Jan 8, 2023
Clipsync: a high performance clipboard sharing application for linux

clipsync: Clipboard sync Clipsync is a high performance clipboard sharing applic

Sep 18, 2022
Vaku is a CLI and API for running path- and folder-based operations on the Vault Key/Value secrets engine.
Vaku is a CLI and API for running path- and folder-based operations on the Vault Key/Value secrets engine.

Vaku Vaku is a CLI and API for running path- and folder-based operations on the Vault Key/Value secrets engine. Vaku extends the existing Vault CLI an

Nov 28, 2022
Google KMS backed Solana key management CLI tool

solana-kms solana-kms is a Google KMS backed Solana token management CLI utility. The main purpose of the tool is to ensure that the private key is ne

Jan 13, 2022
Simple CLI interface to in-memory key/value storage a la redis.

Simple memory key value Simple CLI interface to in-memory key/value storage a la redis. Running Can be run through go directly or through docker using

Jan 7, 2022
Go-file-downloader-ftctl - A file downloader cli built using golang. Makes use of cobra for building the cli and go concurrent feature to download files.

ftctl This is a file downloader cli written in Golang which uses the concurrent feature of go to download files. The cli is built using cobra. How to

Jan 2, 2022