Author

Topic: Priv/pub key pairs I'm generating do not import correctly into wallet? [solved] (Read 1325 times)

hero member
Activity: 714
Merit: 504
^SEM img of Si wafer edge, scanned 2012-3-12.
EDIT: I thought I started with -rescan before, but I just did it again, and now it's working properly.
Awesome! Consider this solved Smiley
legendary
Activity: 1400
Merit: 1005
Subbing, for when you figure out the problem I'm interested in the final script.  Smiley
hero member
Activity: 714
Merit: 504
^SEM img of Si wafer edge, scanned 2012-3-12.
Yep, I am.

Edit: Someone on IRC just confirmed he got the same address from my private key, so that seems to work.
Then the problem would be with importing… not sure where I messed that up... *thinks
vip
Activity: 1386
Merit: 1140
The Casascius 1oz 10BTC Silver Round (w/ Gold B)
Is that convention, or does it actually show back in the wallet?

In the wallet one just stores the hex value, right? Or does that also have associated checksums and such?

The client only stores the hex value.

This might seem simple and trivial, but you're using secp256k1 right?
hero member
Activity: 714
Merit: 504
^SEM img of Si wafer edge, scanned 2012-3-12.
Is that convention, or does it actually show back in the wallet?

In the wallet one just stores the hex value, right? Or does that also have associated checksums and such?
vip
Activity: 1386
Merit: 1140
The Casascius 1oz 10BTC Silver Round (w/ Gold B)
All valid private keys in base 58 should start with a '5'.  Yours doesn't, so it is definitely not right.

When you base58 a private key, it's 0x80 + 32byteprivatekey, followed by a 4-byte checksum.

so in other words, 8079bbba8a53ae3ca15a723bd6588991863e3015a03530c09c453370045a402baeXXXXXXXX
where XXXXXXXX is first 4 bytes of sha256(sha256(8079bbba8a53ae3ca15a723bd6588991863e3015a03530c09c453370045a402bae))
hero member
Activity: 714
Merit: 504
^SEM img of Si wafer edge, scanned 2012-3-12.
EDIT: The problem does not seem to be in the generation of the keys. Probably the importing then. Scroll a few posts down for details on that…

I've been trying to generate priv/pub key pairs, and adding them to my wallet. It seemed to be working, however, when I send money to one of these, it doesn't appear back in my wallet. So either I didn't add it properly, or the keys/hashes are wrong. Can anyone check if these (example) keys and address are consistent with eachother?

Code:
Address:
17fhqnxers2WAnsKRFV2cjXENe6QX2an4e

Public key:
0494578b727fad5819f856cb862905b16575aed19551e8e6ab2d35873dd7b6bdfdca5401234a26318e47b4b6e962695ab31600e9dcfdd12573b03fcafe0d308efb

Private key base58:
9CCMrm42J1XnyVkS6c91XSSjF6L6wFcQnTHoBBkrrKTj

Private key hex:
79bbba8a53ae3ca15a723bd6588991863e3015a03530c09c453370045a402bae

Private key full hex (as it would appear in the wallet):
30820113020101042079bbba8a53ae3ca15a723bd6588991863e3015a03530c09c453370045a402baea081a53081a2020101302c06072a8648ce3d0101022100fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f300604010004010704410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8022100fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141020101a1440342000494578b727fad5819f856cb862905b16575aed19551e8e6ab2d35873dd7b6bdfdca5401234a26318e47b4b6e962695ab31600e9dcfdd12573b03fcafe0d308efb

This is probably not going to work in the newbie forum, is it? :/
Jump to: