Post
Topic
Board Development & Technical Discussion
Merits 9 from 4 users
Re: BTC private key generates wrong address.
by
nc50lc
on 31/10/2023, 17:51:30 UTC
⭐ Merited by Welsh (5) ,Charles-Tim (2) ,vapourminer (1) ,Zaguru12 (1)
Is it possible that electrum android app uses a different architecture to generate a public address now or it had a bug that generated a wrong address for then?
If there's one major bug like that, it'll be included in the release notes: https://github.com/spesmilo/electrum/blob/master/RELEASE-NOTES
I didn't found any, but try to search thoroughly.

It's always been the same as the desktop version and using the standard algorithm Bitcoin uses: ECDSA with Secp256k1 curve.
It'll derive a "compressed" pubKey from WIF with compressed flag (your 'L' prvKey) and create a legacy address from it if a script type isn't appended before the privKey.


My assumption is the same as the other first two replies, your address may be derived from the uncompressed public key.
An alternative tool is Ian Coleman's "compression tool":  https://github.com/iancoleman/keycompression
If you're not worried about privacy, you can the web version, of course, only use your public key.
Otherwise or if the above is true, use an Air Gap machine to get the uncompressed versions of your keys/address.