Bitcoin Forum
October 15, 2024, 01:24:44 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Wallet software / Re: Asking for code to convert hex key to hash160 (Javascript without node.js) on: April 08, 2019, 12:01:50 PM
if you can't find the function in a library then do it yourself! the library must have a function to get a "public key" from your private key. use that and then simply hash the result (the pubkey) yourself using RIPEMD160(SHA256(pubk)).
and by the way base58 is not the bottleneck in this process the conversion from private key to public key is the slowest operation and in comparison base58 encoding time is nothing. so if you are trying something like brute force that needs efficiency then you might want to look into that part instead.
I'm looking for a code without using external library, i found one on this https://bitcointalk.org/index.php?topic=750022.0 which can create random key but lack function to convert hex to key & can't call the  RIPEMD160() & Buffer(), the code calling method pretty different from bitcoinjs which is why i hope there're codes that can provide small functions at a time aside from this one
2  Bitcoin / Wallet software / Asking for code to convert hex key to hash160 (Javascript without node.js) on: April 07, 2019, 03:36:24 PM
May i ask if is there any javascript code to turn a hex private key into a hash160 output without require() using node.js. bitcoin code usually return base58 compressed or uncompressed address of a priv key but i hope to skip base58 convert of hash160 to save performance time. Thank You
3  Bitcoin / Development & Technical Discussion / Re: Vanitygen: Vanity bitcoin address generator/miner [v0.22] on: January 22, 2019, 05:46:49 PM
Does anybody know how to modify this?
I found a post on bitcoin stackexchange show how to create a bitcoin address from given hex private key

In vanitygen.c

Replace
Code:
 EC_KEY_generate_key(pkey);
with
Code:
            BIGNUM *res;
            BN_init(&start);
            res = &start;
            BN_hex2bn(&res, "3B1BCC5A67F38853810972B1DA8A67148FAD78C6CD6F22B2C823D141BE59C81C"); //Set up hex private key
            vg_set_privkey(res, pkey);
& remove case
Code:
if (++npoints >= rekey_at)

I intend to replace the input hex private key with function like hashcat to recover lost pivate key like this
Code:
"?1?1?1?1?1?1?1"+"A67F38853810972B1DA8A67148FAD78C6CD6F22B2C823D141BE59C81C"
When i test it on a single hex private key,by default the function keep multiply the key for new address instead of keep try new key completely, if i change it to my given function, it maybe took awhile for the application to generate new key again & the code doesn't even use 100% cpu power, there're no further instruction in the post. Is anybody know to how to adjust the code to check address from mutiple generated key without multiply it. If possible, the performance will stay around like original code or at least decline to 1-20 times, i wouldn't mind that. Thank You
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!