Welcome Anonymous !

Login or Register

Search

User Menu

Login

AuroraSpjall

The official Auroracoin discussion board

Can't import private key from Android app into auroracoin-qt

Fyrir aðstoð eða upplýsingar varðandi Auroracoin
- For help and questions regarding Auroracoin

by taehul » 15 Apr 2016 11:02

I have extracted my private key from the old Android app that I still had installed. The key is 53 characters long and begins with "P". If I do importprivkey in auroracoin-qt, I get an "invalid private key encoding" error. Any thoughts as to why this happens?

Someone having a similar problem here: https://bitcointalk.org/index.php?topic=1433025.0
taehul
Newbie
 
Posts: 11
Joined: 15 Apr 2016 10:59

by Skarfurinn » 15 Apr 2016 14:23

Hey taehul!

I'm maybe not the best one here to answer this but I did some digging and it seems the backup is encrypted with AES encryption. I don't think there is any simple solution to this but it's likely that this command would help. You would need openssl installed on your machine to execute this and I'm not sure the command would be the same on Windows.

Code: Select all
openssl enc -d -aes-256-cbc -a -in <filename>

You can get more info about this here:
https://github.com/JoiBlumen/Auroracoin ... let/README
The link above is to a Github repo that is most likely the one that your old wallet was built from.

https://github.com/bitcoin-wallet/bitco ... ME.recover
This link is from the current original Android wallet that the old Auroracoin wallet was based on. It has a bit more info on the matter.

Hope this help but if you get stuck, don't hesitate to reach out to us for further help.
I would have written a shorter letter, but I did not have the time. - Blaise Pascal
User avatar
Skarfurinn
Dev team
 
Posts: 228
Joined: 04 Dec 2014 22:30
Location: Reykjavík, Iceland

by taehul » 15 Apr 2016 14:36

Hi, thanks for the response. I have already done this part. I pulled the encrypted file off the phone and decrypted it with OpenSSL. The resulting file is a list of private keys (1 in this case). It looks something like this:

Code: Select all
# KEEP YOUR PRIVATE KEYS SAFE! Anyone who can read this can spend your Bitcoins.
PTaXC0sf82034309812bjlkJ3jlkjxncd123FJOG8rlkj3kkj32v 2014-09-26T19:11:15Z


The above, of course, is a fake private key. The instructions I've found so far across the internet are basically: pull the backup file off the phone, decrypt it with OpenSSL, then run importprivkey with the resulting key(s). Unfortunately, this gives the error described in the original post. I've also tried converting the key into hex and back and some other similar things, but that didn't work either unforuntately.
taehul
Newbie
 
Posts: 11
Joined: 15 Apr 2016 10:59

by Skarfurinn » 15 Apr 2016 15:37

taehul wrote:Hi, thanks for the response. I have already done this part. I pulled the encrypted file off the phone and decrypted it with OpenSSL. The resulting file is a list of private keys (1 in this case). It looks something like this:

Code: Select all
# KEEP YOUR PRIVATE KEYS SAFE! Anyone who can read this can spend your Bitcoins.
PTaXC0sf82034309812bjlkJ3jlkjxncd123FJOG8rlkj3kkj32v 2014-09-26T19:11:15Z


The above, of course, is a fake private key. The instructions I've found so far across the internet are basically: pull the backup file off the phone, decrypt it with OpenSSL, then run importprivkey with the resulting key(s). Unfortunately, this gives the error described in the original post. I've also tried converting the key into hex and back and some other similar things, but that didn't work either unforuntately.


Sorry missed that link in your post.

I think your key might be WIF 52 character Base58 compressed.
Proposed in BIP 38 https://github.com/bitcoin/bips/blob/ma ... .mediawiki

https://en.bitcoin.it/wiki/Wallet_import_format

I don't have time at the moment to check this further but some of the other guys are looking into the matter.
I would have written a shorter letter, but I did not have the time. - Blaise Pascal
User avatar
Skarfurinn
Dev team
 
Posts: 228
Joined: 04 Dec 2014 22:30
Location: Reykjavík, Iceland

by taehul » 15 Apr 2016 16:24

Skarfurinn wrote:Sorry missed that link in your post.

I think your key might be WIF 52 character Base58 compressed.
Proposed in BIP 38 https://github.com/bitcoin/bips/blob/ma ... .mediawiki

https://en.bitcoin.it/wiki/Wallet_import_format

I don't have time at the moment to check this further but some of the other guys are looking into the matter.


Yeah, everything I can find says that it's in WIF. And apparently that should just be directly importable. Somehow it isn't though. Thanks for letting me know that some people are looking at it. Later today I can also try an older backup that was made closer to the original date I made the key (though I'm pretty sure I don't remember the password).

One useful bit of information: When converting the key back into hex, it does not have 0x80 at the start. Instead, it's 0x90. Perhaps that's an intentional choice by the Auroracoin developers, but maybe it's relevant.
taehul
Newbie
 
Posts: 11
Joined: 15 Apr 2016 10:59

by BioMike » 15 Apr 2016 21:28

Hi taehul,

I've been looking into this since this afternoon. The example you gave earlier, is that a real generated "false" key, or just some bogus data? It contains an "O", which is an invalid character for Base58.

As for the 0x90 instead of the 0x80 in the start, I'm not sure where that came from, but it is an unneeded prefix for the type of key as stated in https://en.bitcoin.it/wiki/Wallet_import_format (WIF to private key, point 4).

What I would do, is make a backup from your auroracoin-qt wallet (wallet software shut down) and follow the steps in the link above to generate the private key and try to import that. See if the transactions show up (or you'll have to rescan the block chain to show them up).

Please let me know how that goes and document the steps.
User avatar
BioMike
Dev team
 
Posts: 117
Joined: 31 Mar 2015 18:38
Location: Voorburg, The Netherlands

by taehul » 15 Apr 2016 21:50

BioMike wrote:Hi taehul,

I've been looking into this since this afternoon. The example you gave earlier, is that a real generated "false" key, or just some bogus data? It contains an "O", which is an invalid character for Base58.

As for the 0x90 instead of the 0x80 in the start, I'm not sure where that came from, but it is an unneeded prefix for the type of key as stated in https://en.bitcoin.it/wiki/Wallet_import_format (WIF to private key, point 4).

What I would do, is make a backup from your auroracoin-qt wallet (wallet software shut down) and follow the steps in the link above to generate the private key and try to import that. See if the transactions show up (or you'll have to rescan the block chain to show them up).

Please let me know how that goes and document the steps.


I will try this, probably some time tomorrow. The key pasted in this thread is completely bogus, and was just meant as an example of what the decrypted file from the phone looks like. Tomorrow I will also generate a new private key from the Android app and try importing that. And that key I can paste since it isn't tied to anything.
taehul
Newbie
 
Posts: 11
Joined: 15 Apr 2016 10:59

by taehul » 16 Apr 2016 00:52

BioMike wrote:Hi taehul,

I've been looking into this since this afternoon. The example you gave earlier, is that a real generated "false" key, or just some bogus data? It contains an "O", which is an invalid character for Base58.

As for the 0x90 instead of the 0x80 in the start, I'm not sure where that came from, but it is an unneeded prefix for the type of key as stated in https://en.bitcoin.it/wiki/Wallet_import_format (WIF to private key, point 4).

What I would do, is make a backup from your auroracoin-qt wallet (wallet software shut down) and follow the steps in the link above to generate the private key and try to import that. See if the transactions show up (or you'll have to rescan the block chain to show them up).

Please let me know how that goes and document the steps.


Here are some preliminary results. I have not done any backing up of auroracoin-qt's wallet, but I did generate a new test private key on the Android app. The key it generated is "PUzuKkzGYTQUj2WHPkQAfcquf9H4p2KNNuM6MM9uir8QNATrNS5w". The decoded hex version of this is "97FBEA310C3B4299A5DB6561DFB7A25F0D754B6B905B3C77A8F84DBFC8F0DF10BD0177B58EFA". The current auroracoin-qt does not accept these. I do notice that any keys generated by the current auroracoin-qt tend to start with "T" in Base58 format, and when decoded their hex representation begins with a "B".
taehul
Newbie
 
Posts: 11
Joined: 15 Apr 2016 10:59

by taehul » 16 Apr 2016 11:29

Some more information: The app installed on my phone is de.schildbach.wallet_aur. This was located at https://play.google.com/store/apps/deta ... wallet_aur but has since vanished off the Play Store. It is indeed the repository linked in your previous post.

Our friend in the thread at BitcoinTalk has some updates too: https://bitcointalk.org/index.php?topic=1433025.0

His latest update:
Seems Aurora android wallet produces WIF format key which, as I read may be 51/52/53 chars long. Any advice?

Or, does any android wallet contains file named wallet.dat as usual version linux/ windows based?


Latest response to his post:
Ok so it seems your backup file is still in the old (pre May 2014) format. Yes I think you should ask the Auroracoin people. In the Bitcoin world, you can import those WIF keys into Bitcoin Core with importprivkeys.
taehul
Newbie
 
Posts: 11
Joined: 15 Apr 2016 10:59

by BioMike » 16 Apr 2016 16:02

That wallet was not made by us, but by independent developers, so we're reverse engineering this as well.

I'll have a look to see if I can import it myself with your test key.
I also understood that one of my dev-colleagues has one of his people working on an update for the android schildbach wallet. If he would succeed in that you could access your coins from your mobile wallet again.
User avatar
BioMike
Dev team
 
Posts: 117
Joined: 31 Mar 2015 18:38
Location: Voorburg, The Netherlands

by BioMike » 17 Apr 2016 16:31

I'm occupied with IRL things for the next few days (trying to pass an exam), so don't have time to look further into it until then. I asked some co-devs to look into this as well in the mean time.
User avatar
BioMike
Dev team
 
Posts: 117
Joined: 31 Mar 2015 18:38
Location: Voorburg, The Netherlands

by taehul » 18 Apr 2016 11:02

Hi, that's fine. No rush.
taehul
Newbie
 
Posts: 11
Joined: 15 Apr 2016 10:59

by ny2cafuse » 18 Apr 2016 17:28

We've identified the issue in the wallet that was preventing the import of private keys. We're testing a patch as we speak, and hopefully we'll have it pushed out within the week.

-Fuse
ny2cafuse
Lurker
 
Posts: 4
Joined: 04 May 2015 15:27

by taehul » 19 Apr 2016 08:34

That's good news. Will the patch be to auroracoin-qt or to the Android app?
taehul
Newbie
 
Posts: 11
Joined: 15 Apr 2016 10:59

by Skarfurinn » 19 Apr 2016 09:46

taehul wrote:That's good news. Will the patch be to auroracoin-qt or to the Android app?


It will be to the Qt wallet but we are also working on a new Schildbach Android app but we don't have an E.T.A. at the moment.
I would have written a shorter letter, but I did not have the time. - Blaise Pascal
User avatar
Skarfurinn
Dev team
 
Posts: 228
Joined: 04 Dec 2014 22:30
Location: Reykjavík, Iceland

by taehul » 26 Apr 2016 10:13

Any updates on this?
taehul
Newbie
 
Posts: 11
Joined: 15 Apr 2016 10:59

by BioMike » 27 Apr 2016 22:03

According to one of our devs it is not possible to import the keys from the Schildbach wallet directly into the auroracoin wallet. He is having a colleague to make a tool to achieve this, he would check tomorrow with him on the status of that.

We also found that the wallet contained a bug to import private keys (from paper wallets) with the latest wallet software. This has been fixed (currently in the development branch of the github repo) and new binaries are prepared.
User avatar
BioMike
Dev team
 
Posts: 117
Joined: 31 Mar 2015 18:38
Location: Voorburg, The Netherlands

by taehul » 28 Apr 2016 10:41

Good to know. If you have a simple little script or something that can convert the keys, I'd take it. Or describe the algorithm would also be fine. Otherwise I will just wait patiently. :)
taehul
Newbie
 
Posts: 11
Joined: 15 Apr 2016 10:59

by kizi86 » 05 May 2016 12:38

I too have that problem, have my auroracoins stuck in the android app wallet, and it cant connect to any1 so i cant send my coins to my new wallet, and i cant import the private keys to my new wallet as they don't match the new coding..
kizi86
Lurker
 
Posts: 1
Joined: 04 May 2016 21:26

by BioMike » 10 May 2016 21:36

It seems we did a f*ckup to provide the bugfix packages (found out just yesterday). The code used to provide the fix was the unfixed code. :roll:

I will push the fix also to the master branch and build new packages on Friday, so they should be available at the end of the day.
User avatar
BioMike
Dev team
 
Posts: 117
Joined: 31 Mar 2015 18:38
Location: Voorburg, The Netherlands

Next

Return to Hjálp (Support)

cron