All Projects → dsprenkels → sss-go

dsprenkels / sss-go

Licence: MIT license
Go bindings for my shamir-secret-sharing library

Programming Languages

c
50402 projects - #5 most used programming language
go
31211 projects - #10 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to sss-go

archistar-smc
Secret sharing library in Java for the Archistar multi-cloud storage system
Stars: ✭ 44 (+175%)
Mutual labels:  shamir-secret-sharing
shamirs-secret-sharing
A simple implementation of Shamir's Secret Sharing configured to use a finite field in GF(2^8) with 128 bit padding
Stars: ✭ 59 (+268.75%)
Mutual labels:  shamir-secret-sharing
sss-cli
Command line program for secret-sharing strings
Stars: ✭ 52 (+225%)
Mutual labels:  shamir-secret-sharing
sss-node
node.js bindings for the sss secret sharing library
Stars: ✭ 30 (+87.5%)
Mutual labels:  shamir-secret-sharing
QR-secret-sharing
🔒 Create QR codes to secret-share a message. Ideal for cryptocurrency wallet recovery keys and passwords.
Stars: ✭ 94 (+487.5%)
Mutual labels:  shamir-secret-sharing
SecMML
SecMML: Secure MPC(multi-party computation) Machine Learning Framework
Stars: ✭ 91 (+468.75%)
Mutual labels:  shamir-secret-sharing
cloak
A simple passphrase based file encryption tool.
Stars: ✭ 12 (-25%)
Mutual labels:  shamir-secret-sharing
SplitShare
Shamir's Secret Sharing Algorithm implementation in golang combined with PGP and a mail delivery system
Stars: ✭ 31 (+93.75%)
Mutual labels:  shamir-secret-sharing
paperback
Paper backup generator suitable for long-term storage.
Stars: ✭ 517 (+3131.25%)
Mutual labels:  shamir-secret-sharing
gasper
Gasper is a CLI for safe, privacy-aware file storage based on Shamir's Secret Sharing
Stars: ✭ 37 (+131.25%)
Mutual labels:  shamir-secret-sharing
banana split
Shamir's Secret Sharing for people with friends
Stars: ✭ 106 (+562.5%)
Mutual labels:  shamir-secret-sharing

Shamir secret sharing with Go

Build Status

sss-go contains Go bindings for my Shamir secret sharing library. This library allows users to split secret data into a number of different shares. With the possession of some or all of these shares, the original secret can be restored.

An example use case is a beer brewery which has a vault which contains their precious super secret recipe. The 5 board members of this brewery do not trust all the others well enough that they won't secretly break into the vault and sell the recipe to a competitor. So they split the code into 5 shares, and allow 4 shares to restore the original code. Now they are sure that the majority of the staff will know when the vault is opened, but they can still open the vault when one of the staff members is abroad or sick at home.

Installation

go get github.com/dsprenkels/sss-go

Usage

Secrets are provided as []byte slices with a length of 64. Shares are generated from secret data using sss.CreateShares and shares can be combined again using the sss.CombineShares function. Shares are always 113 bytes long and sss.CombineShares will return an error if one of the given shares is of an invalid length.

package main

import (
    "log"
    "github.com/dsprenkels/sss-go"
)

func main() {
    // Make a new slice of secret data [42, ..., 42]
    data := make([]byte, 64)
    for i, _ := range data {
        data[i] = 42
    }

    // Create 5 shares; allow 4 to restore the original data
    shares, err := sss.CreateShares(data, 5, 4)
    if err != nil {
        log.Fatalln(err)
    }

    // Permute and lose some of the shares (for demonstrational purposes)
    new_shares := make([][]byte, 4)
    new_shares[0] = shares[2]
    new_shares[1] = shares[4]
    new_shares[2] = shares[0]
    new_shares[3] = shares[3]

    // Try to restore the original secret
    restored, err := sss.CombineShares(new_shares)
    if err != nil {
        log.Fatalln(err)
    }

    log.Println(restored)
}

Changelog

Version 0.1.1

  • Remove an unintended side channel which allows a participating attacker with access to a accurate timing channel to iteratively guess shares during the execution of combine_shares.

Questions

Feel free to send me an email on my Github associated e-mail address.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].