{"id":19788728,"url":"https://github.com/ooesili/shamir","last_synced_at":"2025-07-05T19:34:01.373Z","repository":{"id":69266434,"uuid":"126681706","full_name":"ooesili/shamir","owner":"ooesili","description":"A command line tool for using Shamir's Secret Sharing algorithm.","archived":false,"fork":false,"pushed_at":"2018-03-25T09:21:17.000Z","size":3,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T22:11:22.855Z","etag":null,"topics":["command-line","cryptography","shamir-secret-sharing"],"latest_commit_sha":null,"homepage":null,"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/ooesili.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2018-03-25T09:20:23.000Z","updated_at":"2025-01-05T01:10:41.000Z","dependencies_parsed_at":"2023-05-19T17:45:44.848Z","dependency_job_id":null,"html_url":"https://github.com/ooesili/shamir","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ooesili/shamir","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooesili%2Fshamir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooesili%2Fshamir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooesili%2Fshamir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooesili%2Fshamir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ooesili","download_url":"https://codeload.github.com/ooesili/shamir/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooesili%2Fshamir/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263795021,"owners_count":23512624,"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":["command-line","cryptography","shamir-secret-sharing"],"created_at":"2024-11-12T06:28:26.548Z","updated_at":"2025-07-05T19:34:01.319Z","avatar_url":"https://github.com/ooesili.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"shamir\n======\n\nA simple command utility that can perform operations using [Shamir's Secret Sharing algorithm](https://en.wikipedia.org/wiki/Shamir's_Secret_Sharing).\n\n## Usage\n\n`shamir` takes and receives base64 encoded key shares.\n\n```\n$ shamir -h\nUsage: shamir [\u003coptions\u003e] (split|combine)\n  -in string\n    \tinput file (default \"-\")\n  -out string\n    \toutput file (default \"-\")\n  -parts int\n    \tnumber of shares for split operation (default 3)\n  -threshold int\n    \tthreshold for split operation (default 2)\n```\n\n## Examples\n\n\nSplitting a secret\n\n```\n$ cat secret\nI've never been to Spain.\n$ shamir -in secret -threshold 5 -parts 8 split\njZYqqJaCxt4kZjh/xCAakXIG0XKdnlxY89/S\n1yubXvs8GdSqO8GPX9Xwk4fV22MJ/4F8wxh9\nfuVQmRhkVeKQGzpPVT0eNwvLXHxrQmQjFLGH\nYggxmz2bmtTNPAX9ctHffwqsw4Ds8GZHDpa1\nNyns0pAKCfeqLCrzxV+TpoJCvDJKTqJmR2kG\na//rC1IRcRow60BY5SQV+6bZXLFbUxt221zy\nuB34M0pUB5vljgIfdItDHetEfKqxDQea6A93\nOUQe8CwZBHTbwt0Za/IRLUlLfB39smrEIEpt\n```\n\nCombing shares\n\n```\n$ cat shares\nupOiLkD7A/va03FStBD+NV9feBlKooE8imH7JJ/CXbbV3pQ3EHxZCQ3z\ndfJ2ID7zuNNQY+Zqkqvhu2QCBzVLJyuxg4nzT0rSmYrrbR5RBQNPiOVD\n+p/3gvuk9sNTjR7UIOVJHi13ZoPvIm/jcBCkJm98tpKgdB1tqWIUK3yt\n$ head -n 2 shares | shamir combine\nThree can keep a secret if two are dead.\n\n```\n\n## Thanks\n\nThanks to Hashicorp for implementing the actual algorithm and publishing it as part of the [source code for Vault](https://github.com/hashicorp/vault/tree/master/shamir).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fooesili%2Fshamir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fooesili%2Fshamir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fooesili%2Fshamir/lists"}