shamir

module
v0.0.0-...-f1cc042 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2021 License: Apache-2.0

README

Usage

bin/encrypt

cat file | bin/encrypt [args]

Usage of bin/encrypt:
  -parts int
        how many parts of the key should be created (default 5)
  -threshold int
        how many parts of the key are required for recombination (default 3)
  -output string
        filename for encoded content (default "out")

bin/decrypt

cat file | bin/decrypt [args]

Usage of bin/decrypt:
  -output string
        filename for decoded content or empty for STDOUT
  -parts string
        comma separated parts of the key

Encrypt file and share secret

Pre-requirements:

  • Parts: 3 of 6
  • Content: in file source.txt
  • Encoded content: save to file encoded.txt
cat source.txt | bin/encrypt -parts 6 -threshhold 3 -output encoded.txt

Decrypt file with required parts of the key

Pre-requirements:

  • Required parts: 3
  • Encoded content: in file encoded.txt
  • Result should be printed to STDOUT
cat encoded.txt | bin/decrypt -parts PART1,PART2,PART3

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL