-
Notifications
You must be signed in to change notification settings - Fork 58
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
add split key generation #4
base: master
Are you sure you want to change the base?
Conversation
This uses the addition method. Also note that compressed, uncompressed and hybrid public keys will all work. |
Thanks for writing. I just commited some bug fixes & speed improvements that I was working on earlier this morning. I will take a look at your new code soon. |
Oh, nice. I was actually just looking at writing the code to coalescing adjacent/overlapping patterns myself, but you beat me to it. I'm also planning on submitting a patch that iterates through keys by doubling them rather than incrementing, which appears to be 10-15% faster. |
Can you explain to me the security ramifications of doubling keys rather than incrementing them (as I am not an expert in ECDSA)? As I understand it, there are only 256 bits in a private key, so you can only double the key up to 256 times before the key becomes 0. Or are we talking something closer to left-shift operations, where bits at the top wrap around to the bottom? (Then, is this done 256 times before incrementing by 1? Or what other permutation is applied?) |
No security impact. The key is a scalar value in a prime field, so you're actually doubling modulo the finite field order which is a large prime. As a result, the cycle length is effectively endless. The only other thing is that split key generation will require multiplication rather than addition to get the combined key, but tooling already supports this. |
Was right about to beginning making my own when saw there was already a PR for this. The printed PrivPart value, though a valid private key, does not produce the correct address when added to the mystery private key. Tried compressed and uncompressed too, just in case it was an issue reading it. |
@RonaldSwaine I just tested it with gobittest.appspot.com/VanityAll and it's working there. I have a pull request against bitaddress.org that makes the vanity wallet tool support compressed keys. I also have a fork of the original vanitygen tool somewhere that can just add two compressed private keys, and that works fine. Not sure if i've pushed it. |
You are correct, it is working correctly. The compression had me mixed up. I think I've been staring at too much hex. Thanks for reminding me to check what I already should have checked. :P |
Sorry, I really dropped the ball on this one. This is a classic case of me taking on too many projects at once and never getting back to it all. I will investigate soon. |
@klynastor It looks like there's some minor merge conflicts with this - do you want to fix them, or shall I? I neglected to add anything to the usage screen or readme - I could do that at create a new pull. |
Add split key generation. If using bitaddress.org's vanity tool, conversion from uncompressed to compressed keys may be required.