Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed improvement? #2

Open
lianalancealot opened this issue Feb 10, 2015 · 4 comments
Open

Speed improvement? #2

lianalancealot opened this issue Feb 10, 2015 · 4 comments

Comments

@lianalancealot
Copy link

Adding EC_GROUP_precompute_mult appears to improve performance 5x/6x as precomputations are made for the generator point of the curve.

group = EC_GROUP_new_by_curve_name ( NID_secp256k1 );
if (group == NULL ) {
printf ( "error %d\n", LINE );
exit(1);
}
BN_CTX *ctx = BN_CTX_new();
BN_CTX_start( ctx );
EC_GROUP_precompute_mult( group , ctx);

However, adding this and it appears to be generating duplicates, say 10-20 dupes in a set of 5-10 million vanity addresses. Any ideas?

@alexanderkent
Copy link

That should speed it up but probably would need to implement the openssl threading methods i.e.:

void pthreads_locking_callback(int mode, int type, char *file, int line);

void thread_cleanup(void);

unsigned long pthreads_thread_id(void);

See: http://stackoverflow.com/questions/3919420/tutorial-on-using-openssl-with-pthreads

@lianalancealot
Copy link
Author

Just getting duplicates 👎 otherwise this bitkeygen is really cool and works.

@ShaliDaliHaliDa
Copy link

The function EC_GROUP_precompute_mult stores multiples of the generator for faster point multiplication, whilst EC_GROUP_have_precompute_mult tests whether precomputation has already been done. See EC_GROUP_copy for information about the generator.

https://www.openssl.org/docs/crypto/EC_GROUP_have_precompute_mult.html

does that help?

@ShaliDaliHaliDa
Copy link

Maybe Mr. Reds could take a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants