{"id":17553532,"url":"https://github.com/gavincarr/go-slip39","last_synced_at":"2025-07-31T23:33:58.649Z","repository":{"id":245021613,"uuid":"817024786","full_name":"gavincarr/go-slip39","owner":"gavincarr","description":"A SLIP-0039 library for Go.","archived":false,"fork":false,"pushed_at":"2024-10-30T21:44:57.000Z","size":148,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T01:24:10.541Z","etag":null,"topics":["bitcoin","cryptography","go","slip39"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gavincarr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-06-18T21:40:21.000Z","updated_at":"2024-11-12T08:11:33.000Z","dependencies_parsed_at":"2024-06-19T03:52:30.880Z","dependency_job_id":"30a35699-7bec-4021-8187-9a3686988aa7","html_url":"https://github.com/gavincarr/go-slip39","commit_stats":null,"previous_names":["gavincarr/go-slip39"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavincarr%2Fgo-slip39","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavincarr%2Fgo-slip39/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavincarr%2Fgo-slip39/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavincarr%2Fgo-slip39/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gavincarr","download_url":"https://codeload.github.com/gavincarr/go-slip39/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248525137,"owners_count":21118616,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoin","cryptography","go","slip39"],"created_at":"2024-10-21T06:42:45.448Z","updated_at":"2025-04-12T06:03:06.401Z","avatar_url":"https://github.com/gavincarr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"go-slip39\n=========\n\n[![PkgGoDev](https://pkg.go.dev/badge/gavincarr/go-slip39)](https://pkg.go.dev/github.com/gavincarr/go-slip39)\n[![MIT License](https://img.shields.io/github/license/gavincarr/go-slip39.svg?maxAge=2592000\u0026color=blue)](https://github.com/gavincarr/go-slip39/blob/master/LICENCE)\n[![Go Build Status](https://github.com/gavincarr/go-slip39/actions/workflows/go.yml/badge.svg)](https://github.com/gavincarr/go-slip39/actions/workflows/go.yml/badge.svg)\n[![Go Report Card](https://goreportcard.com/badge/github.com/gavincarr/go-slip39)](https://goreportcard.com/report/github.com/gavincarr/go-slip39)\n\nA SLIP-0039 library for Go. Specifically, this library is a port of the\n[SLIP-0039 python reference implementation](http://github.com/trezor/python-shamir-mnemonic/) to Go.\n\nSLIP-0039 describes a standard and interoperable implementation of Shamir's\nsecret sharing (SSS). SSS splits a secret into unique parts which can be\ndistributed among participants, and requires a specified minimum number of\nparts to be supplied in order to reconstruct the original secret. Knowledge of\nfewer than the required number of parts does not leak information about the\nsecret.\n\nDocumentation\n-------------\n\nPackage documentation can be found at [pkg.go.dev](https://pkg.go.dev/github.com/gavincarr/go-slip39).\n\nSpecification\n-------------\n\nSee https://github.com/satoshilabs/slips/blob/master/slip-0039.md for the full\nSLIP-0039 specification.\n\nSecurity\n--------\n\nThis implementation is not using any hardening techniques. Secrets are passed\nin the open, and calculations are most likely vulnerable to side-channel attacks.\nThe code has not been audited by security professionals. Use at your own risk.\n\nAt the very least, you should not use this library for non-testing purposes\nor with sensitive secrets outside an air-gapped live system such as\n[Tails](https://tails.net/).\n\nCLI\n---\n\nNo executables are provided with this library. You can write your own tools\npretty simply, or there is a sister project called\n[seedkit](https://github.com/gavincarr/seedkit/) which provides a command\nline tool that uses this library.\n\nUsage\n-----\n\n```go\npackage main\n\nimport (\n\t\"encoding/hex\"\n\t\"fmt\"\n\n\t\"github.com/gavincarr/go-slip39\"\n)\n\nfunc main() {\n\tmasterSecret := \"bb54aac4b89dc868ba37d9cc21b2cece\"\n\tpassphrase := \"TREZOR\"\n\n\t// Generate a single group of 3 of 5 shares for masterSecret\n\tmasterSecretBytes, _ := hex.DecodeString(masterSecret)\n\tgroupCount := 1\n\tmemberGroupParams := []slip39.MemberGroupParameters{{3, 5}}\n\tgroups, _ := slip39.GenerateMnemonicsWithPassphrase(\n\t\tgroupCount,\n\t\tmemberGroupParams,\n\t\tmasterSecretBytes,\n\t\t[]byte(passphrase),\n\t)\n\tfmt.Println(len(groups[0]))\n\t// Output: 5\n\n\t// Combine 3 of the 5 shares to recover the master secret\n\tshares := []string{groups[0][0], groups[0][2], groups[0][4]}\n\trecoveredSecret, _ := slip39.CombineMnemonicsWithPassphrase(\n\t\tshares,\n\t\t[]byte(passphrase),\n\t)\n\tfmt.Println(hex.EncodeToString(recoveredSecret))\n\t// Output: bb54aac4b89dc868ba37d9cc21b2cece\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavincarr%2Fgo-slip39","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgavincarr%2Fgo-slip39","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavincarr%2Fgo-slip39/lists"}