sss

Shamir secret sharing

Pure Nim score 15/100 · tests present · no docs generated

Summary

Latest Version Unknown
License MIT
CI Status Failing
Downloads 0
Last Indexed 2026-07-22 05:28

Installation

nimble install sss
choosenim install sss
git clone https://github.com/markspanbroek/sss.nim

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
sss - - - - - - -

Source

Repository https://github.com/markspanbroek/sss.nim
Homepage https://github.com/markspanbroek/sss.nim
Registry Source nimble_official

README

Shamir Secret Sharing

Split a random key into a number of shares. Using a number of these shares the key can be restored.

This is a nim wrapper around the c library by dsprenkels. Only the hazardous low level API is wrapped, so only use this when you know what you're doing.

Examples

Generate a uniform random key:

let key = randomKey()

Create 3 shares of the key, of which 2 are sufficient to restore the key:

let shares = key.shares(2, 3)

Restore the key by combining 2 shares:

let restored = combine(shares[0..1])

Updating to a newer version

Follow these steps when updating the wrapper to a newer version of sss:

  1. update the git submodule in sources/ to point to the new version
  2. run build.sh
  3. update the version in sss.nimble
  4. commit the changes