{"id":17279728,"url":"https://github.com/str4d/bls","last_synced_at":"2025-04-14T08:22:08.805Z","repository":{"id":57519157,"uuid":"115877771","full_name":"str4d/bls","owner":"str4d","description":"Rust crate for BLS signatures","archived":false,"fork":false,"pushed_at":"2024-07-15T22:53:04.000Z","size":12,"stargazers_count":32,"open_issues_count":2,"forks_count":9,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-13T22:43:28.859Z","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/str4d.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":"2017-12-31T17:48:35.000Z","updated_at":"2024-10-31T20:49:14.000Z","dependencies_parsed_at":"2022-09-06T05:10:41.019Z","dependency_job_id":null,"html_url":"https://github.com/str4d/bls","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/str4d%2Fbls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/str4d%2Fbls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/str4d%2Fbls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/str4d%2Fbls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/str4d","download_url":"https://codeload.github.com/str4d/bls/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248844096,"owners_count":21170513,"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-10-15T09:18:25.957Z","updated_at":"2025-04-14T08:22:08.766Z","avatar_url":"https://github.com/str4d.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bls [![Crates.io](https://img.shields.io/crates/v/bls.svg)](https://crates.io/crates/bls) #\n\nThis is a Rust crate for making BLS (Boneh-Lynn-Shacham) signatures. It currently supports the [BLS12-381](https://z.cash/blog/new-snark-curve.html) (Barreto-Lynn-Scott) (yes, I know) construction.\n\n## Documentation\n\nBring the `bls` crate into your project just as you normally would.\n\n```rust\nuse bls::Keypair;\nuse pairing::bls12_381::Bls12;\n\nlet keypair = Keypair::\u003cBls12\u003e::generate(\u0026mut rng);\nlet message = \"Some message\";\nlet sig = keypair.sign(\u0026message.as_bytes());\nassert_eq!(keypair.verify(\u0026message.as_bytes(), \u0026sig), true);\n```\n\n### Aggregate signatures\n\n```rust\nuse bls::{AggregateSignature, Keypair};\nuse pairing::bls12_381::Bls12;\n\nlet mut inputs = Vec::new();\nlet mut asig = AggregateSignature::new();\n\nlet keypair1 = Keypair::\u003cBls12\u003e::generate(\u0026mut rng);\nlet message1 = \"Some unique message\";\nlet sig1 = keypair1.sign(\u0026message1.as_bytes());\ninputs.push((keypair1.public, message1));\nasig.aggregate(\u0026sig1);\n\nlet keypair2 = Keypair::\u003cBls12\u003e::generate(\u0026mut rng);\nlet message2 = \"Some other unique message\";\nlet sig2 = keypair2.sign(\u0026message2.as_bytes());\ninputs.push((keypair2.public, message2));\nasig.aggregate(\u0026sig2);\n\nassert_eq!(\n    asig.verify(\u0026inputs.iter()\n        .map(|\u0026(ref pk, ref m)| (pk, m.as_bytes()))\n        .collect()),\n    true\n);\n```\n\n## Security Warnings\n\nThis library does not make any guarantees about constant-time operations, memory access patterns, or resistance to side-channel attacks.\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the Apache-2.0\nlicense, shall be dual licensed as above, without any additional terms or\nconditions.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstr4d%2Fbls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstr4d%2Fbls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstr4d%2Fbls/lists"}