{"id":44470234,"url":"https://github.com/3box/sss-wasm","last_synced_at":"2026-02-12T21:15:05.137Z","repository":{"id":49807122,"uuid":"132113178","full_name":"3box/sss-wasm","owner":"3box","description":"Javascript bindings for the sss secret sharing library using WASM","archived":false,"fork":false,"pushed_at":"2022-07-26T22:02:18.000Z","size":489,"stargazers_count":24,"open_issues_count":1,"forks_count":11,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-08-24T21:58:03.365Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/3box.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}},"created_at":"2018-05-04T08:39:16.000Z","updated_at":"2025-08-07T03:02:16.000Z","dependencies_parsed_at":"2022-09-15T05:51:30.671Z","dependency_job_id":null,"html_url":"https://github.com/3box/sss-wasm","commit_stats":null,"previous_names":["uport-project/sss-wasm"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/3box/sss-wasm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3box%2Fsss-wasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3box%2Fsss-wasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3box%2Fsss-wasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3box%2Fsss-wasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/3box","download_url":"https://codeload.github.com/3box/sss-wasm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3box%2Fsss-wasm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29381287,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T20:34:40.886Z","status":"ssl_error","status_checked_at":"2026-02-12T20:23:00.490Z","response_time":55,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-02-12T21:15:04.282Z","updated_at":"2026-02-12T21:15:05.131Z","avatar_url":"https://github.com/3box.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shamir secret sharing for Javascript\n[Shamir secret sharing](https://en.wikipedia.org/wiki/Shamir's_Secret_Sharing) is an algorithm for splitting data into multiple `shares`, a subset of which can then be combined to reconstruct the original secret. This library aims to provide javascript bindings for [dsprenkles/sss](https://github.com/dsprenkels/sss/tree/master) implementation of this algorithm using Web Assembly.\n\n## Background\nCurrently there are bindings for sss in node.js. However this code will not run in the browser since it uses node binaries. By using Web Assembly it is possible to create a javascript library that works both in the browser as well as node.js.\n\n## Usage\n```ts\n// Import the sss library\nimport * as sss from 'sss-wasm' \n\n// Create a buffer for the data that will be shared (must be 64 bytes long)\nconst data = new Uint8Array(64);\ndata.fill(0x42);\n\nconst amount = 5;\nconst threshold = 4;\n\n// Creating 5 shares (need 3 to restore)\nconst shares = await sss.createShares(data, amount, threshold);\n\n// For demonstrational purpose, lose one of the shares\nconst newShares = [shares[3], shares[2], shares[4], shares[0]]\n\n// Restore the original secret\nconst restored = await sss.combineShares(newShares);\n\n// Dump the original secret back to the screen\nconsole.log(restored)\n```\n\n## Build\nWe need Emscripten toolchain installed to build wasm. [More info](https://webassembly.org/getting-started/developers-guide/)\n\nYou need to setup submodules first.\n```\ngit submodules init\ngit submodules update\ncd sss\ngit submodules init\ngit submodules update\n```\n\nThen go to the root folder.\n```\nnpm install\nnpm run build\nnpm run test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3box%2Fsss-wasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F3box%2Fsss-wasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3box%2Fsss-wasm/lists"}