I’m trying to manually verify that an old Electrum bitcoin wallet of mine contains keys that were derived from its seed as expected. One step in the key derivation requires that I hash the seed via Sha256, and then hash the result again via Sha256, and then hash that result via Sha256, etc, until there have been 100000 iterations. Ideally, I would like to do it within a bash shell, since that is really the only environment that I’m somewhat competent in, but if that isn’t possible, or if there is a superior way to do it in some other context, I’m willing to try to learn/attempt.
I have been searching for an answer to this for several hours now…it seems all the Google results are about whether or not iterative hashing has any value in terms of security…but I have failed to find any examples of how to actually do it. Any help would be very much appreciated.
The only elementary attempt I have made so far was a primitive solution that basically consisted of the following: I created an executable called ‘hash10times’ that contained “sha256sum | xxd -r -p” x10. Then I created another executable called “hash100times” that contained “hash10times | xxd -r -p” 10x..and so on. It worked up until I got to hash10000times…then q bunch of fork errors started piling up…so as you can see I am in pretty serious need of assistance before someone gets hurt.
AnarchyMyDear is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.