{"id":13757628,"url":"https://github.com/hbakhtiyor/schnorr","last_synced_at":"2025-10-28T20:32:24.517Z","repository":{"id":56284280,"uuid":"164874966","full_name":"hbakhtiyor/schnorr","owner":"hbakhtiyor","description":"Go implementation of the BIP Schnorr signature scheme. ","archived":false,"fork":false,"pushed_at":"2021-01-10T01:34:26.000Z","size":64,"stargazers_count":70,"open_issues_count":4,"forks_count":22,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-25T19:06:18.870Z","etag":null,"topics":["bip","bitcoin","bitcoins","golang","schnorr","schnorr-signatures"],"latest_commit_sha":null,"homepage":"","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/hbakhtiyor.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":"2019-01-09T14:10:04.000Z","updated_at":"2025-01-11T20:42:24.000Z","dependencies_parsed_at":"2022-08-15T16:00:46.215Z","dependency_job_id":null,"html_url":"https://github.com/hbakhtiyor/schnorr","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hbakhtiyor/schnorr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hbakhtiyor%2Fschnorr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hbakhtiyor%2Fschnorr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hbakhtiyor%2Fschnorr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hbakhtiyor%2Fschnorr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hbakhtiyor","download_url":"https://codeload.github.com/hbakhtiyor/schnorr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hbakhtiyor%2Fschnorr/sbom","scorecard":{"id":458365,"data":{"date":"2025-08-11","repo":{"name":"github.com/hbakhtiyor/schnorr","commit":"0082e255e23489233b36d9097630131d32f2f73f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 1/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"34 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-1098 / GHSA-2chg-86hq-7w38","Warn: Project is vulnerable to: GO-2024-2818 / GHSA-3jgf-r68h-xfqm","Warn: Project is vulnerable to: GO-2024-3189 / GHSA-27vh-h6mc-q6g8","Warn: Project is vulnerable to: GO-2022-0209 / GHSA-r5c5-pr8j-pfp7","Warn: Project is vulnerable to: GO-2023-1992 / GHSA-x3jr-pf6g-c48f","Warn: Project is vulnerable to: GO-2022-0229 / GHSA-cjjc-xp8v-855w","Warn: Project is vulnerable to: GO-2020-0012 / GHSA-ffhg-7mh4-33c4","Warn: Project is vulnerable to: GO-2021-0227 / GHSA-3vm4-22fp-5rfm","Warn: Project is vulnerable to: GO-2022-0968 / GHSA-gwc9-m7rh-j2ww","Warn: Project is vulnerable to: GO-2021-0356 / GHSA-8c26-wmh5-6g9v","Warn: Project is vulnerable to: GO-2024-2961","Warn: Project is vulnerable to: GO-2023-2402 / GHSA-45x7-px36-x8w8","Warn: Project is vulnerable to: GO-2024-3321 / GHSA-v778-237x-gjrc","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77","Warn: Project is vulnerable to: GO-2022-0197 / GHSA-4r78-hx75-jjj2 / GHSA-mv93-wvcp-7m7r","Warn: Project is vulnerable to: GO-2020-0014 / GHSA-vfw5-hrgq-h5wf","Warn: Project is vulnerable to: GO-2022-0536 / GHSA-39qc-96h7-956f / GHSA-hgr8-6h9x-f7q9","Warn: Project is vulnerable to: GO-2022-0236 / GHSA-h86h-8ppg-mxmh","Warn: Project is vulnerable to: GO-2021-0238 / GHSA-83g2-8m93-v3w7","Warn: Project is vulnerable to: GO-2022-0288","Warn: Project is vulnerable to: GO-2022-0969 / GHSA-69cg-p879-7622","Warn: Project is vulnerable to: GO-2022-1144 / GHSA-xrjj-mj9h-534m","Warn: Project is vulnerable to: GO-2023-1571 / GHSA-vvpx-j8f3-3w6h","Warn: Project is vulnerable to: GO-2023-1988 / GHSA-2wrh-6pvc-2jm9","Warn: Project is vulnerable to: GO-2023-2102 / GHSA-4374-p667-p6c8","Warn: Project is vulnerable to: GHSA-qppj-fm5r-hxr3","Warn: Project is vulnerable to: GO-2024-2687 / GHSA-4v7x-pqxf-cx7m","Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw","Warn: Project is vulnerable to: GO-2022-0493 / GHSA-p782-xgp4-8hr8","Warn: Project is vulnerable to: GO-2021-0061 / GHSA-r88r-gmrh-7j83","Warn: Project is vulnerable to: GO-2022-0956 / GHSA-6q6q-88xp-6f2r","Warn: Project is vulnerable to: GO-2020-0036 / GHSA-wxc4-f4m6-wwqv"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T10:23:37.628Z","repository_id":56284280,"created_at":"2025-08-19T10:23:37.628Z","updated_at":"2025-08-19T10:23:37.628Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281397299,"owners_count":26493908,"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","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bip","bitcoin","bitcoins","golang","schnorr","schnorr-signatures"],"created_at":"2024-08-03T12:00:42.781Z","updated_at":"2025-10-28T20:32:24.147Z","avatar_url":"https://github.com/hbakhtiyor.png","language":"Go","funding_links":[],"categories":["Bitcoin"],"sub_categories":[],"readme":"[![GoDoc](https://godoc.org/github.com/hbakhtiyor/schnorr?status.svg)](https://godoc.org/github.com/hbakhtiyor/schnorr) [![Build Status](https://travis-ci.com/hbakhtiyor/schnorr.svg?branch=master)](https://travis-ci.com/hbakhtiyor/schnorr) [![Go Report Card](https://goreportcard.com/badge/github.com/hbakhtiyor/schnorr)](https://goreportcard.com/report/github.com/hbakhtiyor/schnorr) [![License](https://badges.fyi/github/license/hbakhtiyor/schnorr)](https://github.com/hbakhtiyor/schnorr/blob/master/LICENSE) [![Latest tag](https://badges.fyi/github/latest-tag/hbakhtiyor/schnorr)](https://github.com/hbakhtiyor/schnorr/releases)\n\nGo implementation of the Schnorr BIP\n=================\n\nThis is a Go implementation of the standard 64-byte Schnorr signature\nscheme over the elliptic curve *secp256k1*.\n\nThe code is based upon the\n[initial proposal of Pieter Wuille](https://github.com/sipa/bips/blob/bip-schnorr/bip-schnorr.mediawiki)\nwhen it didn't have a BIP number assigned yet.\n\nThe current version passes all test vectors provided\n[here](https://raw.githubusercontent.com/sipa/bips/bip-schnorr/bip-schnorr/test-vectors.csv).\n**But the author does not give any guarantees that the algorithm is implemented\ncorrectly for every edge case!**\n\n## Table of Contents\n\n* [Usage](#usage)\n* [API](#api)\n    * [Sign(privateKey *big.Int, message [32]byte) ([64]byte, error)](#signprivatekey-bigint-message-32byte-64byte-error)\n        * [Arguments](#arguments)\n        * [Returns](#returns)\n        * [Examples](#examples)\n    * [Verify(publicKey [33]byte, message [32]byte, signature [64]byte) (bool, error)](#verifypublickey-33byte-message-32byte-signature-64byte-bool-error)\n        * [Arguments](#arguments-1)\n        * [Returns](#returns-1)\n        * [Examples](#examples-1)\n    * [BatchVerify(publicKeys [][33]byte, messages [][32]byte, signatures [][64]byte) (bool, error)](#batchverifypublickeys-33byte-messages-32byte-signatures-64byte-bool-error)\n        * [Arguments](#arguments-2)\n        * [Returns](#returns-2)\n        * [Examples](#examples-2)\n    * [AggregateSignatures(privateKeys []*big.Int, message [32]byte) ([64]byte, error)](#aggregatesignaturesprivatekeys-bigint-message-32byte-64byte-error)\n        * [Arguments](#arguments-3)\n        * [Returns](#returns-3)\n        * [Examples](#examples-3)\n* [Benchmark](#benchmark)\n   * [Hardware used](#hardware-used)\n   * [Version](#version)\n* [Credit](#credit)\n\n\n## Usage\nInstall using:\n\n```shell\ngo get -u github.com/hbakhtiyor/schnorr\n```\n\nIn your code:\n\n```go\nimport \"github.com/hbakhtiyor/schnorr\"\n\nsignature, err := schnorr.Sign(privateKey, message)\n\nresult, err := schnorr.Verify(publicKey, message, signature)\n\nresult, err := schnorr.BatchVerify(publicKeys, messages, signatures)\n\nsignature, err := schnorr.AggregateSignatures(privateKeys, message)\n```\n## API\n\nRequiring the module gives an object with four methods:\n\n### Sign(privateKey *big.Int, message [32]byte) ([64]byte, error)\n\nSign a 32-byte message with the private key, returning a 64-byte signature. Read [more](https://github.com/sipa/bips/blob/bip-schnorr/bip-schnorr.mediawiki#signing)\n\n##### Arguments\n\n1. privateKey (*big.Int): The integer secret key in the range 1..n-1.\n2. message ([32]byte): The 32-byte array message.\n  \n##### Returns\n\n([64]byte, error): A 64-byte array signature. An error if signing fails.\n\n##### Examples\n\n```go\nvar message [32]byte\n\nprivateKey, _ := new(big.Int).SetString(\"B7E151628AED2A6ABF7158809CF4F3C762E7160F38B4DA56A784D9045190CFEF\", 16)\nmsg, _ := hex.DecodeString(\"243F6A8885A308D313198A2E03707344A4093822299F31D0082EFA98EC4E6C89\")\ncopy(message[:], msg)\n\nsignature, err := schnorr.Sign(privateKey, message)\nif err != nil {\n  fmt.Printf(\"The signing is failed: %v\\n\", err)\n}\nfmt.Printf(\"The signature is: %x\\n\", signature)\n```\n\n### Verify(publicKey [33]byte, message [32]byte, signature [64]byte) (bool, error)\n\nVerify a 64-byte signature of a 32-byte message against the public key. Read [more](https://github.com/sipa/bips/blob/bip-schnorr/bip-schnorr.mediawiki#verification)\n\n##### Arguments\n\n1. publicKey ([33]byte): The 33-byte array public key.\n2. message ([32]byte): The 32-byte array message.\n3. signature ([64]byte): The 64-byte array signature.\n\n##### Returns\n\n(bool, error): True if signature is valid, An error if verification fails.\n\n##### Examples\n\n```go\nvar (\n  publicKey [33]byte\n  message   [32]byte\n  signature [64]byte\n)\n\npk, _ := hex.DecodeString(\"02DFF1D77F2A671C5F36183726DB2341BE58FEAE1DA2DECED843240F7B502BA659\")\ncopy(publicKey[:], pk)\nmsg, _ := hex.DecodeString(\"243F6A8885A308D313198A2E03707344A4093822299F31D0082EFA98EC4E6C89\")\ncopy(message[:], msg)\nsig, _ := hex.DecodeString(\"2A298DACAE57395A15D0795DDBFD1DCB564DA82B0F269BC70A74F8220429BA1D1E51A22CCEC35599B8F266912281F8365FFC2D035A230434A1A64DC59F7013FD\")\ncopy(signature[:], sig)\n\nif result, err := schnorr.Verify(publicKey, message, signature); err != nil {\n  fmt.Printf(\"The signature verification failed: %v\\n\", err)\n} else if result {\n  fmt.Println(\"The signature is valid.\")\n}\n```\n\n### BatchVerify(publicKeys [][33]byte, messages [][32]byte, signatures [][64]byte) (bool, error)\n\nVerify a list of 64-byte signatures of a 32-byte messages against the public keys. Read [more](https://github.com/sipa/bips/blob/bip-schnorr/bip-schnorr.mediawiki#batch-verification)\n\n##### Arguments\n\n1. publicKeys ([][33]byte): The list of 33-byte array public keys.\n2. messages ([][32]byte): The list of 32-byte array messages.\n3. signatures ([][64]byte): The list of 64-byte array signatures.\n\n##### Returns\n\n(bool, error): True if all signatures are valid, An error if one verification fails.\n\n##### Examples\n\n```go\nvar (\n  publicKey  [33]byte\n  message    [32]byte\n  signature  [64]byte\n  publicKeys [][33]byte\n  messages   [][32]byte\n  signatures [][64]byte\n)\n\npk, _ := hex.DecodeString(\"02DFF1D77F2A671C5F36183726DB2341BE58FEAE1DA2DECED843240F7B502BA659\")\ncopy(publicKey[:], pk)\npublicKeys = append(publicKeys, publicKey)\npk, _ = hex.DecodeString(\"03FAC2114C2FBB091527EB7C64ECB11F8021CB45E8E7809D3C0938E4B8C0E5F84B\")\ncopy(publicKey[:], pk)\npublicKeys = append(publicKeys, publicKey)\npk, _ = hex.DecodeString(\"026D7F1D87AB3BBC8BC01F95D9AECE1E659D6E33C880F8EFA65FACF83E698BBBF7\")\ncopy(publicKey[:], pk)\npublicKeys = append(publicKeys, publicKey)\nmsg, _ := hex.DecodeString(\"243F6A8885A308D313198A2E03707344A4093822299F31D0082EFA98EC4E6C89\")\ncopy(message[:], msg)\nmessages = append(messages, message)\nmsg, _ = hex.DecodeString(\"5E2D58D8B3BCDF1ABADEC7829054F90DDA9805AAB56C77333024B9D0A508B75C\")\ncopy(message[:], msg)\nmessages = append(messages, message)\nmsg, _ = hex.DecodeString(\"B2F0CD8ECB23C1710903F872C31B0FD37E15224AF457722A87C5E0C7F50FFFB3\")\ncopy(message[:], msg)\nmessages = append(messages, message)\nsig, _ := hex.DecodeString(\"2A298DACAE57395A15D0795DDBFD1DCB564DA82B0F269BC70A74F8220429BA1D1E51A22CCEC35599B8F266912281F8365FFC2D035A230434A1A64DC59F7013FD\")\ncopy(signature[:], sig)\nsignatures = append(signatures, signature)\nsig, _ = hex.DecodeString(\"00DA9B08172A9B6F0466A2DEFD817F2D7AB437E0D253CB5395A963866B3574BE00880371D01766935B92D2AB4CD5C8A2A5837EC57FED7660773A05F0DE142380\")\ncopy(signature[:], sig)\nsignatures = append(signatures, signature)\nsig, _ = hex.DecodeString(\"68CA1CC46F291A385E7C255562068357F964532300BEADFFB72DD93668C0C1CAC8D26132EB3200B86D66DE9C661A464C6B2293BB9A9F5B966E53CA736C7E504F\")\ncopy(signature[:], sig)\nsignatures = append(signatures, signature)\n\nif result, err := schnorr.BatchVerify(publicKeys, messages, signatures); err != nil {\n  fmt.Printf(\"The signature verification failed: %v\\n\", err)\n} else if result {\n  fmt.Println(\"The signature is valid.\")\n}\n```\n\n### AggregateSignatures(privateKeys []*big.Int, message [32]byte) ([64]byte, error)\n\nAggregate multiple signatures of different private keys over the same message into a single 64-byte signature.\n\n##### Arguments\n\n1. privateKeys ([]*big.Int): The list of integer secret keys in the range 1..n-1.\n2. message ([32]byte): The list of 32-byte array messages.\n\n##### Returns\n\n(bool, error): True if all signatures are valid, An error if one verification fails.\n([64]byte, error): A 64-byte array signature. An error if signing fails.\n\n##### Examples\n\n```go\nvar (\n  publicKey [33]byte\n  message   [32]byte\n)\n\nprivateKey1, _ := new(big.Int).SetString(\"B7E151628AED2A6ABF7158809CF4F3C762E7160F38B4DA56A784D9045190CFEF\", 16)\nprivateKey2, _ := new(big.Int).SetString(\"C90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B14E5C7\", 16)\nmsg, _ := hex.DecodeString(\"243F6A8885A308D313198A2E03707344A4093822299F31D0082EFA98EC4E6C89\")\ncopy(message[:], msg)\n\nprivateKeys := []*big.Int{privateKey1, privateKey2}\nsignature, _ := schnorr.AggregateSignatures(privateKeys, message)\n\n// verifying an aggregated signature\npk, _ := hex.DecodeString(\"02DFF1D77F2A671C5F36183726DB2341BE58FEAE1DA2DECED843240F7B502BA659\")\ncopy(publicKey[:], pk)\nP1x, P1y := schnorr.Unmarshal(Curve, publicKey[:])\n\npk, _ = hex.DecodeString(\"03FAC2114C2FBB091527EB7C64ECB11F8021CB45E8E7809D3C0938E4B8C0E5F84B\")\ncopy(publicKey[:], pk)\nP2x, P2y := schnorr.Unmarshal(Curve, publicKey[:])\nPx, Py := Curve.Add(P1x, P1y, P2x, P2y)\n\ncopy(publicKey[:], schnorr.Marshal(Curve, Px, Py))\n\nif result, err := schnorr.Verify(publicKey, message, signature); err != nil {\n  fmt.Printf(\"The signature verification failed: %v\\n\", err)\n} else if result {\n  fmt.Println(\"The signature is valid.\")\n}\n```\n\n## Benchmarks\n\n```\nBenchmarkSign-4                  \t    2000\t   1015337 ns/op\t   45812 B/op\t     814 allocs/op\nBenchmarkVerify-4                \t     200\t   8555659 ns/op\t  217884 B/op\t    3622 allocs/op\nBenchmarkBatchVerify-4           \t     100\t  12114966 ns/op\t  148343 B/op\t    2220 allocs/op\nBenchmarkAggregateSignatures-4   \t    2000\t    593665 ns/op\t   21981 B/op\t     400 allocs/op\n```\n\n##### Hardware used\n\n* Intel® Core™ i3-2310M CPU @ 2.10GHz × 4\n* 4Gb RAM\n\n##### Versions\n\n* Go 1.11.2\n* Ubuntu 18.04.01 LTS x86_64 OS\n* 4.15.0-39-generic kernel\n\n## Credits\n\n* https://github.com/guggero/bip-schnorr\n* https://github.com/sipa/bips/tree/bip-schnorr/bip-schnorr\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhbakhtiyor%2Fschnorr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhbakhtiyor%2Fschnorr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhbakhtiyor%2Fschnorr/lists"}