From 51e489a8e3ee0b6747b2578640bd865a4e9b9809 Mon Sep 17 00:00:00 2001 From: Malin Freeborn Date: Mon, 13 May 2024 20:15:28 +0200 Subject: [PATCH] note sharding secrets --- data/sharing_secrest.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 data/sharing_secrest.md diff --git a/data/sharing_secrest.md b/data/sharing_secrest.md new file mode 100644 index 0000000..78439b0 --- /dev/null +++ b/data/sharing_secrest.md @@ -0,0 +1,23 @@ +--- +title: "Sharing Secrets" +tags: [ "data", "death", "secrets", "ssss" ] +--- + +You can share parts of a secret with multiple people, so only some of them need to agree to see the secret. + +Install `ssss`, then decide on the total number of secrets (`N`), and the threshold of people who must share their shard of the secret in order to reveal the secret. + +```bash +N=5 +T=3 +FILE=secret.txt +fortune | ssss-split -t $T -n $N > $FILE +``` +Each shard is a line inside secret.txt. + +Check it's working: + +```bash +head -n $T $FILE | ssss-combine -t $T +tail -n $T $FILE | ssss-combine -t $T +```