{"id":46993751,"url":"https://github.com/multiparty/umbral","last_synced_at":"2026-03-11T14:39:06.996Z","repository":{"id":57385632,"uuid":"136525873","full_name":"multiparty/umbral","owner":"multiparty","description":null,"archived":false,"fork":false,"pushed_at":"2019-01-11T03:55:09.000Z","size":307,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-10-01T21:54:22.474Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/multiparty.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-06-07T20:09:07.000Z","updated_at":"2024-02-28T15:06:24.000Z","dependencies_parsed_at":"2022-09-26T16:50:49.964Z","dependency_job_id":null,"html_url":"https://github.com/multiparty/umbral","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/multiparty/umbral","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiparty%2Fumbral","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiparty%2Fumbral/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiparty%2Fumbral/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiparty%2Fumbral/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/multiparty","download_url":"https://codeload.github.com/multiparty/umbral/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiparty%2Fumbral/sbom","scorecard":{"id":667953,"data":{"date":"2025-08-18","repo":{"name":"github.com/multiparty/umbral","commit":"719f566a922b8ec6549fbea2a09e2f87bec19089"},"scorecard":{"version":"v5.2.1-41-g40576783","commit":"40576783fda6698350fcbbeaea760ff827433034"},"score":1.7,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"63 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-vh7m-p724-62c2","Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-q42p-pg8m-cqh6","Warn: Project is vulnerable to: GHSA-w457-6q6x-cgp9","Warn: Project is vulnerable to: GHSA-62gr-4qp9-h98f","Warn: Project is vulnerable to: GHSA-f52g-6jhx-586p","Warn: Project is vulnerable to: GHSA-2cf5-4w76-r9qv","Warn: Project is vulnerable to: GHSA-3cqr-58rm-57f8","Warn: Project is vulnerable to: GHSA-g9r4-xpmj-mj65","Warn: Project is vulnerable to: GHSA-q2c6-c6pm-g3gh","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-vfrc-7r7c-w9mx","Warn: Project is vulnerable to: GHSA-7wwv-vh3v-89cq","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546","Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-xf5p-87ch-gxw2","Warn: Project is vulnerable to: GHSA-5v2h-r2cx-5xgj","Warn: Project is vulnerable to: GHSA-rrrm-qjm4-v8hf","Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-fhjf-83wg-r2j9","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp","Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-mxhp-79qh-mcx6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T18:48:05.375Z","repository_id":57385632,"created_at":"2025-08-21T18:48:05.376Z","updated_at":"2025-08-21T18:48:05.376Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30384145,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T14:10:17.325Z","status":"ssl_error","status_checked_at":"2026-03-11T14:09:37.934Z","response_time":84,"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-03-11T14:39:06.204Z","updated_at":"2026-03-11T14:39:06.984Z","avatar_url":"https://github.com/multiparty.png","language":"TypeScript","readme":"# Umbral\n[![npm version](https://badge.fury.io/js/umbral.svg)](https://badge.fury.io/js/umbral)\n[![Build Status](https://travis-ci.org/multiparty/umbral.svg?branch=master)](https://travis-ci.org/multiparty/umbral)\n[![Coverage Status](https://coveralls.io/repos/github/multiparty/umbral/badge.svg?branch=master)](https://coveralls.io/github/multiparty/umbral?branch=master)\n\n### Installation\n```npm install umbral```\n\n### Initialization\nThe module must be initialized with a sodium instance.\n```typescript\n    await _sodium.ready;\n    const _umbral = new Umbral(_sodium);\n```\n\n\n### Public Interfaces\n##### ```IKey``` #####\nDictionary of {id: key} key-value pairs, where the ```id``` identifies the options counselor the key belongs to. This assumes that each options counselor can be identified by an uuid.\n```typescript\n/**\n * Dictionary of {id: key}\n */\nexport interface IKey {\n  [id: string]: Uint8Array;\n}\n```\n\n##### ```IMalformed``` #####\nObject for storing errors in either the encryption or decryption workflow. Within encryption, the ```id``` serves to notify the input that an error occurred on. For decryption, the ```id``` corresponds to a particular ```IEncryptedData```, described below. For both workflows the error field contains exact errors produced.\n```typescript\n/**\n * Object for storing errors\n */\nexport interface IMalformed {\n  readonly id: string;\n  readonly error: string;\n}\n```\n\n##### ```IEncryptedData``` #####\nObject containing the ciphertext resulting from encryption using a *single perpId* and a *single OC's public key*. The number of ```IEncryptedData``` objects at the end of the encryption worfklow should equal the number of perpetrator IDs submitted multiplied by the number of OCs.\n```typescript\n/**\n * Encrypted data object\n */\nexport interface IEncryptedData {\n  readonly eOC: string; // c\n  eRecord: string;\n  readonly eUser: string; // c'user\n  readonly id: string; // id\n  readonly matchingIndex: string; // pi\n}\n```\n\n##### ```IOCDataMap``` #####\nA dictionary mapping each options counselor, identified through an id, to an array of encrypted data objects that have all been encrypted under the OC's public key.\n```typescript\n/**\n * Mapping of OC id to matching records\n */\nexport interface IOCDataMap {\n  [OCid: string]: IEncryptedData[];\n}\n```\n##### ```IEncryptedMap``` #####\nDictionary represents the mapping of a matching index to all the records that have the same matching index encrypted under each options counselor's public key. \n```typescript\n/**\n * Mapping of matching index to all matching records under a specific OC\n */\nexport interface IEncryptedMap {\n  [matchingIndex: string]: IOCDataMap;\n}\n```\n##### ```IEncrypted``` #####\nAt the end of the encryption workflow, a single object will be returned in the following form. The encryptedMap should contain as many matching indices as submitted perpIds. Corresponding to each matching index is the ```IOCDataMap``` for each options counselor, containing their corresponding ciphertexts. \n```typescript\n/**\n * Data object returned from encryption workflow\n */\nexport interface IEncrypted {\n  readonly encryptedMap: IEncryptedMap;\n  readonly malformed: IMalformed[];\n}\n```\n##### ```IDecrypted``` #####\nDecryption returns the following object containing an array of user records and an array of malformed objects where decryption did not properly occur.\n```typescript\n/**\n * Data returned from decryption workflow\n */\nexport interface IDecrypted {\n  readonly data: string[];\n  readonly malformed: IMalformed[]; // ids\n}\n```\n\n### Encryption\nThis function must be provided with a dictionary of public keys in the form of ```IKey``` key-value pairs (pkOCs). It will return all of the encrypted data in ```IEncrypted``` form. \n```typescript\n\n  /**\n   * Encryption workflow\n   * @param randIds - array of all randIds corresponding to each perpId submitted\n   * @param userId - user's uuid\n   * @param data - record information\n   * @param pkOCs - dictionary of all OC public keys\n   * @param userPassPhrase - user's passphrase for use in encrypting for editing\n   * @returns {IEncrypted} object containing encrypted data and errors\n   */\n  public encryptData(randIds: Uint8Array[], userId: string, data: string, pkOCs: IKey,\n                     userPassPhrase: Uint8Array): IEncrypted \n```\n\n### Decryption\nThe function should be provided with **matched** encrypted records encrypted under a specific OC's public key.\n```typescript\n\n  /**\n   * Decryption workflow\n   * @param {IEncryptedData[]} encryptedData - an array of encrypted data of matched users, under a single OC's public key\n   * @param pkOC - public key of an options counselor\n   * @param skOC - secret key of an options counselor\n   * @returns {IDecrypted]} object containing decrypted records and errors\n   */\n  public decryptData(encryptedData: IEncryptedData[], pkOC: Uint8Array, skOC: Uint8Array): IDecrypted \n\n```\n\n\n### End-to-End Example\nThe following example involves two users and two options counselors.\n```typescript\n    let encryptedDict: IEncryptedMap = {};\n\n    await _sodium.ready;\n    const _umbral = new Umbral(_sodium);\n\n    const userKeyPair = _sodium.crypto_box_keypair();\n\n    var [publicKeys, privateKeys] = generateKeys(2);\n\n    const perpId = 'facebook.com/Mallory';\n    const randId: Uint8Array = performOPRF(perpId);\n\n    const encryptedDataA: IEncrypted = _umbral.encryptData([randId], { perpId, userId: 'Alice' }, publicKeys, userKeyPair.privateKey);\n    updateDict(encryptedDict, encryptedDataA.encryptedMap);\n\n    const encryptedDataB: IEncrypted = _umbral.encryptData([randId], { perpId, userId: 'Bob' }, publicKeys, userKeyPair.privateKey);\n    updateDict(encryptedDict, encryptedDataB.encryptedMap);\n\n    for (let index in encryptedDict) {\n      for (let oc in encryptedDict[index]) {\n        const encrypted = encryptedDict[index][oc];\n        const decrypted = _umbral.decryptData(encrypted, publicKeys[oc], privateKeys[oc]);\n      }\n    }\n```\n\nAdditional examples can be found under ```test/tests.ts```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultiparty%2Fumbral","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmultiparty%2Fumbral","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultiparty%2Fumbral/lists"}