Bitcoin Forum
July 16, 2024, 02:43:12 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Bitcoin Technical Support / Re: Wallet Import Issue on: May 28, 2023, 04:20:33 PM
Try this tool: https://iancoleman.io/bitcoin-key-compression/  Use it offline (obviously)

It will give you the address of the compressed and uncompressed key. Is the uncompressed address that is showing when you are importing it?

This should give him the same results as Bitaddress, which according to his previous post, is giving him incorrect addresses.

Yup that's correct Sad

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
2  Bitcoin / Bitcoin Technical Support / Re: Wallet Import Issue on: May 28, 2023, 03:46:56 PM
Try this tool: https://iancoleman.io/bitcoin-key-compression/  Use it offline (obviously)

It will give you the address of the compressed and uncompressed key. Is the uncompressed address that is showing when you are importing it?

This should give him the same results as Bitaddress, which according to his previous post, is giving him incorrect addresses.

Yup that's correct Sad
3  Bitcoin / Bitcoin Technical Support / Re: Wallet Import Issue on: May 28, 2023, 02:20:01 PM
1) Where / how did you generate those keys?

2) What software did you create them with?
2a) Do you still have access to it?

3) Are you sure the addresses you have for them are accurate?

4) Did you check a block explorer to make sure there are funds in them?

5) You said 1 key started with an L but you put K for both, just a typo?

Just easier if we have more info all at once as opposed to everyone asking 1 question at a time.

-Dave



Yes the funds are still showing up on blockchain explorer,
Yes i am sorry i meant it was in that K and L format called Compressed WIF with both my private keys starting with K
4  Bitcoin / Bitcoin Technical Support / Re: Wallet Import Issue on: May 28, 2023, 01:58:11 PM
Which wallet did you use to generate these private keys? You said you tried importing to Bitaddress, were both generated addresses incorrect?

It really looks like you've saved the wrong private keys/addresses combination.

I guess i used a python script from github way back in 2017-18 to generate address and keys, when i check the private keys on  bitaddress it shows wrong for both. So what i did was i took a script from chatgpt yesterday to convert compressed wif to bitcoin coin address with a method i saw in one of the topics it gives the correct address. Yes i remember it saving for the correct addresses.
5  Bitcoin / Bitcoin Technical Support / Wallet Import Issue on: May 28, 2023, 12:43:45 PM
I had saved 2 private keys starting with K and L respectively which is a 52 characters key along with address some small balances of 0.01 and 0.006 thought i lost them luckily it was saved in my gdrive in a notepad But when i import the key to a electrum or other wallets it shows a different address and not able to access the address with which it was generated for, even tried bitaddress and other sites offline but it shows different address, when I try to use a python script it gives a another new address . Not sure what is the issue please help. So the key i have is in compressed wif format. As i remember taking the private key and the address correctly on a notepad before reinstalling windows few years back.

Key 1 - Ky............
Key 2 - Kz............
Original address to Key 1 - 15W....
Original address to Key 2 - 16Q...
import results on wallets- 1JkZLnm ( Incorrect) 12BtFD (Incorrect)
Python scripts generate - 12BtFDzzSJ9J6PMtpgNq2txazTpiQsx2n2 and 1JkZLnmFfpVFLT2ZMtKzc6BuXMdmY41EHA ( Incorrect)

got laid off recently, any advice would really help as running short on expenses this could really help me for couple of weeks. Sad
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!