Bitcoin Forum
June 21, 2024, 08:32:31 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Python HEX generator Range based  (Read 369 times)
WanderingPhilospher
Full Member
***
Offline Offline

Activity: 1078
Merit: 219

Shooters Shoot...


View Profile
April 27, 2021, 07:41:52 AM
 #21

11 characters at the end? Should take seconds, not hours or days.
It depends on whether the key is compressed or uncompressed. For a compressed key you have to check about 22 million while for an uncompressed key the number is 5.8 billion.
           // Numbers are approximates, values usually are ±1
            //         Uncompressed ;     Compressed
            // 1-5 ->             1 ;              1
            // 6   ->             9 ;              1
            // 7   ->           514 ;              3
            // 8   ->        29,817 ;            117
            // 9   ->     1,729,387 ;          6,756
            // 10  ->   100,304,420 ;        391,815
            // 11  -> 5,817,656,406 ;     22,725,222
            // 12  ->               ;  1,318,062,780


For the first case it takes about 2 minutes to check all the keys using FinderOuter


Ok, that might seem like a lot for your program, the FinderOuter, but I could check 5.8 billion in seconds.  It's like people want to make finding 11 missing characters from the end harder, or only use a program that they know or have used before. Now all I can wonder is why the merit for you, for just telling how long it would take for you to find it with a slower program?  Who knows...
Coding Enthusiast
Legendary
*
Offline Offline

Activity: 1039
Merit: 2783


Bitcoin and C♯ Enthusiast


View Profile WWW
April 27, 2021, 07:56:15 AM
 #22

Ok, that might seem like a lot for your program, the FinderOuter, but I could check 5.8 billion in seconds.
Then you are more skilled than I.
But please note that the check here is against an address not a public key so algorithms such as Pollard Kangaroos, and Baby Step Giant Step can't work.

just telling how long it would take for you to find it with a slower program?  Who knows...
I'm not just reporting the time, I'm offering an existing solution and in case it wasn't clear the link to FinderOuter is found in my signature.
Announcement: https://bitcointalk.org/index.php?topic=5214021.0
Source code: https://github.com/Coding-Enthusiast/FinderOuter

Projects List+Suggestion box
Donate: 1Q9s or bc1q
|
|
|
FinderOuter(0.19.1)Ann-git
Denovo(0.7.0)Ann-git
Bitcoin.Net(0.26.0)Ann-git
|
|
|
BitcoinTransactionTool(0.11.0)Ann-git
WatchOnlyBitcoinWallet(3.2.1)Ann-git
SharpPusher(0.12.0)Ann-git
WanderingPhilospher
Full Member
***
Offline Offline

Activity: 1078
Merit: 219

Shooters Shoot...


View Profile
April 27, 2021, 07:57:43 AM
 #23

Ok, that might seem like a lot for your program, the FinderOuter, but I could check 5.8 billion in seconds.
Then you are more skilled than I.
But please note that the check here is against an address not a public key so algorithms such as Pollard Kangaroos, and Baby Step Giant Step can't work.

just telling how long it would take for you to find it with a slower program?  Who knows...
I'm not just reporting the time, I'm offering an existing solution and in case it wasn't clear the link to FinderOuter is found in my signature.
Announcement: https://bitcointalk.org/index.php?topic=5214021.0
Source code: https://github.com/Coding-Enthusiast/FinderOuter

My bad, I read the OPs original post and he said he had the public keys; maybe he misspoke? Because with public keys or the address, one can use other programs.  Even if address only, still wouldn't take long. In your example, I could solve with address only in a few seconds.

(From OP)
Quote
I have the Public Keys so i try this script, maybe it exist a better solution !?
aliashraf
Legendary
*
Offline Offline

Activity: 1456
Merit: 1174

Always remember the cause!


View Profile WWW
April 27, 2021, 09:26:13 AM
 #24

Instead I'd do something like this:
Code:
//This is coded for python 2.5+

from pybitcoin import BitcoinPrivateKey

// check the repository here
//                                                 https://github.com/blockstack/pybitcoin


    start =  long(someValueHex)
    stop  =  long( biggerValueHex)
    target = long(targetPubKeyHex)
    def generate (s,e):
        while s <= e:
            yield s  //it is a generator rather than an ordinary function
            s  += 1
        yield  0

    def searchForTarget:
        candid = generate(start, stop)
        while true:
            pk = next(candid)
            if pk == 0:
                print("Exhausted the search space, sorry, no good news :( " )
                break
            private_key = BitcoinPrivateKey(pk)
            public_key = privatekey.publickey()
            if public_key == target:
                hex_private_key = private_key.toHex();
                print("FOUND! :) /n %s" , %hex_private_key)
                break
If that is what OP was really wanting, versus priv keys he can feed to some program to do the conversion, then I would not use pybitcoin; using it is a lot slower than other ways. When I ran tests, generating random private keys and converting them all the way down to BTC address, pybitcoin was 2.5 times slower on python 2.7
Slower than what? Are you suggesting implementing the lib for Python from scratch?
NotATether
Legendary
*
Offline Offline

Activity: 1638
Merit: 6907


bitcoincleanup.com / bitmixlist.org


View Profile WWW
April 27, 2021, 05:19:06 PM
 #25

My bad, I read the OPs original post and he said he had the public keys; maybe he misspoke? Because with public keys or the address, one can use other programs.  Even if address only, still wouldn't take long. In your example, I could solve with address only in a few seconds.

(From OP)
Quote
I have the Public Keys so i try this script, maybe it exist a better solution !?

Yes I do have his public key too.

But if I can't verify that he gave me the correctly spelled private key then I won't even be able to Pollard's Kangaroo it (so far it finds nothing). I should probably ask for a photo of paper PK just to verify.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Marshal TITO (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 2


View Profile
April 27, 2021, 05:49:55 PM
 #26

My bad, I read the OPs original post and he said he had the public keys; maybe he misspoke? Because with public keys or the address, one can use other programs.  Even if address only, still wouldn't take long. In your example, I could solve with address only in a few seconds.

(From OP)
Quote
I have the Public Keys so i try this script, maybe it exist a better solution !?

Yes I do have his public key too.

But if I can't verify that he gave me the correctly spelled private key then I won't even be able to Pollard's Kangaroo it (so far it finds nothing). I should probably ask for a photo of paper PK just to verify.

Will send it to you when the 2 msg per day expired.
aliashraf
Legendary
*
Offline Offline

Activity: 1456
Merit: 1174

Always remember the cause!


View Profile WWW
April 28, 2021, 07:40:12 AM
 #27

My bad, I read the OPs original post and he said he had the public keys; maybe he misspoke? Because with public keys or the address, one can use other programs.  Even if address only, still wouldn't take long. In your example, I could solve with address only in a few seconds.

(From OP)
Quote
I have the Public Keys so i try this script, maybe it exist a better solution !?

Yes I do have his public key too.

But if I can't verify that he gave me the correctly spelled private key then I won't even be able to Pollard's Kangaroo it (so far it finds nothing). I should probably ask for a photo of paper PK just to verify.

Will send it to you when the 2 msg per day expired.
Send it to me as well Wink
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!