Post
Topic
Board Bitcoin Technical Support
Merits 14 from 5 users
Re: Best technical specs to generate millions of keys per second (not mining).
by
arulbero
on 24/12/2019, 16:30:14 UTC
⭐ Merited by DarkStar_ (5) ,ETFbitcoin (3) ,pooya87 (2) ,Heisenberg_Hunter (2) ,fillippone (2)
Note: Generating split key does decrease speeds. If you can find someone offering the 16XX or 20XX series, it will probably be even better performance/$.

A trivial way to outsource these computations without decreasing speed is replacing G (the generator of the curve):

https://github.com/JeanLucPons/VanitySearch/blob/master/SECP256K1.cpp

Code:
// Generator point and order
G.x.SetBase16("79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798");
G.y.SetBase16("483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8");

Let's do an example. I want to find 1TryMe prefix. I don't have enough resource. B will do the work for me.

First I generate a private key k':
Code:
$ hexdump -n 32 -e '8/4 "%08X"' /dev/urandom
B0F73D115572691C22B4D7AC5266A1D488E607323AABB35AB2896BE2B5204C91

then I compute the corresponding public key G' = k'*G:
Code:
961b9c7b6e08355e6d25924022df6d15c7da7af05ba7bb50f5b8d78a46378f0f 9377f60a859415663417ea79ed6ee83db70ea77bad8e1ad05662c699f4beec1c

and I send only the public key G' to B.

B replaces G with G':

Code:
// Generator point and order
G.x.SetBase16("961b9c7b6e08355e6d25924022df6d15c7da7af05ba7bb50f5b8d78a46378f0f");
G.y.SetBase16("9377f60a859415663417ea79ed6ee83db70ea77bad8e1ad05662c699f4beec1c");

B compiles and runs VanitySearch:
Code:
./VanitySearch -gpu 1TryMe

Pub Addr: 1TryMemMqFG1SWFXJkdCyXm6gFhgc6iMH
Prv Addr: 5JkNnhUQfAJmQpWHv9r9g4YM1SKs4roT5N1okKgrLj1BcoNSYUE
Prv Key : 0x7ddea4bdd3d14030094ddf5aa416b7e979fe5cce58802c1d0a272c1b5f4455ab
Check   : 147homhkTC1xKQVvBjdiYB5Xw3tRg1n2RT
Check   : 1TryMemMqFG1SWFXJkdCyXm6gFhgc6iMH (comp)

and he returns the private (partial) key 0x7ddea4bdd3d14030094ddf5aa416b7e979fe5cce58802c1d0a272c1b5f4455ab
to me.
Important: partial_k*G' = public key  -> 1TryMemMqFG1SWFXJkdCyXm6gFhgc6iMH

but G' = k'*G  then partial_k * k' * G = public key -> t1TryMemMqFG1SWFXJkdCyXm6gFhgc6iMH

then the real private_key is   (partial_k * k') mod n  

Code:
python
>>> n = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141
>>> k = 0xB0F73D115572691C22B4D7AC5266A1D488E607323AABB35AB2896BE2B5204C91
>>> partial_k = 0x7ddea4bdd3d14030094ddf5aa416b7e979fe5cce58802c1d0a272c1b5f4455ab
>>>
>>> private_key = (partial_k * k) % n
>>> hex(private_key)
'0x7ad1451e53cfb77ccb6e15965fa2af303e762d3895b5508540deb5ff39e010f4'

0x7ad1451e53cfb77ccb6e15965fa2af303e762d3895b5508540deb5ff39e010f4.