{"id":19060276,"url":"https://github.com/4l3x777/ecdsa","last_synced_at":"2025-08-26T12:19:41.741Z","repository":{"id":210219034,"uuid":"726033576","full_name":"4l3x777/ECDSA","owner":"4l3x777","description":"Elliptic Curve Digital Sign Algorithm [PrimeField]","archived":false,"fork":false,"pushed_at":"2023-12-01T12:11:46.000Z","size":7131,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-15T19:11:32.325Z","etag":null,"topics":["big-numbers","cryptography","diffie-hellman","digital-signature","elliptic-curve-cryptography","nist","prime-fields"],"latest_commit_sha":null,"homepage":"","language":"C++","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/4l3x777.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}},"created_at":"2023-12-01T11:48:40.000Z","updated_at":"2023-12-13T11:26:22.000Z","dependencies_parsed_at":"2023-12-01T13:57:41.185Z","dependency_job_id":null,"html_url":"https://github.com/4l3x777/ECDSA","commit_stats":null,"previous_names":["4l3x777/ecdsa"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/4l3x777/ECDSA","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4l3x777%2FECDSA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4l3x777%2FECDSA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4l3x777%2FECDSA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4l3x777%2FECDSA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/4l3x777","download_url":"https://codeload.github.com/4l3x777/ECDSA/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4l3x777%2FECDSA/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272219673,"owners_count":24894474,"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-08-26T02:00:07.904Z","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":["big-numbers","cryptography","diffie-hellman","digital-signature","elliptic-curve-cryptography","nist","prime-fields"],"created_at":"2024-11-09T00:14:14.538Z","updated_at":"2025-08-26T12:19:41.718Z","avatar_url":"https://github.com/4l3x777.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ECDSA (```Elliptic Curve Digital Sign Algorithm [PrimeField]```)\n\n## Thanks for projects\n\n+ ```ttmath``` Bignum C++ library https://www.ttmath.org/\n+ ```googletest``` GoogleTest - Google Testing and Mocking Framework https://github.com/google/googletest\n+ ```thread_pool``` ThreadPool https://github.com/progschj/ThreadPool\n\n\n## How to use\n\n### Windows\n\n+ copy ```includes``` folder to your project\n+ add ```ecdsa.h``` to your source file\n+ link ```crypto_pseudo_random_generator.lib``` to your project\n+ link ```sha512.lib``` to your project\n+ link ```aes.lib``` to your project\n+ link ```ecdsa_primefield.lib``` to your project\n+ link ```thread_pool.lib``` to your project\n\n### Linux\n\n+ copy ```includes``` folder to your project\n+ add ```ecdsa.h``` to your source file\n+ link ```libcrypto_pseudo_random_generator.a``` to your project\n+ link ```libsha512.a``` to your project\n+ link ```libaes.a``` to your project\n+ link ```libecdsa_primefield.a``` to your project\n+ link ```libthread_pool.a``` to your project\n\n## Examples\n\n+ Example Use NIST Standart P384\n\n```C++\n auto NIST = std::make_shared\u003cECDSA_NIST_384\u003e();\n std::string SecretKey(\"1234567890098765432112345678900987654321\");\n std::string Message(\"Hello Alice! My name is Bob!\");\n // CreateKeyCheckDigitalSign\n std::pair\u003cstd::string, std::string\u003e KeyCheckDigitalSign = NIST-\u003eCreateKeyCheckDigitalSign(SecretKey);\n // CreateDigitalSign\n std::pair\u003cstd::string, std::string\u003e DigitalSign = NIST-\u003eCreateDigitalSign(SecretKey, Message);\n // Message += \"?\"; //Change Message  (Attack to integrity)\n // CheckDigitalSign\n bool result = NIST-\u003eCheckDigitalSign(DigitalSign, Message, KeyCheckDigitalSign);\n```\n\n+ Example Use GOST Standart P512\n\n```C++\n auto GOST = std::make_shared\u003cECDSA_GOST_512\u003e();\n std::string SecretKey(\"1234567890098765432112345678900987654321\");\n std::string Message(\"Hello Alice! My name is Bob!\");\n // CreateKeyCheckDigitalSign\n std::pair\u003cstd::string, std::string\u003e KeyCheckDigitalSign = GOST-\u003eCreateKeyCheckDigitalSign(SecretKey);\n // CreateDigitalSign\n std::pair\u003cstd::string, std::string\u003e DigitalSign = GOST-\u003eCreateDigitalSign(SecretKey, Message);\n // Message += \"?\"; //Change Message  (Attack to integrity)\n // CheckDigitalSign\n bool result = GOST-\u003eCheckDigitalSign(DigitalSign, Message, KeyCheckDigitalSign);\n```\n\n+ Example ECDHE (```Elliptic Curve Diffie-Hellman```)\n\n```C++\n auto NIST = std::make_shared\u003cECDSA_NIST_521\u003e();\n // secret parameter UserA\n bigint dA;\n // secret parameter UserB\n bigint dB;\n //Generate Pseudo Random Number\n CryptoPseudoRandomGenerator generator;\n auto pseudo_random_number = generator.generate(1024);\n //Get Secret Key for Elliptic Curve UserA\n dA.FromString(NIST-\u003ehexStr(pseudo_random_number), 16);\n //Get Public Elliptic Curve Point UserA\n auto QA = NIST-\u003eMultiplyOnBasePoint(dA);\n //Generate Pseudo Random Number\n pseudo_random_number = generator.generate(1024);\n //Get Secret Key for Elliptic Curve UserB\n dB.FromString(NIST-\u003ehexStr(pseudo_random_number), 16);\n //Get Public Elliptic Curve Point UserB\n auto QB = NIST-\u003eMultiplyOnBasePoint(dB);\n //Calculate Common Session Key for UserA\n ecpoint FriendQB(NIST);\n FriendQB.setCoordinate(\n  std::string(QB.first),\n  std::string(QB.second)\n );\n ecpoint SecretPointA = FriendQB*dA;\n //Calculate Common Session Key for UserB\n ecpoint FriendQA(NIST);\n FriendQA.setCoordinate(\n  std::string(QA.first),\n  std::string(QA.second)\n );\n ecpoint SecretPointB = FriendQA*dB;\n // check equals shared secret\n auto result = SecretPointB.getXCoordinate() == SecretPointA.getXCoordinate() ? true : false;\n```\n\n## Tests coverage\n\n+ aes\n+ crypto_pseudo_random_generator\n+ ecdsa (GOST_256, GOST_512, NIST_192 ... curves)\n+ ecdsa_primefield\n+ sha512\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4l3x777%2Fecdsa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F4l3x777%2Fecdsa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4l3x777%2Fecdsa/lists"}