Bitcoin Wallet Tool: Decrypt Help Needed

532 views
Skip to first unread message

Mark Dunne

unread,
Aug 9, 2018, 9:41:37 AM8/9/18
to bitcoinj
I am using the wallet.tool (https://github.com/bitcoin-wallet/bitcoin-wallet/blob/master/wallet/README.recover.md) on Ubuntu (novice user) to trying and decrypt and access (dump) my private keys on the UltraCoin Wallet, which uses the bitcoinj architecture, in order to access BCC. The private keys are encrypted and I have no other way to access/read them. The wallet information is stored in a com.google.bitcoin.params.MainNetParams.wallet file which, on Windows, is located in %AppData%/UltraCoin Client/ . 

When I try to execute the decrypt command; "openssl enc -d -aes-256-cbc -md md5 -a -in bitcoin-wallet-backup-testnet-2014-11-01 > bitcoin-wallet-decrypted-backup" it fails as the "bitcoin-wallet-backup-testnet-2014-11-01" doesn't exist on my computer. Can I amend some of the command to suit my com.google... file and if so how, exactly?

Andreas Schildbach

unread,
Aug 12, 2018, 3:37:19 PM8/12/18
to bitc...@googlegroups.com
Assuming that "Ultracoin Wallet" is a fork of "Bitcoin Wallet", your
first step is creating a backup file: Options > Safety > Backup wallet.
That's the file you're missing.
> --
> You received this message because you are subscribed to the Google
> Groups "bitcoinj" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to bitcoinj+u...@googlegroups.com
> <mailto:bitcoinj+u...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.


Mark Dunne

unread,
Aug 12, 2018, 4:48:30 PM8/12/18
to bitcoinj
Thank you very much for your response.

A developer from the team that produced the UltraCoin Client wallet in 2014 advised me that it "uses bitcoinj" and advised me to refer to the wallet-tool, which you also referred me to (and coded, also, fair play to you!) but it has very little functionality: There is no Options > Safety > Backup wallet. You can send, receive bitcoin and make trades using smart contracts. I only ever used it to receive and store the few bitcoin that I bought. I knew very little except that the idea of a maths-based digital currency was fascinating!

Am I screwed? Did I back the wrong horse?!? I could send you the UltraCoin Client executable file, if that's of any use or interest. 

I'm sure you have far more interesting and worthwhile projects to be working on but I really, really appreciate any advice you can give.

thanks you

Mark

Andreas Schildbach

unread,
Aug 12, 2018, 7:05:33 PM8/12/18
to bitc...@googlegroups.com
Ah, it isn't even an Android app. Then you should be able to copy the
wallet file and use it directly with wallet-tool. No need for the
decrypt step in this case.


On 08/12/2018 10:48 PM, Mark Dunne wrote:
> Thank you very much for your response.
>
> A developer from the team that produced the UltraCoin Client wallet in
> 2014 advised me that it "uses bitcoinj" and advised me to refer to the
> wallet-tool, which you also referred me to (and coded, also, fair play
> to you!) but it has very little functionality: There is no Options >
> Safety > Backup wallet. You can send, receive bitcoin and make trades
> using smart contracts. I only ever used it to receive and store the few
> bitcoin that I bought. I knew very little except that the idea of a
> maths-based digital currency was fascinating!
>
> Am I screwed? Did I back the wrong horse?!? I could send you the
> UltraCoin Client executable file, if that's of any use or interest. 
>
> I'm sure you have far more interesting and worthwhile projects to be
> working on but I really, really appreciate any advice you can give.
>
> thanks you
>
> Mark
>
> On Sunday, August 12, 2018 at 8:37:19 PM UTC+1, Andreas Schildbach wrote:
>
> Assuming that "Ultracoin Wallet" is a fork of "Bitcoin Wallet", your
> first step is creating a backup file: Options > Safety > Backup wallet.
> That's the file you're missing.
>
>
> On 08/09/2018 03:41 PM, Mark Dunne wrote:
> > I am using the
> >
> wallet.tool (https://github.com/bitcoin-wallet/bitcoin-wallet/blob/master/wallet/README.recover.md
> <https://github.com/bitcoin-wallet/bitcoin-wallet/blob/master/wallet/README.recover.md>) on
> <https://groups.google.com/d/optout>.

Mark Dunne

unread,
Aug 13, 2018, 4:02:05 AM8/13/18
to bitc...@googlegroups.com
Ok, thanks. I've installed the wallet tool and used
cd bitcoinj/tools
./wallet-tool                but got a few errors...

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project bitcoinj-core: Compilation failure
[ERROR] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/store/WindowsMMapHack.java:[34,9] cannot find symbol
[ERROR]   symbol:   class Cleaner
[ERROR]   location: class org.bitcoinj.store.WindowsMMapHack
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :bitcoinj-core

I don't know if they're serious!

If they are not, may I ask (please) should I jump to

./wallet-tool dump --wallet=/tmp/bitcoin-wallet-decrypted-backup --dump-privkeys

and if so should I change the "bitcoin-wallet-decrypted-backup" to some version of "com.google.bitcoin.params.MainNetParams.wallet" to suit my setup, do you think?

Its the private keys I'm after but the dump tool looks as though it assumes I've created a backup in the way you originally suggested

thanks,

Mark

You received this message because you are subscribed to a topic in the Google Groups "bitcoinj" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bitcoinj/fM3WD125vmU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bitcoinj+u...@googlegroups.com.

Mark Dunne

unread,
Aug 13, 2018, 9:10:33 AM8/13/18
to bitc...@googlegroups.com
Thanks. I've tried to install the wallet tool but there was an error so I couldn't complete it. Naturally, if you have any suggestions how I can fix the situation, please, please advise...

Here is the full response when I tried to install and check the wallet tool...

marco@marco-Lenovo-ideapad-120S-11IAP:~$ cd bitcoinj/tools
marco@marco-Lenovo-ideapad-120S-11IAP:~/bitcoinj/tools$ ./wallet-tool
Compiling WalletTool to a JAR
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 5 modules...
[INFO] Installing Nexus Staging features:
[INFO]   ... total of 5 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[WARNING] The project org.bitcoinj:bitcoinj-parent:pom:0.14.7 uses prerequisites which is only intended for maven-plugin projects but not for non maven-plugin projects. For such purposes you should use the maven-enforcer-plugin. See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] bitcoinj Parent
[INFO] bitcoinj
[INFO] bitcoinj Examples
[INFO] bitcoinj Tools
[INFO] bitcoinj Wallet-Template
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building bitcoinj Parent 0.14.7
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ bitcoinj-parent ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building bitcoinj 0.14.7
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ bitcoinj-core ---
[INFO]
[INFO] --- jacoco-maven-plugin:0.7.5.201505241946:prepare-agent (pre-unit-test) @ bitcoinj-core ---
[INFO] surefireArgLine set to -javaagent:/home/marco/.m2/repository/org/jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946-runtime.jar=destfile=/home/marco/bitcoinj/core/target/coverage-reports/jacoco.exec,excludes=**/Protos*.class:org/bitcoinj/jni/*:org/bitcoin/*
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ bitcoinj-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ bitcoinj-core ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 287 source files to /home/marco/bitcoinj/core/target/classes
[INFO] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/core/Peer.java: Some input files use unchecked or unsafe operations.
[INFO] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/core/Peer.java: Recompile with -Xlint:unchecked for details.
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING :
[INFO] -------------------------------------------------------------
[WARNING] bootstrap class path not set in conjunction with -source 6
[WARNING] source value 6 is obsolete and will be removed in a future release
[WARNING] target value 1.6 is obsolete and will be removed in a future release
[WARNING] To suppress warnings about obsolete options, use -Xlint:-options.
[WARNING] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/wallet/Wallet.java:[72,37] org.bitcoinj.wallet.listeners.WalletEventListener in org.bitcoinj.wallet.listeners has been deprecated
[WARNING] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/jni/NativeWalletEventListener.java:[24,37] org.bitcoinj.wallet.listeners.WalletEventListener in org.bitcoinj.wallet.listeners has been deprecated
[WARNING] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/wallet/Wallet.java:[2507,34] org.bitcoinj.wallet.listeners.WalletEventListener in org.bitcoinj.wallet.listeners has been deprecated
[WARNING] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/wallet/Wallet.java:[4052,40] correctlySpends(org.bitcoinj.core.Transaction,long,org.bitcoinj.script.Script) in org.bitcoinj.script.Script has been deprecated
[WARNING] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/script/Script.java:[536,62] decodeFromBitcoin(byte[],boolean) in org.bitcoinj.crypto.TransactionSignature has been deprecated
[WARNING] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/script/Script.java:[1527,64] decodeFromBitcoin(byte[],boolean) in org.bitcoinj.crypto.TransactionSignature has been deprecated
[WARNING] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/core/ECKey.java:[234,30] createPoint(java.math.BigInteger,java.math.BigInteger,boolean) in org.spongycastle.math.ec.ECCurve has been deprecated
[WARNING] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/core/PeerAddress.java:[74,73] ChildMessage() in org.bitcoinj.core.ChildMessage has been deprecated
[WARNING] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/core/PeerAddress.java:[135,51] ChildMessage() in org.bitcoinj.core.ChildMessage has been deprecated
[WARNING] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/core/TransactionInput.java:[431,23] correctlySpends(org.bitcoinj.core.Transaction,long,org.bitcoinj.script.Script) in org.bitcoinj.script.Script has been deprecated
[WARNING] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelServerState.java:[242,62] decodeFromBitcoin(byte[],boolean) in org.bitcoinj.crypto.TransactionSignature has been deprecated
[WARNING] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/utils/BtcFormat.java:[1287,45] ROUND_HALF_UP in java.math.BigDecimal has been deprecated
[WARNING] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/utils/BtcFormat.java:[1286,85] setScale(int,int) in java.math.BigDecimal has been deprecated
[WARNING] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/signers/CustomTransactionSigner.java:[71,36] correctlySpends(org.bitcoinj.core.Transaction,long,org.bitcoinj.script.Script) in org.bitcoinj.script.Script has been deprecated
[WARNING] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/crypto/LinuxSecureRandom.java:[35,13] Provider(java.lang.String,double,java.lang.String) in java.security.Provider has been deprecated
[WARNING] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/core/listeners/DownloadProgressTracker.java:[39,46] org.bitcoinj.core.listeners.AbstractPeerDataEventListener in org.bitcoinj.core.listeners has been deprecated
[WARNING] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/wallet/WalletProtobufSerializer.java:[540,74] newInstance() in java.lang.Class has been deprecated
[WARNING] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelV1ClientState.java:[231,61] decodeFromBitcoin(byte[],boolean) in org.bitcoinj.crypto.TransactionSignature has been deprecated
[WARNING] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/jni/NativePeerEventListener.java:[31,49] org.bitcoinj.core.listeners.PeerConnectionEventListener in org.bitcoinj.core.listeners has been deprecated
[WARNING] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/store/WindowsMMapHack.java:[34,29] sun.nio.ch.DirectBuffer is internal proprietary API and may be removed in a future release
[WARNING] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/jni/NativeWalletEventListener.java:[33,51] org.bitcoinj.wallet.listeners.WalletEventListener in org.bitcoinj.wallet.listeners has been deprecated
[WARNING] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClient.java:[723,29] sameThreadExecutor() in com.google.common.util.concurrent.MoreExecutors has been deprecated
[INFO] 26 warnings
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------

[ERROR] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/store/WindowsMMapHack.java:[34,9] cannot find symbol
  symbol:   class Cleaner
  location: class org.bitcoinj.store.WindowsMMapHack
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] bitcoinj Parent .................................... SUCCESS [  0.610 s]
[INFO] bitcoinj ........................................... FAILURE [ 25.893 s]
[INFO] bitcoinj Examples .................................. SKIPPED
[INFO] bitcoinj Tools ..................................... SKIPPED
[INFO] bitcoinj Wallet-Template ........................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 29.291 s
[INFO] Finished at: 2018-08-13T13:44:30+01:00
[INFO] Final Memory: 27M/97M
[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project bitcoinj-core: Compilation failure
[ERROR] /home/marco/bitcoinj/core/src/main/java/org/bitcoinj/store/WindowsMMapHack.java:[34,9] cannot find symbol
[ERROR]   symbol:   class Cleaner
[ERROR]   location: class org.bitcoinj.store.WindowsMMapHack
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :bitcoinj-core
marco@marco-Lenovo-ideapad-120S-11IAP:~/bitcoinj/tools$

thanks,

mark

Mark Dunne

unread,
Aug 16, 2018, 5:34:05 AM8/16/18
to bitcoinj
Hi Andreas and colleagues,

Could you, please, advise if you see any reason for the problem (below) I encountered while trying to run the wallet tool application?

Thanks v much,

Mark

Mark Dunne

unread,
Aug 19, 2018, 3:03:37 PM8/19/18
to bitcoinj
I did it; I figured out how to get your wallet tool to dump my private keys. Thank you for your advice and for making the (wonderful) wallet tool available.

Cheers,

Mark

Bradley Keong

unread,
Aug 29, 2018, 10:14:31 AM8/29/18
to bitcoinj
I get this too, How to solve?

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/bwadbwad/bitcoinj/core/src/main/java/org/bitcoinj/store/WindowsMMapHack.java:[34,9] cannot find symbol
  symbol:   class Cleaner
  location: class org.bitcoinj.store.WindowsMMapHack
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] bitcoinj Parent .................................... SUCCESS [  3.074 s]
[INFO] bitcoinj ........................................... FAILURE [ 36.311 s]
[INFO] bitcoinj Examples .................................. SKIPPED
[INFO] bitcoinj Tools ..................................... SKIPPED
[INFO] bitcoinj Wallet-Template ........................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 47.139 s
[INFO] Finished at: 2018-08-29T14:00:42Z
[INFO] Final Memory: 26M/94M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project bitcoinj-core: Compilation failure
[ERROR] /home/bwadbwad/bitcoinj/core/src/main/java/org/bitcoinj/store/WindowsMMapHack.java:[34,9] cannot find symbol
[ERROR]   symbol:   class Cleaner
[ERROR]   location: class org.bitcoinj.store.WindowsMMapHack
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :bitcoinj-core


Thanks,
Bradley

Jen

unread,
Sep 6, 2018, 4:54:55 AM9/6/18
to bitcoinj
its most likely an issue with your jdk, try changing your jdk to a recommend version. i had this issue before, changing to 1.8_151, 152 was buggy for me. but this depends on your branch of master too.

its an access restriction on the class, well it was in my case. im not a dev for bitcoinj but saw this and figured it may help.

Bradley Keong

unread,
Sep 6, 2018, 4:58:04 AM9/6/18
to bitc...@googlegroups.com
Hi there,

Thanks so much for that. I actually got it done couple days ago with that way you mentioned.

Thanks again for reaching out!


On Thu, 6 Sep 2018 at 6:54 pm, Jen <draku...@gmail.com> wrote:
its most likely an issue with your jdk, try changing your jdk to a recommend version. i had this issue before, changing to 1.8_151, 152 was buggy for me. but this depends on your branch of master too.

its an access restriction on the class, well it was in my case. im not a dev for bitcoinj but saw this and figured it may help.

--
You received this message because you are subscribed to the Google Groups "bitcoinj" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bitcoinj+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages