{"id":21270064,"url":"https://github.com/kornrunner/php-secp256k1","last_synced_at":"2025-05-07T19:09:39.396Z","repository":{"id":57008590,"uuid":"136949883","full_name":"kornrunner/php-secp256k1","owner":"kornrunner","description":"Pure PHP secp256k1","archived":false,"fork":false,"pushed_at":"2024-05-30T14:24:18.000Z","size":219,"stargazers_count":33,"open_issues_count":5,"forks_count":21,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-07T19:07:14.080Z","etag":null,"topics":["ecc","elliptic-curves","secp256k1"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/kornrunner.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-06-11T16:04:47.000Z","updated_at":"2025-04-26T09:01:58.000Z","dependencies_parsed_at":"2025-05-07T19:07:18.611Z","dependency_job_id":null,"html_url":"https://github.com/kornrunner/php-secp256k1","commit_stats":{"total_commits":139,"total_committers":2,"mean_commits":69.5,"dds":0.03597122302158273,"last_synced_commit":"39bd93380f5289cd3c2498cc6d4a49151b93649d"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kornrunner%2Fphp-secp256k1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kornrunner%2Fphp-secp256k1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kornrunner%2Fphp-secp256k1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kornrunner%2Fphp-secp256k1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kornrunner","download_url":"https://codeload.github.com/kornrunner/php-secp256k1/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252940935,"owners_count":21828769,"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":["ecc","elliptic-curves","secp256k1"],"created_at":"2024-11-21T08:15:00.379Z","updated_at":"2025-05-07T19:09:39.279Z","avatar_url":"https://github.com/kornrunner.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# php-secp256k1 [![Tests](https://github.com/kornrunner/php-secp256k1/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/kornrunner/php-secp256k1/actions/workflows/tests.yml) [![Coverage Status](https://coveralls.io/repos/github/kornrunner/php-secp256k1/badge.svg?branch=master)](https://coveralls.io/github/kornrunner/php-secp256k1?branch=master) [![Latest Stable Version](https://poser.pugx.org/kornrunner/secp256k1/v/stable)](https://packagist.org/packages/kornrunner/secp256k1)\n\n```lang=bash\n$ composer require kornrunner/secp256k1\n```\n\n## Usage\n\nSign a message:\n\n```php\n\u003c?php\n\nrequire_once 'vendor/autoload.php';\n\nuse kornrunner\\Secp256k1;\nuse kornrunner\\Serializer\\HexSignatureSerializer;\n\n$secp256k1 = new Secp256k1();\n\n// return signature contains r, s and recovery param (v).\n// message and privateKey are hex strings\n$signature = $secp256k1-\u003esign($message, $privateKey);\n\n// get r\n$r = $signature-\u003egetR();\n\n// get s\n$s = $signature-\u003egetS();\n\n// get recovery param\n$v = $signature-\u003egetRecoveryParam();\n\n// encode to hex\n$serializer = new HexSignatureSerializer();\n$signatureString = $serializer-\u003eserialize($signature);\n\n// or you can call toHex\n$signatureString = $signature-\u003etoHex();\n```\n\nVerify a message:\n\n```php\n\u003c?php\n\nrequire_once 'vendor/autoload.php';\n\nuse kornrunner\\Secp256k1;\n\n$secp256k1 = new Secp256k1();\n\n// signature was created by sign method\n// hash and publicKey are hex strings\n$isVerified = $secp256k1-\u003everify($hash, $signature, $publicKey);\n```\n\n## License\n\nMIT\n\n## Crypto\n\n\n[![Ethereum](https://user-images.githubusercontent.com/725986/61891022-0d0c7f00-af09-11e9-829f-096c039bbbfa.png) 0x9c7b7a00972121fb843af7af74526d7eb585b171][Ethereum]\n\n[Ethereum]: https://etherscan.io/address/0x9c7b7a00972121fb843af7af74526d7eb585b171 \"Donate with Ethereum\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkornrunner%2Fphp-secp256k1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkornrunner%2Fphp-secp256k1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkornrunner%2Fphp-secp256k1/lists"}