-
Notifications
You must be signed in to change notification settings - Fork 22
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
Feature request: generate 2nd seed that produces XOR result with a valid checksum #54
Comments
@GregTonoski I'm sorry but I don't understand this feature request.
Seed tool already does this
There are multiple correct final words from the checksum. From the spec:
While it is technically possible to do SHA256 calculations on paper, it's quite complicated and not encouraged. We coded seed tool to provide the same final word as cold card so as to match them. Please can you explain clearly exactly what feature you are requesting? Thanks. |
There is the explanation by the example below. Pre-condition:
Step:
Actual result:"Seed 2 of 2" (randomly generated): "zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo wrong" Expected result:"Seed 2 of 2" (randomly generated and under the condition that the last 4 out of 132 bits will result in valid SHA256 checksum of the "XOR Result"): "zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo toe" |
Thanks for this, I believe I understand you now. Let me try to repeat back in my own words to see if we are on the same page. GregXOR (or whatever you want to call your invention!) is a subset of seedXOR where all the bits, including the checksums, can be calculated on paper without the need for checksum culculation & SHA256. In order to do this, the user supplies a seed (part 1) and then instructs seed tool to find parts 2 & 3 (both being valid seeds) such that part 3 is the XOR of parts 1 & 2, including the checksum. In order to find this combination, seed tool should, generate random bits for the words of part 2, generate a checksum and XOR parts 1 & 2. If part 3 is a valid seed, success, else first flip the optional last word bits and calculate a checksum then XOR again to generate a part 3. Test the validity of part 3 and if a valid checksum, success, else keep flipping bits as before. With 12 words we have 128 valid last words, with 24 there are only 8, so we may not find a valid GregXOR on the first run. So we generate a new part 2 and repeat this process. PROS:
CONS:
I'm interested to see what this is like though as it is an fascinating idea. Have I describes this correctly in the way you meant? |
Thanks for the follow-up. Yes, that's the accurate description of the idea. |
There is the reference implementation (in Bash shell): "https://github.com/GregTonoski/BIP39-XOR". |
Generate the 2nd seed which XOR'd with the 1st one results in the one which is complete (with correct checksum/last 4 bits) so that there isn't the need calculate SHA256 checksum: "If you intend to recover your original seed by hand in future using SeedXOR, you should make a note of the original seed's final word because the chances are that you will not be able to calculate the last word by hand using XOR & SHA256."
There is 1/4^2=6.25% chance to generate such a seed so brute-force could be implemented to achieve it.
The text was updated successfully, but these errors were encountered: