Post
Topic
Board Development & Technical Discussion
Re: Collection of 18.509 found and used Brainwallets
by
ETFbitcoin
on 15/08/2022, 11:22:32 UTC

rehashaddress it work by using privatekey to hash with sha-256 and use it again for next privatekey and loop right?

No, rehashaddress use user-chosen password/passphrase. It'll hash at least one time and perform additional rehash based on m parameter value. Here's snippet from the source code comment.

Generate N deterministic privatekeys, publickey and legacy address from a password or passphrase, after M rehash of the given password
Examples:
Generate 1 privatekey and his address after 0 rehashes:
./rehashaddress -p "3'W-CB7;>bRMzH<zyE5~Woh=_O>#eX" -n 1 -m 0
Generate 10 privatekeys and his address after 1 million of rehahes
./rehashaddress -p "}78~Et=jPQP5}MVVj2fc0X38{~I}?c" -n 10 -m 100000
Generate 5 privatekeys and his addrtess after 1337 rehash
./rehashaddress -p "JA,af>9oY2M~8ni0G=S.IKBMb)vNmt" -n 5 -m 1337
Miscellaneous
Password: secret
0 rehashes is the sha256("secret")
1 rehashes is the sha256(sha256("secret")), in this case is the hash sha256 of the binary value of the sha256("secret")
2 rehashes is the sha256(sha256(sha256("secret"))).... and so on