{"id":21336824,"url":"https://github.com/dan-da/blsbs","last_synced_at":"2025-07-12T12:32:54.636Z","repository":{"id":47527436,"uuid":"399656893","full_name":"dan-da/blsbs","owner":"dan-da","description":null,"archived":false,"fork":false,"pushed_at":"2022-01-01T21:28:24.000Z","size":34,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-04-16T22:29:22.371Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dan-da.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}},"created_at":"2021-08-25T01:49:24.000Z","updated_at":"2022-02-21T13:37:02.000Z","dependencies_parsed_at":"2022-09-08T08:23:16.512Z","dependency_job_id":null,"html_url":"https://github.com/dan-da/blsbs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan-da%2Fblsbs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan-da%2Fblsbs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan-da%2Fblsbs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan-da%2Fblsbs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dan-da","download_url":"https://codeload.github.com/dan-da/blsbs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225820222,"owners_count":17529139,"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":[],"created_at":"2024-11-21T23:55:30.630Z","updated_at":"2024-11-21T23:55:31.166Z","avatar_url":"https://github.com/dan-da.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# blsbs\nBLS Blind Signatures\n\n## Warning\n\nThis crate is very experimental at present, probably has serious bugs, and\nshould not be used for anything serious. It is unpublished for a reason.\n\n## About\n\nThis crate implements a simple API for working with [Chaumian Blind\nSignatures](https://en.wikipedia.org/wiki/Blind_signature) using [BLS\ncryptography](https://en.wikipedia.org/wiki/BLS_digital_signature).\n \nThe API supports both single key signatures and multisig. This is based on\n`SecretKeyShare` and `SignatureShare` from\n[blsttc](https://github.com/maidsafe/blsttc), originally implemented in\n[threshold_crypto](https://github.com/poanetwork/threshold_crypto).\n \nThis API embraces the metaphor of a `Slip` of paper that is enclosed in a\ncarbon-lined `Envelope`. The carbon lining is important because a `Signature`\nwritten outside the `Envelope` will transfer to the `Slip` inside as well. The\n`SlipPreparer` puts a message on the `Slip` and places it in the `Envelope`,\nthen sends it to another party, the `BlindSigner`.\n\nThe `BlindSigner` signs the outside of the `Envelope` without seeing the `Slip`\ninside, then returns it to the `SlipPreparer`. The `SlipPreparer` opens the\n`Envelope`, removes the `Slip`, and can then verify with the `BlindSigner`'s\npublic key that both the `Envelope` and the `Slip` have the `BlindSigner`'s\n`Signature`. Any party with a copy of the `Slip` and `BlindSigner`'s public key\ncan perform this verification.\n \nSee Chaum's [original paper](https://www.chaum.com/publications/Chaum-blind-signatures.PDF) for a fuller discussion.\n \nThe multisig API extends the above metaphor with the idea that at least m\n`BlindSigner` parties must sign the `Envelope` for the combined `Signature` to\nbe considered valid.\n\n## Example Usage\n\nA basic example with a single blind signer:\n\n```\nuse blsbs::*;\n\nfn main() {\n    let official = BlindSigner::new();\n    let voter = SlipPreparer::new();\n\n    let slip: Slip = b\"I vote for mickey mouse\".to_vec();\n    let envelope = voter.place_slip_in_envelope(\u0026slip);\n\n    let signed_envelope = official.sign_envelope(envelope)?;\n\n    let slip_sig = signed_envelope.signature_for_slip(voter.blinding_factor())?;\n    let result = voter.verify_slip_signature(\u0026slip, \u0026slip_sig, \u0026official.public_key());\n\n    assert!(result.is_ok());\n}\n```\n\nsee tests in src/shared.rs for examples of m-of-n usage.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdan-da%2Fblsbs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdan-da%2Fblsbs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdan-da%2Fblsbs/lists"}