Title: Generating BTC and ETH Wallet from the same private key.
Post by: krashfire on July 16, 2024, 05:59:28 AM
An update from this previous post https://bitcointalk.org/index.php?topic=5500340.0 where i have added taproot addr among others. The result will be, ---------------------------------------- --------- Crypto Address Set 9 ---------
Private Key (Hexadecimal): 46731fe2aaf7d392d8c835d700e218ce530f07bceecfbe7bdda563bccb9fe27d Private Key (Decimal): 31865306878367898143325753650603785580817010066944666973741921704127557001853
Bitcoin P2PKH (Legacy) Address: - Uncompressed: 19rVJHyPAeqGwEe2Y88ScEokNpJyXNYg9h - Compressed: 1HfFPCkBPeM9n8oMdJsRBkLv5TsKqpS6eZ
Bitcoin P2SH-Segwit Address: - Bitcoin Address: 3MavunaQnxHH64VhkQCs9eGEsKwfWwRxMg
Bitcoin Bech32 (Native Segwit v0) Address: - Bitcoin Address: bc1qk67axs6mkuuku4ru4mslkt6plzc9jlvul6luk7
Bitcoin Bech32m (Native Segwit v1) Address: - Bitcoin Address: bc1pmuy35pudravslw3v48tnmxnjtav9k9l3nxneqvktnw546pvnt38skhtp6u
Bitcoin P2TR (Taproot) Address: - Bitcoin Address: bc1pqvnugwfratfw7yyg8y3yn9qmyrs8m95ws75ss7wn6cps2yucugckj855g5k
Ethereum Address: - Ethereum Address: 0x050b637ee56b253057d65e2a27072d983795d1d5
WIF Private Keys: - Uncompressed: 5JMK8BffyoRt2ujpW7vV9kvyTAq75VcyNA2LczMcSuromQTg57Q - Compressed: Kyaezi5h3hvpFRmzfXZ5FeuEAWPKpqKmnNpubr9yTNJqQieCd3co
Public Keys: - Uncompressed: 0427c43923ead2ef1088392249941b20e07d968e87a90879d3d603051398e2316952725d204255a3b3afc316f394a6605ee5be3b9a13bb084b618be451e5a21d9b - Compressed: 0327c43923ead2ef1088392249941b20e07d968e87a90879d3d603051398e23169
---------------------------------------- --------- Crypto Address Set 10 ---------
Private Key (Hexadecimal): 1e718fbcc43ef27c65aaec995a39fdbce7809075755002897e075785deb2d440 Private Key (Decimal): 13770031214682617702920419222185887662192733509350067534825001918611160486976
Bitcoin P2PKH (Legacy) Address: - Uncompressed: 1DprDrZavpEvGpxf4m3kfkTb6dvWmFRsss - Compressed: 1F2Ytqn4a88wVc8soysByc1Xnf26X4JKkF
Bitcoin P2SH-Segwit Address: - Bitcoin Address: 3Q4Yqp33nxWmXjMBTKK2bS6JjyVpbKUH4t
Bitcoin Bech32 (Native Segwit v0) Address: - Bitcoin Address: bc1qn8wveuy7pram7m9h5zycs7y7yfygyjjja9ylma
Bitcoin Bech32m (Native Segwit v1) Address: - Bitcoin Address: bc1p6cvs38kr6fzkcn5gknq3dvyc52x0vl49pe56wdwjw2p27np6jh4q02lymp
Bitcoin P2TR (Taproot) Address: - Bitcoin Address: bc1pq2m299eh4ny80sqzvwnttspgqq76ymjfek5rg3kffxyhm6x47qp37zx0kl9
Ethereum Address: - Ethereum Address: 0x0893bc713b611733f9fa196f8dfc771e4f5cb2c0
WIF Private Keys: - Uncompressed: 5J3hDrQNzVhgqmnViyR3UCjzV6Tw6dscmHbzE961ntPTdVH43jn - Compressed: KxEtXj4C4mgarGfonG17u4pkj17smskQrUHRazh8VXp8XuJDj4Cg
Public Keys: - Uncompressed: 04b6a29737acc877c00263a6b5c028003da26e49cda83446c949897de8d5f0031f5ac4cb48ca44b39439ca43069f4b8899d5c5a0a516b47e0caf06f1912359df56 - Compressed: 02b6a29737acc877c00263a6b5c028003da26e49cda83446c949897de8d5f0031f
I tried my best to make the code as "readable" as possible. Do check out the code and give me your opinion. you may clone here if you like it. https://github.com/KrashKrash/btc-addr-generator
Title: Re: Generating BTC and ETH Wallet from the same private key.
Post by: witcher_sense on July 16, 2024, 07:38:27 AM
What is the Segwit v1 and Taproot in your example? How do they generated exactly? I put one of the WIF private keys here https://gugger.guru/cryptography-toolkit/#!/ecc and it shows that not all addresses match your generated info.
Particularly, for private key Kyaezi5h3hvpFRmzfXZ5FeuEAWPKpqKmnNpubr9yTNJqQieCd3co the corresonding Taproot address is bc1p8a0d52uwlw0c4mhnu3alev6dhctaxw56hm3rwytmswt8ty9zsucse8g3xs and not bc1pqvnugwfratfw7yyg8y3yn9qmyrs8m95ws75ss7wn6cps2yucugckj855g5k
Title: Re: Generating BTC and ETH Wallet from the same private key.
Post by: krashfire on July 16, 2024, 08:54:27 AM
What is the Segwit v1 and Taproot in your example? How do they generated exactly? I put one of the WIF private keys here https://gugger.guru/cryptography-toolkit/#!/ecc and it shows that not all addresses match your generated info.
Particularly, for private key Kyaezi5h3hvpFRmzfXZ5FeuEAWPKpqKmnNpubr9yTNJqQieCd3co the corresonding Taproot address is bc1p8a0d52uwlw0c4mhnu3alev6dhctaxw56hm3rwytmswt8ty9zsucse8g3xs and not bc1pqvnugwfratfw7yyg8y3yn9qmyrs8m95ws75ss7wn6cps2yucugckj855g5k
oh.. thanks for the info. i shall correct it now.
Title: Re: Generating BTC and ETH Wallet from the same private key.
Post by: SquirrelJulietGarden on July 16, 2024, 10:27:29 AM
I will create two different wallets, one for Bitcoin, and one for Ethereum or any token.
With Ethereum, interaction through smart contracts is risky and I can not be sure that interact with them will not let my money stolen. What if I will lose not only tokens, ETH and also Bitcoin?
Use one wallet for all is convenient but the point here is simple and vital, creating one more wallet is not like a burden in our life so don't let convenience to bring more risk on our money.
Title: Re: Generating BTC and ETH Wallet from the same private key.
Post by: krashfire on July 16, 2024, 10:39:18 AM
I will create two different wallets, one for Bitcoin, and one for Ethereum or any token.
With Ethereum, interaction through smart contracts is risky and I can not be sure that interact with them will not let my money stolen. What if I will lose not only tokens, ETH and also Bitcoin?
Use one wallet for all is convenient but the point here is simple and vital, creating one more wallet is not like a burden in our life so don't let convenience to bring more risk on our money.
you make a very good point.
Title: Re: Generating BTC and ETH Wallet from the same private key.
Post by: witcher_sense on July 17, 2024, 05:52:25 AM
oh.. thanks for the info. i shall correct it now.
I just implemented the generation of Taproot addresses from public keys: https://github.com/shadowy-pycoder/go-bitcoin-message-tool/tree/development For reference, I used this guide which describes all necessary steps https://bitcoin.stackexchange.com/questions/116384/what-are-the-steps-to-convert-a-private-key-to-a-taproot-address Examples: bmt create -n 10
Private Key (Raw): 4582100058451411506313632138886843907614481896216872087886730225190085160294 Private Key (WIF): KwZQKz8vk3bXbsvjFsFHSfJekAe7DhncxCR1SpzmRzs5Dk6v3nDf Public Key (Raw): (X=16128664557009835857575213741516942075525183929617432192989407601626281549354, Y=14356904866834791529116994720128116669774320491181132783533866566337462473828) Public Key (HEX Compressed): 0223a88029c5b8cb2bd0af74a417ee010adfc060c219cdb13bd0589a4cbdb61e2a Legacy Address: 1H2KSV2Wq8jVar9N1e3t2BBpV57W8MuC81 Nested SegWit Address: 3J4UMDRSbj4EHQUVKt2kjMT28KVrNkV1Xm Native SegWit Address: bc1q4lqayfeqjh598tcx6n4dtzuw2rpcht5qwlk4gs Taproot Address: bc1pza77wyae5rv9hh37ufwuz0fz75ae8aervps37dk63dp0rk2hll8swr2m5s
Private Key (Raw): 66417007864786497635867758295482139066805191875772190872456936814745576462305 Private Key (WIF): L299RVU8EgX9cJz1zVvcDxsTNfApzgjB8DZEwV1orb3PUbqt2coL Public Key (Raw): (X=57807889690326919156168789656487669938960639737924693166404832508968254628001, Y=69197567544157208391659208644824124338974702200749659241621104943479986337011) Public Key (HEX Compressed): 037fce1b27f9e8a02f4bd10aa68f80113d2eb4f8481927e10ad05a15c3e7b4e0a1 Legacy Address: 1MRumZiJQ1EAemrZyWoDmZCtrmL9kvLkWA Nested SegWit Address: 3MrjNnmjs2WeeTtRoTLt8bSCD9mq47t33D Native SegWit Address: bc1quqvgcty8l09hqg6w8js40fpk4k4pxhs9vwulrk Taproot Address: bc1pxkx9vk2qhja0r2q3d3g524js752ww872fam26fwju4p8z4sh59wq6x233u
Private Key (Raw): 25176913542011956963166551069005474784942327788669559857400305800823126073861 Private Key (WIF): Ky5uqHKxvBKxStEHGYHd9fXZXPiickY9FbRiAxuRJ5oMN1sSR5PX Public Key (Raw): (X=77845833387649520060658190998296640552826357725165595125597046262820973445098, Y=107597407123579989913362738278569196325172575608130653098162284943030270962416) Public Key (HEX Compressed): 02ac1b2e28118e58081b703e9a6055001a0be1bcac5cf183374255b4e56dc1ffea Legacy Address: 1Cmytzbkycivj22pcWwVt4QsCpxsGwcmVj Nested SegWit Address: 35XMZ1RDMYjnhTuayLkU89PeN7DN9FUq3j Native SegWit Address: bc1qsy4jusdeuyymncpj6a8g9faq34vhvh7vlerkpr Taproot Address: bc1pf24l4akvsnj0jw4twt40lprqsfs8uv4jqf4ksj9sjfuyxu20z42q7mw6he
Private Key (Raw): 86473604094565151411998708785553614925071384662129744143154259661392152709976 Private Key (WIF): L3dLmg5fLiBBgGHJ2jtfdMgpPNUaLooYdtPNeMrVkThAQF4yghwH Public Key (Raw): (X=4539461457339585012359189356817812329112565522713268937626202489500612673343, Y=4513313405506406970404130030599478018936974070246685404955839334193670631937) Public Key (HEX Compressed): 030a093e7f956efc16fac54783c229bca07f4bd61a76f939060437804b20ebbf3f Legacy Address: 18moEGYqjtt32ZRc7Ti144HvNHXcyXATD2 Nested SegWit Address: 37Aewjo5LwQuiGC7ScUCSeAupDmzyy7A4A Native SegWit Address: bc1q24qutjeq4dtckh8m53h3atgq62j60u468lng0y Taproot Address: bc1p02japuxw5sfxjgt5w34vls6wx5crsdst3nrzjcvr837nr8feurwqanp52j
Private Key (Raw): 14307717263127410173975515146383497257663071256504289804149224884152798850361 Private Key (WIF): KxHCZAD3ZX8WzrEZmJULVznWi2cL7SwEMjDtULHqR3iGf5UMdR1d Public Key (Raw): (X=34041817242197164084662114780932417753560302820050676116095370420973116908381, Y=64558339002775857980233313493126821422973179909538194372376839901520178548257) Public Key (HEX Compressed): 034b42fc5af40ea2f9d5a17764aaf7bd8eb20b53a4b63cf1dfc5b277410a98e35d Legacy Address: 17i93bjPXxGqqvNHqxxqoMJJYhSwFfMGrs Nested SegWit Address: 35YxBoCzXRfc42omdso5tcw3jgL6zXrvwG Native SegWit Address: bc1qfxvgvnzas7xllrt40chyus0s458xjkmpzkxa90 Taproot Address: bc1p3mggrdwt65rk6rrn8r2xqjgewwysptg6chngm62klkgelpvesg5suvj5a3
Private Key (Raw): 61518891017916190965637126146647629597271367795260821400014485282035462508861 Private Key (WIF): L1n6WSrQSJvzh9GRwrCqnLCQEAvuBGrSB4h6Kb2Rs7QU3NVN6Fbc Public Key (Raw): (X=57423498183759333258230822753231393412911432620863171958445044785368377815793, Y=46271527295675585398737689575323080783748107279141324287870345880253777619379) Public Key (HEX Compressed): 037ef48c569266c9576264c217f61835e1fc3671960c996b2e3b02a4fedbdf72f1 Legacy Address: 1NQK2FQ6ayYWko14RFfpSLDdLzDKskQxsp Nested SegWit Address: 32oNN6EJNUTzMgfnsTQ41vXgLUKDaXECkp Native SegWit Address: bc1qatp5prm43pjrdnsv4glv3yyzg27s3asmwkllg5 Taproot Address: bc1pnvnr33zeww0qme2kl0ezx9sydjlscj9srcq0rs8xsa2k5zvdyvfsgp4l58
Private Key (Raw): 112256286624664875993717503299970657663783307340203844213863707068225855547611 Private Key (WIF): L5Y9R2AynaEPtjPSUY1gQQ8UF8EU86CiiBvatn16sMoLt8NLHs9g Public Key (Raw): (X=11312005116489099887792994107771802963609316348395155073874829030306480426498, Y=26922674049229109624534350610128462763241870291218586140216253564800061068795) Public Key (HEX Compressed): 0319025e358c00f342a2b2717cf279ae03541515271b9c3fd00bb84aa347d48e02 Legacy Address: 1C7VNa6haLBT9gPfLh63hvMZ8J4UkR5Q7j Nested SegWit Address: 348FKS4fCsS8xjmhrWwiSTxuPMRjRZQsot Native SegWit Address: bc1q083eqff7ajmkxwmcwrtf00lhm824yy8gmfk83x Taproot Address: bc1pkntdqs5kl44nt58zsdcy9rtsnp9nm0rnqx0n4xmrzwf7qt34h6usey8830
Private Key (Raw): 6391082745762650402124181523313192496776146194839615500675568520180918697371 Private Key (WIF): KwhBEokRQc9SkbqoJp26LGHs5DvJ8MDLUXVGRwcPALTtr7gufpyB Public Key (Raw): (X=98974025266341864099745416138594949672250045157868933115459765872779542936325, Y=71370308302146529054742862774791261345568952063995652193657695225050365426762) Public Key (HEX Compressed): 02dad15028c31757871ee3d64ec66045688c22e3016c20f72628b000d5fef83b05 Legacy Address: 1MosxPwkN6rRvdVLi82yuCneD6tb3ZtnSk Nested SegWit Address: 3Pswbt22GRu3FkMS6Qe8fXysHTHDspvkTf Native SegWit Address: bc1qu3qz7csjptmh0zzn2rrtu4wpwe9cyzg2smf4az Taproot Address: bc1puu5lczseqfnlyl2m0y6c6cc5gyd8hrke0dse88rhs76grwz4qv0q2t68n0
Private Key (Raw): 21971866587994315505569756218535649833241463137066571178038497295149400975887 Private Key (WIF): Kxr8wHRG3GJLavmvmpnWv9DkkfXmrBMKgVzRR7zd9VoULpdpNmvr Public Key (Raw): (X=35853665387809176033605119577307392505548116100101968326947794337793533898623, Y=42636216958107293254225999667732812477168546182414870756333823070230080914738) Public Key (HEX Compressed): 024f447499cfbecbdd1da6c8a8a3026074f37b8fcf18950511392cfdeac5ed6f7f Legacy Address: 1GxV5oRH3zMAkR8QuiwUsiHvxv3MhbuRfR Nested SegWit Address: 3HmyQefsYD6FJEEBNG3hb6DMXB4fV3kM2i Native SegWit Address: bc1q4uyrf7aeem624zu3ff42pfej2ds3gjskppzql5 Taproot Address: bc1pd2akmye43fmvzesh6d34dwyewhc28cardvtg3rsklnztgyrka2csqfuta4
Private Key (Raw): 49252480886426424401778241609579404087982111254908292493886691989374242268405 Private Key (WIF): KzsNxXVJDMqB8XkRYJ13tMqFjiVqPzJshkW8u6cjfZSS4u95Q6e8 Public Key (Raw): (X=11175445403643568040706845005094238649808836492388828473548984680980386613394, Y=102687430003717107679259553899377030896009318235232216989050627132017193980513) Public Key (HEX Compressed): 0318b513f4475663c055d461e901f18e26882729261ae8ac72e6c73a0c78b70892 Legacy Address: 1L8EBSrXt6y7XQfX67XnZnrEGw6wAC3dxN Nested SegWit Address: 3LkNjEZ6PmeqqPZ1Py1Uboh2Q9WthV53Ko Native SegWit Address: bc1q68yym3h4d7hx7r34u937n8jxc7zww3dv5cd73x Taproot Address: bc1psy8x82fj39vtcp0y5m4ct7j8602k4r863y2tgjfvvjw9gsvjw3js8sfcjc
|