{"id":19915557,"url":"https://github.com/demining/endomorphism-secp256k1","last_synced_at":"2026-02-27T14:06:46.998Z","repository":{"id":144620930,"uuid":"529333802","full_name":"demining/Endomorphism-Secp256k1","owner":"demining","description":"Speed ​​up secp256k1 with endomorphism","archived":false,"fork":false,"pushed_at":"2022-12-07T00:53:52.000Z","size":1482,"stargazers_count":14,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-18T02:21:16.553Z","etag":null,"topics":["attack","bitcoin","bitcoin-wallet","blockchain","btc","cryptocurrencies","cryptography","ecdsa","ecdsa-cryptography","ecdsa-signature","elliptic-curves","elliptic-curves-cryptography","privatekey","secp256k1","vulnerabilities","vulnerability"],"latest_commit_sha":null,"homepage":"https://cryptodeeptech.ru/endomorphism","language":"HTML","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/demining.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-26T16:39:46.000Z","updated_at":"2025-06-24T11:38:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"9e40c29e-5805-47a2-8f4c-39773184e8f2","html_url":"https://github.com/demining/Endomorphism-Secp256k1","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/demining/Endomorphism-Secp256k1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/demining%2FEndomorphism-Secp256k1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/demining%2FEndomorphism-Secp256k1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/demining%2FEndomorphism-Secp256k1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/demining%2FEndomorphism-Secp256k1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/demining","download_url":"https://codeload.github.com/demining/Endomorphism-Secp256k1/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/demining%2FEndomorphism-Secp256k1/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29898978,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T12:09:13.686Z","status":"ssl_error","status_checked_at":"2026-02-27T12:09:13.282Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["attack","bitcoin","bitcoin-wallet","blockchain","btc","cryptocurrencies","cryptography","ecdsa","ecdsa-cryptography","ecdsa-signature","elliptic-curves","elliptic-curves-cryptography","privatekey","secp256k1","vulnerabilities","vulnerability"],"created_at":"2024-11-12T21:40:58.386Z","updated_at":"2026-02-27T14:06:46.963Z","avatar_url":"https://github.com/demining.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Speed up secp256k1 with endomorphism\n\n\u003cp\u003eIn this article, we will look\u0026nbsp;\u0026nbsp;\u003ccode\u003esecp256k1\u003c/code\u003e\u0026nbsp;at the endomorphism acceleration function that helps in optimizing the validation\u0026nbsp;\u0026nbsp;\u003ccode\u003eECDSA\u003c/code\u003e\u0026nbsp;for the Bitcoin cryptocurrency, but first, a little history.\u003c/p\u003e\n\u003cblockquote class=\"wp-block-quote\"\u003e\u003cp\u003e\u003ccode\u003e12 января 2009 года\u003c/code\u003e\u0026nbsp;\u003ca href=\"https://ru.wikipedia.org/wiki/%D0%A1%D0%B0%D1%82%D0%BE%D1%81%D0%B8_%D0%9D%D0%B0%D0%BA%D0%B0%D0%BC%D0%BE%D1%82%D0%BE\" target=\"_blank\" rel=\"noreferrer noopener\"\u003eSatoshi Nakamoto sent\u0026nbsp;\u003c/a\u003e\u003ca href=\"https://ru.wikipedia.org/wiki/%D0%93%D0%B0%D1%80%D0%BE%D0%BB%D1%8C%D0%B4_%D0%A2%D0%BE%D0%BC%D0%B0%D1%81_%D0%A4%D0%B8%D0%BD%D0%BD%D0%B8_II\" target=\"_blank\" rel=\"noreferrer noopener\"\u003eHal Finney\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;in the earliest bitcoin transactions\u0026nbsp;\u0026nbsp;\u003ccode\u003e10 BTC\u003c/code\u003e.\u003c/p\u003e\u003c/blockquote\u003e\n\u003cp\u003eThat Satoshi Nakamoto chose Hal as the first recipient of Bitcoins is not surprising.\u0026nbsp;Satoshi had great respect for Hal, who established himself as one of the world’s brightest programmers and cryptographers by developing the\u0026nbsp;\u0026nbsp;\u003ca href=\"https://ru.wikipedia.org/wiki/PGP\" target=\"_blank\" rel=\"noreferrer noopener\"\u003ePGP\u003c/a\u003e\u0026nbsp;encryption system .\u0026nbsp;Hal also laid an important foundation for the reusable proof-of-work that Satoshi would use in the development of Bitcoin.\u003c/p\u003e\n\u003cp\u003eBeing one of the best cryptographers in the world, Hal realized that Bitcoin was a huge breakthrough immediately after he stumbled upon it.\u003c/p\u003e\n\u003cp\u003eBack in\u0026nbsp; it,\u0026nbsp;\u003ccode\u003e2008 году\u003c/code\u003e\u0026nbsp;he called Bitcoin\u0026nbsp;\u0026nbsp;\u003cstrong\u003e\u003cem\u003e«a very promising idea\u003c/em\u003e\u003c/strong\u003e\u0026nbsp;. »\u003c/p\u003e\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg src=\"./Speed __up secp256k1 with endomorphism - «CRYPTO DEEP TECH»_files/e90c1948ecdd67427ca6fd6eb0fe7b24.jpg\" alt=\"Speed ​​up secp256k1 with endomorphism\"\u003e\u003c/figure\u003e\n\u003cblockquote class=\"wp-block-quote\"\u003e\u003cp\u003eThis\u0026nbsp;\u0026nbsp;\u003cem\u003etweet\u003c/em\u003e\u0026nbsp;, posted by\u0026nbsp;\u0026nbsp;\u003ccode\u003e11 января 2009 года\u003c/code\u003e, is proof enough that Hal\u0026nbsp;\u0026nbsp;\u003cem\u003e\u003cu\u003epredicted the success of Bitcoin\u003c/u\u003e\u003c/em\u003e\u0026nbsp;\u0026nbsp;before many even knew what it was.\u003c/p\u003e\u003c/blockquote\u003e\n\u003cp\u003eTwo years have passed and\u0026nbsp;\u0026nbsp;\u003ccode\u003e2011 году\u003c/code\u003e\u0026nbsp;Hal Finney as a developer and Bitcoin enthusiast wrote on the\u0026nbsp;\u0026nbsp;\u003ca href=\"https://bitcointalk.org/index.php?topic=3238.msg45565#msg45565\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003eBitcointalk\u003c/strong\u003e\u003c/a\u003e\u0026nbsp;forum that\u0026nbsp;\u0026nbsp;\u003cem\u003e\u003cu\u003ethe secp256k1 endomorphism function can be used to speed up ECDSA signature verification\u003c/u\u003e\u003c/em\u003e\u003c/p\u003e\n\u003ch2\u003eLAMBDA and BETA are the values ​​on the secp256k1 curve, where:\u003c/h2\u003e\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg src=\"./Speed __up secp256k1 with endomorphism - «CRYPTO DEEP TECH»_files/9a4ce63afa2c39ded280bea637d2ba70.svg\" alt=\"λ^3 (mod n) = 1  \"\u003e\u003c/figure\u003e\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg src=\"./Speed __up secp256k1 with endomorphism - «CRYPTO DEEP TECH»_files/df44d75ceb126764e40606ad336f26e3.svg\" alt=\"β^3(modp)=1\"\u003e\u003c/figure\u003e\n\u003ch3\u003esecp256k1 uses the following prime number for its x and y coordinates:\u003c/h3\u003e\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003ep = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc2f\u003c/code\u003e\u003c/pre\u003e\n\u003ch3\u003eand the order of the curve:\u003c/h3\u003e\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003en = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThe first step is to calculate the values ​​of\u0026nbsp;\u0026nbsp;\u003ccode\u003eLAMBDA\u003c/code\u003e\u0026nbsp;and\u0026nbsp;\u0026nbsp;\u003ccode\u003eBETA\u003c/code\u003e, such that for any point on the curve\u0026nbsp;\u0026nbsp;\u003ccode\u003eQ = (x, y)\u003c/code\u003e:\u003c/p\u003e\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eLAMBDA * Q = (BETA*х mod р, у)\u003c/code\u003e\u003c/pre\u003e\n\u003cblockquote class=\"wp-block-quote\"\u003e\u003cp\u003eThis is the so-called effectively computable\u0026nbsp;\u0026nbsp;\u003cem\u003e\u003cu\u003eendomorphism\u003c/u\u003e\u003c/em\u003e\u0026nbsp;, and it means that you can multiply any point on the curve\u0026nbsp;\u0026nbsp;\u003ccode\u003esecp256k1\u003c/code\u003e\u0026nbsp;by this special value\u0026nbsp; very quickly by\u0026nbsp;\u003ccode\u003eLAMBDA\u003c/code\u003edoing a single multiplication\u0026nbsp;\u0026nbsp;\u003ccode\u003emod p\u003c/code\u003e.\u003c/p\u003e\u003c/blockquote\u003e\n\u003ch2\u003eThe meaning found and published by Hal Finney:\u003c/h2\u003e\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eLAMBDA = 0x5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72\n\nBETA = 0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eGiven that we can quickly multiply, the\u0026nbsp;\u0026nbsp;\u003ccode\u003eLAMBDA,\u003c/code\u003e\u0026nbsp;trick is to calculate\u0026nbsp;\u0026nbsp;\u003ccode\u003ekQ\u003c/code\u003e\u003cem\u003e.\u0026nbsp;\u003c/em\u003eLet’s use the calculation first\u0026nbsp;.\u0026nbsp;Then\u0026nbsp;\u0026nbsp;\u0026nbsp;you need to break it into two parts\u0026nbsp;\u0026nbsp;\u0026nbsp;and\u0026nbsp;\u0026nbsp;, each about half the width of\u0026nbsp;\u0026nbsp;, so that:\u003cem\u003e\u0026nbsp;\u003c/em\u003e\u003ccode\u003eQ' = lambdaQ\u003c/code\u003e\u003ccode\u003ek\u003c/code\u003e\u003ccode\u003ek1\u003c/code\u003e\u003ccode\u003ek2\u003c/code\u003e\u003ccode\u003en\u003c/code\u003e\u003c/p\u003e\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003ek = k1 + k2*LAMBDA  mod  n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003ethen\u003c/p\u003e\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003ek*Q = (k1 + k2*LAMBDA)*Q = k1*Q + k2*LAMBDA*Q = k1*Q + k2*Q'\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThis last expression can be computed efficiently using the double multiplication algorithm, and since\u0026nbsp;\u0026nbsp;\u003ccode\u003ek1\u003c/code\u003e\u0026nbsp;and\u0026nbsp;\u0026nbsp;\u003ccode\u003ek2\u003c/code\u003e\u0026nbsp;are half the length, we get a speedup.\u003c/p\u003e\n\u003cp\u003eThe missing part splits\u0026nbsp;\u0026nbsp;\u003ccode\u003ek\u003c/code\u003e\u0026nbsp;into\u0026nbsp;\u0026nbsp;\u003ccode\u003ek1\u003c/code\u003e\u0026nbsp;and\u0026nbsp;\u0026nbsp;\u003ccode\u003ek2\u003c/code\u003e.\u0026nbsp;The following\u0026nbsp;\u0026nbsp;\u003cem\u003e\u003cu\u003e4 values\u003c/u\u003e\u003c/em\u003e\u0026nbsp;​​are used for this :\u003c/p\u003e\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eа1 = 0x3086d221a7d46bcde86c90e49284eb15\nb1 = -0xe4437ed6010e88286f547fa90abfe4c3\nа2 = 0x114ca50f7a8e2f3f657c1108d9d44cfd8\nb2 = 0x3086d221a7d46bcde86c90e49284eb15\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003e\u003cem\u003e(it’s ok that a1 = b2)\u003c/em\u003e\u003c/p\u003e\n\u003ch4\u003eWe use them as follows to divide k:\u003c/h4\u003e\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003ec1 = RoundToNearestInteger(b2*k/n)\nc2 = RoundToNearestInteger(-b1*k/n)\n\nk1 = k - c1*a1 - c2*a2\nk2 = -c1*b1 - c2*b2\u003c/code\u003e\u003c/pre\u003e\n\u003cblockquote class=\"wp-block-quote\"\u003e\u003cp\u003eWe end up with roughly\u0026nbsp;\u0026nbsp;\u003ccode\u003e20%-е\u003c/code\u003e\u0026nbsp;a speedup due to the halving of the number of doublings.\u003cbr\u003e\nThis gives many algorithms that can be grouped on multiple points the performance they would have with twice the number of public keys.\u003cbr\u003e\n\u003cem\u003eThis speedup at an equivalent level of optimization makes it\u0026nbsp;\u0026nbsp;\u003c/em\u003e\u003ccode\u003esecp256k1\u003c/code\u003e\u003cem\u003e\u0026nbsp;the fastest curve to test out of all the commonly used curves.\u003c/em\u003e\u003c/p\u003e\u003c/blockquote\u003e\n\u003ch3\u003eWe learned about the existence of endomorphism in a more detailed study of the repository from the developer and researcher Jean Luc Pons\u003c/h3\u003e\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003cimg src=\"./Speed __up secp256k1 with endomorphism - «CRYPTO DEEP TECH»_files/53aa4146a4d43ac9279e96b8e403216d.png\" alt=\"Speed ​​up secp256k1 with endomorphism\"\u003e\u003c/figure\u003e\n\u003c/div\u003e\n\u003cp\u003eWe previously published an article:\u0026nbsp;\u0026nbsp;\u003ca href=\"https://cryptodeep.ru/kangaroo/\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003e\u003cem\u003e«Pollard’s Kangaroo find solutions to the discrete logarithm of secp256k1 PRIVATE KEY + NONCES in a known range»\u003c/em\u003e\u003c/strong\u003e\u003c/a\u003e\u003cstrong\u003e\u003cem\u003e\u0026nbsp;\u0026nbsp;,\u0026nbsp;\u003c/em\u003e\u003c/strong\u003e\u0026nbsp;where we used the source code to build\u0026nbsp;\u0026nbsp;\u003ca href=\"https://cryptodeep.ru/kangaroo/\" target=\"_blank\" rel=\"noreferrer noopener\"\u003eKangaroo\u003c/a\u003e\u0026nbsp;\u0026nbsp;by\u0026nbsp;\u0026nbsp;\u003ca href=\"https://cryptodeep.ru/kangaroo/\" target=\"_blank\" rel=\"noreferrer noopener\"\u003eJean Luc Pons\u003c/a\u003e\u0026nbsp;.\u003c/p\u003e\n\u003ch2\u003eBased on accelerated mechanism Jean Luc Pons pointed VanitySearch\u003c/h2\u003e\n\u003cp\u003eOpen\u0026nbsp;\u0026nbsp;\u003ca href=\"https://github.com/JeanLucPons/VanitySearch/blob/c8d48ce5f03f5357c0e87cbdb3e1e93cd50af88b/main.cpp#L255\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003emain.cpp\u003c/strong\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg title=\"main.cpp\" src=\"./Speed __up secp256k1 with endomorphism - «CRYPTO DEEP TECH»_files/605fca301a5eef1f215250562ff4e039.png\" alt=\"main.cpp\"\u003e\u003cfigcaption\u003emain.cpp\u003c/figcaption\u003e\u003c/figure\u003e\n\u003cp\u003eIn lines\u0026nbsp;\u0026nbsp;\u003ca href=\"https://github.com/JeanLucPons/VanitySearch/blob/c8d48ce5f03f5357c0e87cbdb3e1e93cd50af88b/main.cpp#L255\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e255\u003c/a\u003e\u0026nbsp;\u0026nbsp;and\u0026nbsp;\u0026nbsp;\u003ca href=\"https://github.com/JeanLucPons/VanitySearch/blob/c8d48ce5f03f5357c0e87cbdb3e1e93cd50af88b/main.cpp#L256\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e256\u003c/a\u003e\u0026nbsp;\u0026nbsp;we see that Jean Luc Pons applied the elliptic curve acceleration function\u0026nbsp;\u0026nbsp;\u003ccode\u003esecp256k1\u003c/code\u003e\u0026nbsp;using\u0026nbsp;\u0026nbsp;\u003cem\u003e\u003cu\u003eendomorphism\u003c/u\u003e\u003c/em\u003e\u0026nbsp;.\u003c/p\u003e\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003e  lambda.SetBase16(\"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72\");\n  lambda2.SetBase16(\"ac9c52b33fa3cf1f5ad9e3fd77ed9ba4a880b9fc8ec739c2e0cfc810b51283ce\");\u003c/code\u003e\u003c/pre\u003e\n\u003ch2\u003eLet’s move on to the experimental part:\u003c/h2\u003e\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg src=\"./Speed __up secp256k1 with endomorphism - «CRYPTO DEEP TECH»_files/7df255c08ea1fb0e498b76bf4a431873.png\" alt=\"Speed ​​up secp256k1 with endomorphism\"\u003e\u003c/figure\u003e\n\u003cblockquote class=\"wp-block-quote\"\u003e\u003cp\u003eAs we remember from the\u0026nbsp;\u0026nbsp;\u003ca href=\"https://cryptodeep.ru/kangaroo/\" target=\"_blank\" rel=\"noreferrer noopener\"\u003earticle,\u003c/a\u003e\u0026nbsp;\u0026nbsp;we analyzed transactions of Bitcoin Address\u0026nbsp;\u0026nbsp;\u003ca href=\"https://www.blockchain.com/ru/btc/address/14NWDXkQwcGN1Pd9fboL8npVynD5SfyJAE\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003e14NWDXkQwcGN1Pd9fboL8npVynD5SfyJAE\u003c/strong\u003e\u003c/a\u003e\u003cbr\u003e\nfrom the\u0026nbsp;\u0026nbsp;\u003ca href=\"https://bitinfocharts.com/top-100-richest-bitcoin-addresses.html\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003eBitcoin Rich List\u003c/strong\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;for a total of more than\u0026nbsp;\u0026nbsp;\u003ca href=\"https://bitinfocharts.com/top-100-richest-bitcoin-addresses.html\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003e10 million US dollars\u003c/strong\u003e\u003c/a\u003e\u0026nbsp;, take this Bitcoin Address as an example\u003c/p\u003e\u003c/blockquote\u003e\n\u003cp\u003eOpen Google Colab\u0026nbsp;\u0026nbsp;\u003ca href=\"https://github.com/demining/TerminalGoogleColab\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003e[TerminalGoogleColab]\u003c/strong\u003e\u003c/a\u003e\u0026nbsp;in the terminal \u0026nbsp;and use the repository\u0026nbsp;\u0026nbsp;\u003ca href=\"https://github.com/demining/CryptoDeepTools/tree/main/07EndomorphismSecp256k1\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e«07EndomorphismSecp256k1»\u003c/a\u003e\u003c/p\u003e\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003egit clone https://github.com/demining/CryptoDeepTools.git\n\ncd CryptoDeepTools/07EndomorphismSecp256k1/\n\npip3 install base58\u003c/code\u003e\u003c/pre\u003e\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg src=\"./Speed __up secp256k1 with endomorphism - «CRYPTO DEEP TECH»_files/92866f34b1dcfbce80b23fd56a913744.png\" alt=\"Speed ​​up secp256k1 with endomorphism\"\u003e\u003c/figure\u003e\n\u003cp\u003eOpen code\u0026nbsp;\u0026nbsp;\u003ca href=\"https://github.com/demining/CryptoDeepTools/blob/9dfd594126117e07fc51a77a7c613180eb662f18/07EndomorphismSecp256k1/endomorphism.py#L145\" target=\"_blank\" rel=\"noreferrer noopener\"\u003eendomorphism.py\u0026nbsp;\u003c/a\u003e\u0026nbsp;\u003cem\u003eon line\u0026nbsp;\u003c/em\u003e\u0026nbsp;\u003ca href=\"https://github.com/demining/CryptoDeepTools/blob/9dfd594126117e07fc51a77a7c613180eb662f18/07EndomorphismSecp256k1/endomorphism.py#L145\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e145\u003c/a\u003e\u0026nbsp;\u0026nbsp;we use all short values ​​to speed up\u0026nbsp;\u0026nbsp;\u003ccode\u003esecp256k1\u003c/code\u003e\u0026nbsp;with\u0026nbsp;\u0026nbsp;\u003cem\u003eendomorphism\u003c/em\u003e\u003c/p\u003e\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003e\u003cstrong\u003edef\u003c/strong\u003e \u003cstrong\u003esplit_scalar_endo\u003c/strong\u003e(k):\n    n = N\n    a1 = 0x3086d221a7d46bcde86c90e49284eb15\n    b1 = -0xe4437ed6010e88286f547fa90abfe4c3\n    a2 = 0x114ca50f7a8e2f3f657c1108d9d44cfd8\n    b2 = a1\n    c1 = div_nearest(b2 * k, n)\n    c2 = div_nearest(-b1 * k, n)\n    k1 = mod(k - c1 * a1 - c2 * a2, n)\n    k2 = mod(-c1 * b1 - c2 * b2, n)\n    k1neg = k1 \u0026gt; POW_2_128\n    k2neg = k2 \u0026gt; POW_2_128\n    \u003cstrong\u003eif\u003c/strong\u003e k1neg:\n        k1 = n - k1\n    \u003cstrong\u003eif\u003c/strong\u003e k2neg:\n        k2 = n - k2\n    \u003cstrong\u003ereturn\u003c/strong\u003e (k1neg, k1, k2neg, k2)\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eCopy the private key in the\u0026nbsp;\u0026nbsp;\u003ccode\u003eHEX\u003c/code\u003e-format that we published in the\u0026nbsp;\u0026nbsp;\u003ca href=\"https://cryptodeep.ru/kangaroo/\" target=\"_blank\" rel=\"noreferrer noopener\"\u003earticle\u003c/a\u003e\u003c/p\u003e\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eHEX:  23d4a09295be678b21a5f1dceae1f634a69c1b41775f680ebf8165266471401b\u003c/code\u003e\u003c/pre\u003e\n\u003ch4\u003eLet’s run the Python script endomorphism.py specifying the private key:\u003c/h4\u003e\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003epython3 endomorphism.py 23d4a09295be678b21a5f1dceae1f634a69c1b41775f680ebf8165266471401b \u0026gt; pubkey.txt\n\u003c/code\u003e\u003c/pre\u003e\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg src=\"./Speed __up secp256k1 with endomorphism - «CRYPTO DEEP TECH»_files/3c56f13d77ef80024a8cfb16f80943fc.png\" alt=\"Speed ​​up secp256k1 with endomorphism\"\u003e\u003c/figure\u003e\n\u003ch4\u003eThe result of the public key will be saved to the file: pubkey.txt\u003c/h4\u003e\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eОткроем файл: pubkey.txt и проверим:\n\ncat pubkey.txt\n\n04ca5606a1e820e7a2f6bb3ab090e8ade7b04a7e0b5909a68dda2744ae3b8ecbfa280a47639c811134d648e8ee8096c33b41611be509ebca837fbda10baaa1eb15\n\u003c/code\u003e\u003c/pre\u003e\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg src=\"./Speed __up secp256k1 with endomorphism - «CRYPTO DEEP TECH»_files/4485295113ba74f334a01f4ed2b54bd4.png\" alt=\"Speed ​​up secp256k1 with endomorphism\"\u003e\u003c/figure\u003e\n\u003ch4\u003eNext, get the Bitcoin Address by running the Python script pubtoaddr.py\u003c/h4\u003e\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003epython3 pubtoaddr.py\n\nОткроем файл: BitcoinAddress.txt и проверим:\n\ncat BitcoinAddress.txt\n\n14NWDXkQwcGN1Pd9fboL8npVynD5SfyJAE\n\u003c/code\u003e\u003c/pre\u003e\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003cimg src=\"./Speed __up secp256k1 with endomorphism - «CRYPTO DEEP TECH»_files/1a480554216e020e1c53a9370661274a.png\" alt=\"Speed ​​up secp256k1 with endomorphism\"\u003e\u003c/figure\u003e\n\u003c/div\u003e\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eADDR: 14NWDXkQwcGN1Pd9fboL8npVynD5SfyJAE\nWIF:  5J64pq77XjeacCezwmAr2V1s7snvvJkuAz8sENxw7xCkikceV6e\nHEX:  23d4a09295be678b21a5f1dceae1f634a69c1b41775f680ebf8165266471401b\u003c/code\u003e\u003c/pre\u003e\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg title=\"Checking the private key on the bitaddress website\" src=\"./Speed __up secp256k1 with endomorphism - «CRYPTO DEEP TECH»_files/d8c78d8eb14e5246b495e09f59631e44.png\" alt=\"Checking the private key on the bitaddress website\"\u003e\u003cfigcaption\u003eChecking the private key on the bitaddress website\u003c/figcaption\u003e\u003c/figure\u003e\n\u003ch3\u003eblockchain:\u003c/h3\u003e\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003cimg title=\"www.blockchain.com/btc/address/14NWDXkQwcGN1Pd9fboL8npVynD5SfyJAE\" src=\"./Speed __up secp256k1 with endomorphism - «CRYPTO DEEP TECH»_files/ed97dac1dc07e2bce09fe0951d9f64de.png\" alt=\"www.blockchain.com/btc/address/14NWDXkQwcGN1Pd9fboL8npVynD5SfyJAE\"\u003e\u003cfigcaption\u003ewww.blockchain.com/btc/address/14NWDXkQwcGN1Pd9fboL8npVynD5SfyJAE\u003c/figcaption\u003e\u003c/figure\u003e\n\u003c/div\u003e\n\u003ch2\u003eOn this topic, you can read the literature:\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cem\u003eGallant, Robert P., Robert J. Lambert, and Scott A. Wanston.\u0026nbsp;\u003c/em\u003e\u003cstrong\u003e\u003cem\u003e«Faster point multiplication on elliptic curves with efficient endomorphisms»\u003c/em\u003e\u003c/strong\u003e\u003cem\u003e\u0026nbsp;.\u0026nbsp;Annual International Conference on Cryptology, pp. 190–200.\u0026nbsp;Springer, Berlin, Heidelberg, (2001)\u003c/em\u003e\u003c/li\u003e\n\u003cli\u003e\u003cem\u003eHankerson, Darrell, Alfred J. Menezes, and Scott Wanston.\u0026nbsp;\u003c/em\u003e\u003cstrong\u003e\u003cem\u003e«A Guide to Elliptic Curve Cryptography»\u003c/em\u003e\u003c/strong\u003e\u003cem\u003e\u0026nbsp;.\u0026nbsp;Computer Reviews 46, no.\u0026nbsp;1 (2005)\u003c/em\u003e\u003c/li\u003e\n\u003cli\u003e\u003cem\u003eHal Finney.\u0026nbsp;bitcointalk —\u0026nbsp;\u0026nbsp;\u003c/em\u003e\u003cstrong\u003e\u003cem\u003e«Acceleration of signature verification»\u003c/em\u003e\u003c/strong\u003e\u003cem\u003e\u0026nbsp;.\u0026nbsp;(2011)\u0026nbsp;\u003c/em\u003e\u0026nbsp;\u003ca href=\"https://bitcointalk.org/index.php?topic=3238.0\" target=\"_blank\" rel=\"noreferrer noopener\"\u003ehttps://bitcointalk.org/index.php?topic=3238.0\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003cem\u003eBlahut, Richard E.\u0026nbsp;\u0026nbsp;\u003c/em\u003e\u003cstrong\u003e\u003cem\u003e«Cryptography and Secure Communication»\u003c/em\u003e\u003c/strong\u003e\u003cem\u003e\u0026nbsp;.\u0026nbsp;Cambridge University Press, (2014)\u003c/em\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eThis video was created for the\u0026nbsp;\u0026nbsp;\u003ca href=\"https://cryptodeep.ru/\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003eCRYPTO DEEP TECH\u003c/strong\u003e\u003c/a\u003e\u0026nbsp;portal \u0026nbsp;to ensure the financial security of data and cryptography on elliptic curves\u0026nbsp;\u0026nbsp;\u003ccode\u003esecp256k1\u003c/code\u003e\u0026nbsp;against weak signatures\u0026nbsp;\u0026nbsp;\u003ccode\u003eECDSA\u003c/code\u003e\u0026nbsp;in cryptocurrency\u0026nbsp;\u003ccode\u003eBITCOIN\u003c/code\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://github.com/demining/CryptoDeepTools/tree/main/07EndomorphismSecp256k1\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003e\u003cu\u003eSource\u003c/u\u003e\u003c/strong\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://t.me/cryptodeeptech\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003eTelegram\u003c/strong\u003e\u003c/a\u003e\u003cstrong\u003e\u0026nbsp;:\u0026nbsp;\u0026nbsp;\u003c/strong\u003e\u003ca href=\"https://t.me/cryptodeeptech\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003e\u003cu\u003ehttps://t.me/cryptodeeptech\u003c/u\u003e\u003c/strong\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://youtu.be/DH6FyNY-Gh0\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003eVideo\u003c/strong\u003e\u003c/a\u003e\u003cstrong\u003e\u0026nbsp;:\u0026nbsp;\u0026nbsp;\u003cu\u003e\u003ca href=\"https://youtu.be/DH6FyNY-Gh0\" target=\"_blank\" rel=\"noreferrer noopener\"\u003ehttps://youtu.be/DH6FyNY-Gh0\u003c/a\u003e\u003c/u\u003e\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://cryptodeeptech.ru/endomorphism\"\u003e\u003cstrong\u003eSource : https://cryptodeeptech.ru/endomorphism\u003c/strong\u003e\u003c/a\u003e\u003c/p\u003e\n\u003c/div\u003e\n\n\n---\n\n\n|  | Donation Address |\n| --- | --- |\n| ♥ __BTC__ | 1Lw2gTnMpxRUNBU85Hg4ruTwnpUPKdf3nV |\n| ♥ __ETH__ | 0xaBd66CF90898517573f19184b3297d651f7b90bf |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdemining%2Fendomorphism-secp256k1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdemining%2Fendomorphism-secp256k1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdemining%2Fendomorphism-secp256k1/lists"}