This should give him the same results as Bitaddress, which according to his previous post, is giving him incorrect addresses.
Yup that's correct
Yes it SHOULD, this is just another verification. It's straight math more or less and 1+1 should always = 2 but as we are seeing here for some reason it does not.
Beingcrypto, what script did you use from chatGPT yesterday?
Did you import the keys as a test when you generated them? Sorry if you already answered that, I'm on mobile tunneling into my laptop so scrolling through the post is not easy.
-Dave
So the script was based on a post i saw on the forum,
Here it is
So the first thing you'll need to do is convert from base58 to binary and then throw away the first byte (this is the version) and the last 4 bytes (these are the checksum). What you'll have left is a binary representation of the private key.
Next you'll need to perform the point multiplication on the secp256k1 curve using the private key as the multiplier. The resulting point on the curve is the public key.
Like a WIF private key, a bitcoin address also contains 3 pieces of information embedded in it (version, RIPEMD160 hash, checksum)
I'll assume that you are trying to calculate the compressed key address?
If so, you'll check to see if the Y value of public key point is odd or even. If it is odd, you'll set a leading byte in front of the X value to 03, otherwise you'll set the leading byte in front of the X value to 02. Then you can discard the Y value.
Next you'll calculate the SHA256 hash of the leading byte concatenated with the X value.
Next you'll calculate the RIPEMD-160 hash of the result of the SHA256 hash.
You'll then place a 00 byte in front of the RIPEMD-160 hash result (this is the address version byte).
Now you'll need to calculate a SHA256 hash of the leading 00 concatenated with the RIPEMD-160 hash result.
Now you'll need to calculate the SHA256 hash of the SHA256 hash that you just calculated.
The first 4 bytes of this most recent SHA256 hash is the checksum for the bitcoin address. Concatenate this checksum onto the end of the earlier 00 byte concatenated with the RIPEMD-160 result.
So you should now have a 00 byte followed by the earlier calculated RIPEMD-160 followed by a 4 byte checksum.
Convert this value to base58 and you'll have your bitcoin address.
So when i created a script with the above methods with the same private key i get the correct address but the same private key shows different addresses on online converters, bitaddress etc... I am not a programmer or cryptographer its all very confusing to me