Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: darnoq on February 23, 2021, 12:08:58 PM



Title: Corrupted private key?
Post by: darnoq on February 23, 2021, 12:08:58 PM
Hi,
In late 2013 I generated wallet most probably with www.bitaddress.org. I saved id and secret (private key?) . The address is 34 characters long and blockchain.com show it's base58 (p2pkh) format and shows some  small balance.
Now I have  secret (afaik - private key?) that is 64 characters long starts with nV... .   Bitaddress.org won't recognize this as a proper private key, nor can I import it to wallet (tried electrum). With ID I can import it but it's view only.

I'm pretty sure i copy pasted the key.

So I guess my question is am I doing something wrong? Maybe I didn't copy/paste some characters.  Is 64 char private key valid lenght? Is it possible it's not a key but some kind of hash etc. and I have to decode it first to use?

thx



Title: Re: Corrupted private key?
Post by: mocacinno on February 23, 2021, 12:12:24 PM
64 characters... Probably hexadecimal...

You can use bitaddress.org's sourcecode and run it from an OFFLINE machine, go to the last tab (wallet details), paste it there, and get the private key in WIF format.

WIF = wallet import format... It should be importable in electrum.

This being said: it's still possible you enabled bip38 encryption, in this case you'll need to enter the password in the last tab of bitaddress.org's tool.


Title: Re: Corrupted private key?
Post by: LoyceV on February 23, 2021, 12:16:05 PM
64 characters... Probably hexadecimal...
But "nV" isn't part of it, otherwise the number of characters fits indeed:
Private Key Hexadecimal (64 characters [0-9A-F]) (less common).
Example: CA9A061710B8BC582E1B8BB60D0F3F2751791888AB5C18737620087ABDF74A05


Title: Re: Corrupted private key?
Post by: BrewMaster on February 23, 2021, 12:16:41 PM
it could be possible that you have an altcoin's private key.

a bitcoin private key can be any of the following:
- 51 or 52 characters starting with 5, L or K and the base58 characters to follow
- 64 characters only characters of hexadecimal (0 to 9 and a to f).
- 44 characters only characters of base64 (0 to 9 and a to z and A to Z and + and / and =)
- 58 characters in base58 character set starting with 6P is the encrypted key using BIP38

if your key starts with "nV" and is 64 characters it doesn't fall into any of these groups.

my guess is that it is if this is a key then it is either from an altcoin wallet or it is base64 encoding of an encrypted key using a different encryption method.

ps. testnet addresses start with n (or m) so it could be nV too but their length is shorter around 30 characters.


Title: Re: Corrupted private key?
Post by: mocacinno on February 23, 2021, 12:17:29 PM
--snip--
But "nV" isn't part of it, otherwise the number of characters fits indeed:
--snip--

Oops... missed that part... You're right :)


Title: Re: Corrupted private key?
Post by: LoyceV on February 23, 2021, 12:27:03 PM
it could be possible that you have an altcoin's private key.
Unlikely:
blockchain.com show it's base58 (p2pkh) format and shows some  small balance.


Title: Re: Corrupted private key?
Post by: darnoq on February 23, 2021, 12:28:12 PM
Thanks for instant reply guys :)
I downloaded bitaddress.org for offline use and  in wallet details shows it's not a valid private key. I guess I might have used BIP38 encrypt with aditional password. How to verify that?


Title: Re: Corrupted private key?
Post by: BrewMaster on February 23, 2021, 12:37:27 PM
it could be possible that you have an altcoin's private key.
Unlikely:
blockchain.com show it's base58 (p2pkh) format and shows some  small balance.

the address is a valid bitcoin address, but it could be possible that the additional information was from another wallet like an altcoin private key written beside this bitcoin address.

I guess I might have used BIP38 encrypt with aditional password. How to verify that?

if it were then bitaddress.org would have asked you to also enter your password. and also your string would have started with 6P

here is an example and the password is "hello"
6PYPsQUESqNqtM9NMYcUBn3tKDMkF8QE8E8N4dFdp1K7tyFG1yn1jjiS9K


Title: Re: Corrupted private key?
Post by: odolvlobo on February 23, 2021, 06:31:58 PM
A private key beginning with "nV" is not a valid Bitcoin private key (at least not in any standard format).

Bitcoin private keys in the WIF format begin with "5", "L", or "K". BIP-38 private keys begin with a "6". A private key in hex format will only use the characters "0"-"9" and "a"-"f" or "A"- "F", and might begin with a "0x" that is not actually part of the key.

It may be base-64. Does it end with "=" or use the symbols "+" or "/"? Try using a base-64 decoder.


Title: Re: Corrupted private key?
Post by: decodx on February 23, 2021, 06:41:59 PM
Thanks for instant reply guys :)
I downloaded bitaddress.org for offline use and  in wallet details shows it's not a valid private key. I guess I might have used BIP38 encrypt with aditional password. How to verify that?

Can you at least confirm whether the rest of the key is in hexadecimal format or not (excluding the first two characters)?
At least that would narrow it down a little.



Title: Re: Corrupted private key?
Post by: darnoq on February 24, 2021, 01:25:24 PM
It's not HEX :(
It's alfanumeric big and small letters.  No special characters (like = / ?) 
It also doesn't have i I and 0, and O (seems it's also a distinc characteristic somewhere but that can be coincidence).
Coult it really be some altcoin? Is there some wallet that has them all and would recognize it if it's actually this?

Copying altcoin key instead of bitcoin seems like a stupid mistake but who knows  I was quite young 7 years ago.


Title: Re: Corrupted private key?
Post by: LoyceV on February 24, 2021, 03:03:51 PM
It's not HEX :(
It's alfanumeric big and small letters.  No special characters (like = / ?)
Have you tried to use it as a Brain Wallet on (offline air gapped) Bitaddress.org? Try both standard and compressed, and see if either one of them produces your Bitcoin address.


Title: Re: Corrupted private key?
Post by: darnoq on February 26, 2021, 07:30:38 PM
LoyceV there might be something in this brainwallet thingy. The address is wrong but maybe i copied without last/firs 2 digits. I've also made note "p:" instead "private key" or "secret" as it is on bitaddress. There are 3906 combinations that would meet this criteria  *2 (compressed or not). It there a script that I could feed with dictionary to check this?


Title: Re: Corrupted private key?
Post by: HCP on February 26, 2021, 10:07:14 PM
Maybe also consider trying WarpWallet: "https://keybase.io/warp/"

It was first setup in late 2013 (Around November if I'm not mistaken)... so the timing might fit? ??? It basically just takes whatever passphrase you give it (you don't need to use the salt) and it will output an address/private key.

It is "self contained", so you can download and run offline if required.


Title: Re: Corrupted private key?
Post by: LoyceV on February 27, 2021, 08:26:43 AM
There are 3906 combinations that would meet this criteria  *2 (compressed or not). It there a script that I could feed with dictionary to check this?
I think bitcoin-tool (https://github.com/matja/bitcoin-tool) can do this. Note that I'm not recommending to trust it, so I suggest to it in an offline Virtual Machine.