Bitcoin Forum
October 17, 2017, 12:33:43 AM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Failed import of private key  (Read 3661 times)
ben-abuya
Sr. Member
****
Offline Offline

Activity: 323



View Profile WWW
April 13, 2013, 05:05:18 AM
 #1

I'm trying to import the private key from a Bitcoin Wallet address. The private key is as follows (don't worry, I'm deleting the address from my wallet): Kz9Eyg1rL27RnkUmmkofeyxdbWSn7ARQTdCiVKHLKxdhrMGNj

When I try to import that into my Armory wallet, I get the error message:

Quote
The private key you have entered is actually not valid for the elliptic curve used by Bitcoin (secp256k1). Almost any 64-character hex is a valid private key except for those greater than:

fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141

Please try a different private key.

This imports fine into applications such as brainwallet.org, however, and even display the correct public address. The associated public address is: 1N6TrY9HKhwS4G1AmAB1V7BjckqD7BtT2F

http://lamassubtc.com/
Lamassu Bitcoin Ventures
1508200423
Hero Member
*
Offline Offline

Posts: 1508200423

View Profile Personal Message (Offline)

Ignore
1508200423
Reply with quote  #2

1508200423
Report to moderator
1508200423
Hero Member
*
Offline Offline

Posts: 1508200423

View Profile Personal Message (Offline)

Ignore
1508200423
Reply with quote  #2

1508200423
Report to moderator
1508200423
Hero Member
*
Offline Offline

Posts: 1508200423

View Profile Personal Message (Offline)

Ignore
1508200423
Reply with quote  #2

1508200423
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1508200423
Hero Member
*
Offline Offline

Posts: 1508200423

View Profile Personal Message (Offline)

Ignore
1508200423
Reply with quote  #2

1508200423
Report to moderator
etotheipi
Legendary
*
Offline Offline

Activity: 1428


Core Armory Developer


View Profile WWW
April 13, 2013, 05:35:29 AM
 #2

It's because that's not a standard private key format.  In fact, I'm not sure what format it's in, because it's 36 bytes, and unless I did something wrong, it does not look like the last 4 bytes are a checksum.   Therefore, Armory interpretted it as a 36-byte integer, which is clearly larger than that 32-byte integer shown there.

I'm not sure what's going on with that key...

Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
ben-abuya
Sr. Member
****
Offline Offline

Activity: 323



View Profile WWW
April 13, 2013, 05:33:50 PM
 #3

It's because that's not a standard private key format.  In fact, I'm not sure what format it's in, because it's 36 bytes, and unless I did something wrong, it does not look like the last 4 bytes are a checksum.   Therefore, Armory interpretted it as a 36-byte integer, which is clearly larger than that 32-byte integer shown there.

I'm not sure what's going on with that key...

Oops, I screwed up with the copy/paste. The real private key is: Kz9Eyg1rL27RnkUmmkofeyxdbWSn7ARQTdCiVKHLKxdhrMGNjTAp
I did some more digging and this is a "private key associated with a compressed public key": "Private keys associated with compressed public keys are 52 characters and start with a capital L or K."

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

http://lamassubtc.com/
Lamassu Bitcoin Ventures
etotheipi
Legendary
*
Offline Offline

Activity: 1428


Core Armory Developer


View Profile WWW
April 13, 2013, 05:43:42 PM
 #4

Yeah, that's more like it.  38 bytes is what I expect for compressed private keys:

0x80 + 32-byte private key + 0x01 + 4-byte checksum

The 0x01 indicates it's a compressed key, and the address is computed differently.  In a way that Armory doesn't understand yet.  Another thing that will be supported in the new wallet format when it's done.

I actually have a chunk of code in the import dialog that detects you put in a compressed private key, but apparently that is malfunctioning.  I just tried it, and it gave the too-big error instead of telling you that it's a format Armory doesn't support yet.  I'll spend a couple minutes looking for that.

Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
ben-abuya
Sr. Member
****
Offline Offline

Activity: 323



View Profile WWW
April 13, 2013, 05:50:36 PM
 #5

Yeah, that's more like it.  38 bytes is what I expect for compressed private keys:

0x80 + 32-byte private key + 0x01 + 4-byte checksum

The 0x01 indicates it's a compressed key, and the address is computed differently.  In a way that Armory doesn't understand yet.  Another thing that will be supported in the new wallet format when it's done.

I actually have a chunk of code in the import dialog that detects you put in a compressed private key, but apparently that is malfunctioning.  I just tried it, and it gave the too-big error instead of telling you that it's a format Armory doesn't support yet.  I'll spend a couple minutes looking for that.

Cool. I'm looking forward to that new wallet format. Thanks for looking into this!

http://lamassubtc.com/
Lamassu Bitcoin Ventures
Voodah
Full Member
***
Offline Offline

Activity: 238



View Profile
November 20, 2013, 11:34:44 PM
 #6

Hey, I know this is old, but I'm trying to import a key created by Multibit into Armory, and it seems I have run into this same problem.

Is there a solution or workaround to import compressed keys ??
etotheipi
Legendary
*
Offline Offline

Activity: 1428


Core Armory Developer


View Profile WWW
November 20, 2013, 11:40:59 PM
 #7

Hey, I know this is old, but I'm trying to import a key created by Multibit into Armory, and it seems I have run into this same problem.

Is there a solution or workaround to import compressed keys ??

The only "workaround" is to wait for version 0.92-beta when we implement the new wallets and add native support for compressed keys.  There is just not any good ways to backport the old wallets to use them, that would be easier than just finishing the new wallet format (because there's such exhaustive testing that goes into changing wallet functionality like this, I'd prefer to just do it once).

Sorry, you'll just have to be patient!

Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
Painted_Red
Newbie
*
Offline Offline

Activity: 8


View Profile
December 12, 2014, 01:30:17 AM
 #8

I have the same problem.
I used dumpprivkey of RPC API calls
 bitcoind getnewaddress
 bitcoind dumpprivkey <address>


Quote
The private key you have entered is actually not valid for the elliptic curve used by Bitcoin (secp256k1). Almost any 64-character hex is a valid private key except for those greater than:

fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141

Please try a different private key.

bitcoind getinfo
{
    "version" : 90100,
    "protocolversion" : 70002,
    "walletversion" : 60000,
    "balance" : xxxxxxx,
    "blocks" : 333924,
    "timeoffset" : 0,
    "connections" : 3,
    "proxy" : "",
    "difficulty" : 40007470271.27126312,
    "testnet" : false,
    "keypoololdest" : 1416884277,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "errors" : ""
}

I believe you will reprodue the error
JeffZwolle
Member
**
Offline Offline

Activity: 74


View Profile WWW
March 05, 2016, 04:24:21 AM
 #9

I have run into the same problem trying to import private keys from Multibit and Blockchain.info

Other topics:
http://bitcoin.stackexchange.com/questions/24632/import-private-keys-from-multibit-into-armory
https://bitcointalk.org/index.php?topic=680355.0

"Private keys associated with compressed public keys are 52 characters and start with a capital L or K."

The ones from Multibit that fail start with an L or K.
The single one from Multibit that succeeds starts with a 5 and is probably the oldest address I have.
The ones from Blockchain.info all fail and don't start with a L or K or 5.

I could use the software from https://github.com/pointbiz/bitaddress.org to convert the compressed private key to an uncompressed one, but that would render my funds unusable. An uncompressed private key has an uncompressed public address. My funds are at the compressed public address. On the uncompressed address my funds are zero: I tested this by importing the uncompressed private key in Armory and waited for the scan to complete.
Importing the hex-version of the private address reveals yet another public address. Could be an error from bitaddress.org ?  Undecided

P.S.: There is some sort of a memory-problem in Armory: Almost all of 16GB physical memory was being taken after the rescan. Returned to normal after shutting down Armory. Another private key import gave the same problem again.

When I enter the private keys from Blockchain.info in the bitaddress.org-software I get an error saying it is not a valid private key.

I was under the impression that the combination "public address / private key" was universal in Bitcoinland. That the same keys could be used in all clients. This is not the case however.  Sad

I could transfer the funds to a new address generated in Armory. However, there is a possibility that Bitcoins will still be send to the old addresses.

Will Armory be able to import compressed private keys in the new version?

Donations are always welcome :-)
1H7vpy8AJFCxADEgx3UKivSf8vFZc6e12W
JeffZwolle
Member
**
Offline Offline

Activity: 74


View Profile WWW
November 05, 2016, 01:50:00 PM
 #10


Will Armory be able to import compressed private keys in the new version?


Can this one be added to the To-Do List?
https://btcarmory.com/contribute/armory-todo/


Donations are always welcome :-)
1H7vpy8AJFCxADEgx3UKivSf8vFZc6e12W
goatpig
Moderator
Legendary
*
Offline Offline

Activity: 1638

Armory Developer


View Profile
November 05, 2016, 02:31:19 PM
 #11


Will Armory be able to import compressed private keys in the new version?

Can this one be added to the To-Do List?
https://btcarmory.com/contribute/armory-todo/

Feel free to PR the change to the TODO list.

JeffZwolle
Member
**
Offline Offline

Activity: 74


View Profile WWW
November 10, 2016, 07:42:43 PM
 #12


Will Armory be able to import compressed private keys in the new version?

Can this one be added to the To-Do List?
https://btcarmory.com/contribute/armory-todo/

Feel free to PR the change to the TODO list.


What does "PR" mean?
There is no email-address available and I don't use IRC.

Donations are always welcome :-)
1H7vpy8AJFCxADEgx3UKivSf8vFZc6e12W
goatpig
Moderator
Legendary
*
Offline Offline

Activity: 1638

Armory Developer


View Profile
November 10, 2016, 11:30:40 PM
 #13

Pull request. The website is open source, the code is available on the gh-pages branch. If you write a patch to modify the page and PR it, I will review it and merge.

JeffZwolle
Member
**
Offline Offline

Activity: 74


View Profile WWW
November 13, 2016, 02:51:08 PM
 #14

Pull request. The website is open source, the code is available on the gh-pages branch. If you write a patch to modify the page and PR it, I will review it and merge.

So a person has to have experience in developing to be able to have something added to a To Do list?  Why?

The majority of Bitcoin-clients accepts compressed keys, while Armory does not.

I have no experience in doing a PR.
Can you or somebody else please add this item to the To Do list?

Donations are always welcome :-)
1H7vpy8AJFCxADEgx3UKivSf8vFZc6e12W
goatpig
Moderator
Legendary
*
Offline Offline

Activity: 1638

Armory Developer


View Profile
November 13, 2016, 03:36:21 PM
 #15

So a person has to have experience in developing to be able to have something added to a To Do list?  Why?

You don't need experience coding, just know how to fork a repo, modify a couple .md and create a PR. It can all be done from github's webpage, graphically.

I encourage people to PR for 2 reasons:

1) Makes the community aware that the web portal is open source and up for contributions.

2) To get users involved in the process. This is a community project now, after all.

For reference, this is what the PR looked like for this particular change:

https://github.com/goatpig/BitcoinArmory/pull/140/files

Fairly simple. You shouldn't let the lingo deter you. This is a perfect opportunity to learn a little git-fu.

JeffZwolle
Member
**
Offline Offline

Activity: 74


View Profile WWW
November 14, 2016, 05:37:13 PM
 #16

Ok, thank you.
I think I will try to do a fresh test project on github in the future, just to find out how it all functions.
I don't want to mess up your project.

Donations are always welcome :-)
1H7vpy8AJFCxADEgx3UKivSf8vFZc6e12W
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!