#id #group #share #length #master-secret


Work-in-Progress of Shamir Secret Sharing for Mnemonic Codes (SLIP-39)

3 releases

0.0.3 Jun 15, 2020
0.0.2 Jan 29, 2020
0.0.1 Aug 20, 2019
Download history 10/week @ 2023-05-31 1/week @ 2023-06-07 35/week @ 2023-06-14 14/week @ 2023-06-21 19/week @ 2023-06-28 5/week @ 2023-07-05 2/week @ 2023-07-12 10/week @ 2023-07-19 12/week @ 2023-07-26 5/week @ 2023-08-02 8/week @ 2023-08-09 26/week @ 2023-08-16 13/week @ 2023-08-23 9/week @ 2023-08-30 12/week @ 2023-09-06 9/week @ 2023-09-13

56 downloads per month
Used in slip39



Build Status


"I think Shamir Secret Sharing (and a number of other things, RNGs for example), suffer from a property where they are just complex enough that people are excited to implement them often for little good reason, and then they are complex enough (or have few enough reasons to invest significant time) they implement them poorly." -Gregory Maxwell

"Hold my vodka" -Yeastplume

This is a currently very work-in-progress Rust implementation of SLIP-0039: Shamir's Secret Sharing for Mnemonic Codes. It is being developed for eventual incorpration into Grin's Wallet, however I hope it can be of use to anyone looking to implement a master-secret sharing scheme. The specification doesn't just operate on BIP-39 Mnemonics, but can also split keys of almost any size so it should be useful for a wide variety of needs.

Again, this is an untested work-in-progess, so use at your own risk.


  • Field arithmetic, underlying encryption and RS1024 code in place.
  • Share splitting, conversion of share to Mnemonic and back in place.
  • Secret recovery from share mnemonics in place
  • Test vectors from original python reference implementation passing (see below)
  • Main master secret to group mnemonics in place (see test in src/lib.rs)

Still Outstanding

  • Tightening of certain areas of code (check TODOS)
  • API shaping
  • Documentation
  • Continuous Integration
  • Community reviews and Some level of code audit
  • Publishing


The code was put together using the SLIP-0039 Python Reference Implementation as a reference

Field arithmetic code taken with thanks and respect from Rusty Secrets, with license details in all derived source files.

Rusty Secrets was forked off sellibitze's secretshare.


~138K SLoC