Installation

Kid Words requires Go 1.27 or later.

As a library

Add Kid Words to an existing Go module:

go get github.com/dkotik/kidwords@latest

Import the package in your Go program:

import "github.com/dkotik/kidwords"

You can then split a secret into recoverable shards:

shards, err := kidwords.Split(
  []byte("secret paper key"),
  12, // number of shards
  4,  // quorum needed to recover the secret
)
if err != nil {
  panic(err)
}

See Using as Library for a complete example, including formatting shards and recovering the original secret.

As a command line tool

Install the kidwords executable:

go install github.com/dkotik/kidwords/cmd/kidwords@latest

Make sure the Go binary directory is on your PATH, then split a secret into shards:

kidwords split somePaperKey

To recover the original secret, provide the required quorum of shards:

kidwords combine

See Using as Command Line Tool for a complete example of the command output.