Sss.nim
Shamir Secret Sharing for Nim
Install / Use
/learn @markspanbroek/Sss.nimREADME
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:
- update the git submodule in
sources/to point to the new version - run
build.sh - update the version in
sss.nimble - commit the changes
Related Skills
node-connect
332.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
81.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
332.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
81.7kCommit, push, and open a PR
