Bitcoin Forum
May 02, 2024, 10:31:33 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2] 3 4 5 6 »  All
  Print  
Author Topic: .05BTC (~$1,700) to whoever helps me successfully extract my BTC from CLI wallet  (Read 1802 times)
bitcoinforktech
Jr. Member
*
Offline Offline

Activity: 32
Merit: 4


View Profile WWW
January 05, 2021, 05:22:24 AM
 #21

https://ibb.co/xfV3BBR
Code:
Are you sure you can/cannot convert the key to WIF or somesuch and import it?

Maybe I can, I'm just not very technical.

I also have Parallels, so maybe I can also try installing on Windows or Ubuntu.

It looks like the key as you have described can't easily be exported as a WIF.

I would try Ubuntu rather than Windows for this, if you need to use Parallels.  Windows is a huge pain.

We should be able to do this on Mac with brew.  Fingers crossed those compile issues will get fixed.
1714689093
Hero Member
*
Offline Offline

Posts: 1714689093

View Profile Personal Message (Offline)

Ignore
1714689093
Reply with quote  #2

1714689093
Report to moderator
1714689093
Hero Member
*
Offline Offline

Posts: 1714689093

View Profile Personal Message (Offline)

Ignore
1714689093
Reply with quote  #2

1714689093
Report to moderator
Bitcoin addresses contain a checksum, so it is very unlikely that mistyping an address will cause you to lose money.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714689093
Hero Member
*
Offline Offline

Posts: 1714689093

View Profile Personal Message (Offline)

Ignore
1714689093
Reply with quote  #2

1714689093
Report to moderator
coin790
Jr. Member
*
Offline Offline

Activity: 47
Merit: 1


View Profile
January 05, 2021, 07:56:24 AM
 #22

try this download the cli blockstack 0.18.0.10/
instructions for installing a tar.gz file.
https://drive.google.com/file/d/1Rmm9Qq-SdNnAQHieCQjT-EwJbpQNW3-0/view?usp=sharing
NotATether
Legendary
*
Offline Offline

Activity: 1596
Merit: 6723


bitcoincleanup.com / bitmixlist.org


View Profile WWW
January 05, 2021, 09:11:58 AM
Last edit: January 05, 2021, 09:43:47 AM by NotATether
Merited by ABCbits (1)
 #23

It looks to me like you need the openssl libraries.  Normally I would 'sudo apt install libssl-dev' and you should be able to do a similar thing with brew. brew install openssl or brew install openssl@1.1.

Try this:

brew install openssl@1.1
cp /usr/local/opt/openssl@1.1/lib/pkgconfig/*.pc /usr/local/lib/pkgconfig/

Hopefully that will help move things along.

bitcoinforktech is correct, you are missing the OpenSSL library on Mac which is why the pip installation fails with "cannot find <openssl/aes.h>" (last image). You need to use brew to install it.

If you don't currently have brew, you can install it using:

Code:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"


Are you sure you can/cannot convert the key to WIF or somesuch and import it?

He said his private key is 66 characters long and begins with ef, while bitcoin private keys are supposed to be 64 hex characters long. It is already out of range of a valid private key:

0x1 to 0xFFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 5E8C D036 4140

The blockstack JSON he posted suggests that this could be a master private key, but those are also 64 hex characters long and begin with xprv, but this hex number doesn't have either of these properties.


You are getting permission denied because you aren't running brew as Administrator, try running the brew install command with sudo.


@21XO, I think I asked you in your other thread what kind of address is this private key for, but I never got an answer AFAIK. Are you trying to recover a legacy address, or a segwit address?

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
PawGo
Legendary
*
Offline Offline

Activity: 952
Merit: 1367


View Profile
January 05, 2021, 09:16:54 AM
Last edit: January 05, 2021, 02:22:32 PM by PawGo
Merited by ABCbits (1)
 #24

It was already discussed before. He has 66 characters because the last ones are 01 indicating compressed address.
He may convert his private key to WIF and import into any wallet like Electrum using for example this page https://learnmeabitcoin.com/technical/wif (and keeping some safety measures, like being offline etc).
The question is if he has his REAL key or encrypted. If it is real, the migration is easy and could be done in 1 minute. If it is encrypted he needs the program which is able to decrypt it - in this case the old version of blockstack.
NotATether
Legendary
*
Offline Offline

Activity: 1596
Merit: 6723


bitcoincleanup.com / bitmixlist.org


View Profile WWW
January 05, 2021, 09:30:52 AM
Last edit: January 05, 2021, 09:49:01 AM by NotATether
 #25

It was already discussed before. He has 66 characters because the last ones are 01 indicating compressed address.
He may convert his private key to WIF and import into any wallet like Electrum using for example this page https://learnmeabitcoin.com/technical/wif (and keeping some safety measures, like being offline etc).
The question is if he has his REAL key or encrypted. If it is real, the migration is easy and could be done in 1 minute. If is encrypted he need the program which is able to decrypt it - in this case the old version of blockstack.

So to be clear, according to that link you posted, the "ef" at the beginning is also bytes in the private key, since it's got to be 256-bit (and "01" is not part of the key)? They also have an example where they have a private key beginning with "ef" but has a prefix of "80" indicating mainnet that's put before the private key. I just want to make sure we're not dealing with a testnet private key since "ef" is also the prefix of testnet. My bad, testnet prefix is actually fe and somehow I thought it was ef.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
PawGo
Legendary
*
Offline Offline

Activity: 952
Merit: 1367


View Profile
January 05, 2021, 09:35:10 AM
 #26

It was already discussed before. He has 66 characters because the last ones are 01 indicating compressed address.
He may convert his private key to WIF and import into any wallet like Electrum using for example this page https://learnmeabitcoin.com/technical/wif (and keeping some safety measures, like being offline etc).
The question is if he has his REAL key or encrypted. If it is real, the migration is easy and could be done in 1 minute. If is encrypted he need the program which is able to decrypt it - in this case the old version of blockstack.

So to be clear, according to that link you posted, the "ef" at the beginning is also bytes in the private key, since it's got to be 256-bit (and "01" is not part of the key)? They also have an example where they have a private key beginning with "ef" but has a prefix of "80" indicating mainnet that's put before the private key. I just want to make sure we're not dealing with a testnet private key since "ef" is also the prefix of testnet.

Take a look at comment https://bitcointalk.org/index.php?topic=5306458.msg56017277#msg56017277
If key for testnet starts not with "ef" and used on learnmeabitcoin page generates this same WIF for testnet like in comment I would like to believe that it is just a coincidence and (I hope) OP has a key for real network.
21XO (OP)
Jr. Member
*
Offline Offline

Activity: 57
Merit: 29


View Profile
January 06, 2021, 02:22:53 AM
 #27

Please try

sudo cp /usr/local/opt/openssl@1.1/lib/pkgconfig/*.pc /usr/local/lib/pkgconfig/




https://ibb.co/WVmPsq1
21XO (OP)
Jr. Member
*
Offline Offline

Activity: 57
Merit: 29


View Profile
January 06, 2021, 02:32:43 AM
Last edit: January 06, 2021, 02:58:10 AM by 21XO
 #28

Quote
You are getting permission denied because you aren't running brew as Administrator, try running the brew install command with sudo.


https://ibb.co/ky31Y7H


Quote
@21XO, I think I asked you in your other thread what kind of address is this private key for, but I never got an answer AFAIK. Are you trying to recover a legacy address, or a segwit address?


legacy address
21XO (OP)
Jr. Member
*
Offline Offline

Activity: 57
Merit: 29


View Profile
January 06, 2021, 02:54:48 AM
 #29

Quote
Fortunately https://learnmeabitcoin.com/technical/wif shows example code how to generate WIF key from HEX private key, i combine required code for convenience.

Code:
require 'digest'

# Checksums use hash256 (where data is hashed twice through sha256)
def hash256(hex)
    binary = [hex].pack("H*")
    hash1 = Digest::SHA256.digest(binary)
    hash2 = Digest::SHA256.digest(hash1)
    result = hash2.unpack("H*")[0]
    return result
end

# Checksums are used when creating addresses
def checksum(hex)
  hash = hash256(hex) # Hash the data through SHA256 twice
  return hash[0...8]  # Return the first 4 bytes (8 characters)
end

def base58_encode(hex)
  @chars = %w[
      1 2 3 4 5 6 7 8 9
    A B C D E F G H   J K L M N   P Q R S T U V W X Y Z
    a b c d e f g h i j k   m n o p q r s t u v w x y z
]
  @base = @chars.length

  i = hex.to_i(16)
  buffer = String.new

  while i > 0
    remainder = i % @base
    i = i / @base
    buffer = @chars[remainder] + buffer
  end

  #! Is it just the 00, or does 05 get converted to 3, etc.
  # add '1's to the start based on number of leading bytes of zeros
  leading_zero_bytes = (hex.match(/^([0]+)/) ? $1 : '').size / 2

  ("1"*leading_zero_bytes) + buffer
end

privatekey = "0351764dc07ee1ad038ff49c0e020799f0a350dd0769017ea09460e150a64019"
# "ef" for tesnet
# "80" for mainnet
extended = "ef" + privatekey + "01" #  you can remove 01 to make your wallet generate uncompressed public key
extendedchecksum = extended + checksum(extended)
wif = base58_encode(extendedchecksum)

puts wif

You need to install ruby, save the code on a file and run it with this command

Code:
ruby your_file_name.rb

I've tried it quickly, compare the result with bitaddress and check whether the generated WIF can be imported to Electrum (both testnet and mainnet).




Okay I just installed Ruby but can someone confirm exactly what code I should save in the "ruby your_file_name.rb" document if my private key is: ef242kfjj24ekf3223jesdkhefsfhk324wuefhw38fhrypofhtr34d342132d34jsd01 ?

And also do I just paste the code into Text edit or Microsoft Word? and then just save the file as ".rb"?
NotATether
Legendary
*
Offline Offline

Activity: 1596
Merit: 6723


bitcoincleanup.com / bitmixlist.org


View Profile WWW
January 06, 2021, 04:31:21 AM
 #30

Okay I just installed Ruby but can someone confirm exactly what code I should save in the "ruby your_file_name.rb" document if my private key is: ef242kfjj24ekf3223jesdkhefsfhk324wuefhw38fhrypofhtr34d342132d34jsd01 ?

And also do I just paste the code into Text edit or Microsoft Word? and then just save the file as ".rb"?

Paste it inside a text editor like Notepad because Microsoft Word and other word processors will mess up the code by adding formatting to it.

All you have to do is change the private key on this line:

Quote
privatekey = "0351764dc07ee1ad038ff49c0e020799f0a350dd0769017ea09460e150a64019"

To:

Quote
privatekey = "ef242kfjj24ekf3223jesdkhefsfhk324wuefhw38fhrypofhtr34d342132d34jsd"

Save it as "your_file_name.rb"

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10530



View Profile
January 06, 2021, 04:41:25 AM
 #31

The blockstack JSON he posted suggests that this could be a master private key, but those are also 64 hex characters long and begin with xprv, but this hex number doesn't have either of these properties.
If the string starts with xprv then it is no longer encoded using hexadecimal characters. They use base58 instead. But 32 bytes can also be the seed that were used in BIP32 or BIP39. For example from BIP39 test vectors:
Code:
68a79eaca2324873eacc50cb9c6eca8cc68ea5d936f98787c60c7ebc74e6ce7c

There is also a "passphrase" in BIP39 that can extend the mnemonic generated from the above seed to get entirely different set of child keys.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
21XO (OP)
Jr. Member
*
Offline Offline

Activity: 57
Merit: 29


View Profile
January 06, 2021, 05:14:06 AM
 #32

Quote
You need to install ruby, save the code on a file and run it with this command


Code:
ruby your_file_name.rb


https://ibb.co/09S189V
ABCbits
Legendary
*
Offline Offline

Activity: 2870
Merit: 7452


Crypto Swap Exchange


View Profile
January 06, 2021, 11:06:21 AM
Merited by TheBeardedBaby (1)
 #33

Okay I just installed Ruby but can someone confirm exactly what code I should save in the "ruby your_file_name.rb" document if my private key is: ef242kfjj24ekf3223jesdkhefsfhk324wuefhw38fhrypofhtr34d342132d34jsd01 ?

If your private key length is 66 and end with 01, then you need to change these line

Code:
privatekey = "0351764dc07ee1ad038ff49c0e020799f0a350dd0769017ea09460e150a64019"
extended = "ef" + privatekey + "01" #  you can remove 01 to make your wallet generate uncompressed public key

into

Code:
privatekey = "ef242kfjj24ekf3223jesdkhefsfhk324wuefhw38fhrypofhtr34d342132d34jsd01"
extended = "80" + privatekey

Quote
You need to install ruby, save the code on a file and run it with this command


Code:
ruby your_file_name.rb


https://ibb.co/09S189V

Are you sure notepadwif.rb file is located on ~ ?

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
PawGo
Legendary
*
Offline Offline

Activity: 952
Merit: 1367


View Profile
January 06, 2021, 11:14:59 AM
 #34

I am lost...
Finally - does he have his DECODED private key, or ENCODED?
If it is ENCODED and he has password, he must use blockstack to decode it.

What he posted is not a private key HEX form (ef242kfjj24ekf3223...) and cannot be easily converted into WIF.

21XO: were you able to launch blockstack and retrieve your private key?
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
January 06, 2021, 11:42:41 AM
 #35

Getting blockstack to run should be the easiest way.

If i were you, i'd try to use the software used to generate that key to retrieve the coins.
A few dependency problems shouldn't be holding you back, this can be fixed quite easily.

NotATether
Legendary
*
Offline Offline

Activity: 1596
Merit: 6723


bitcoincleanup.com / bitmixlist.org


View Profile WWW
January 06, 2021, 11:39:51 PM
 #36

I am lost...
Finally - does he have his DECODED private key, or ENCODED?
If it is ENCODED and he has password, he must use blockstack to decode it.

What he posted is not a private key HEX form (ef242kfjj24ekf3223...) and cannot be easily converted into WIF.

21XO: were you able to launch blockstack and retrieve your private key?

Maybe it's a base36 string.

Converting it into hex using javascript gives this:

Code:
parseInt("ef242kfjj24ekf3223jesdkhefsfhk324wuefhw38fhrypofhtr34d342132d34", 36).toString(16)
"14e5771b8ad8e800000000000000000000000000000000000000000000000000000000000000000000"

Not sure how to make sense of this number though. It's 82 characters long, to many to be a private key.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
PawGo
Legendary
*
Offline Offline

Activity: 952
Merit: 1367


View Profile
January 07, 2021, 11:47:33 AM
 #37

I have same question, using blockstack should be far easier (since you've used it on past) than mess with the key when we don't know even how blockstack store user's key.

Code:
def aes_decrypt_legacy(payload, secret):
    """
    Legacy AES decryption (FROM INSECURE ENCRYPTION)!
    Return decrypted secret on success
    Return None on error
    """
    print "Falling back to legacy decryption"
   
    # DO NOT USE TO ENCRYPT
    # legacy hold-over for migrating to stronger encryption
    def ensure_length(secret):
        if len(secret) > 32:
            secret = secret[:32]

        elif len(secret) < 24:
            length = 24 - (len(secret) % 24)
            secret += chr(length)*length
        elif len(secret) > 24 and len(secret) < 32:
            length = 32 - (len(secret) % 32)
            secret += chr(length)*length

        return hexlify(secret)

    try:
        PADDING = '{'

        secret = ensure_length(secret)
        cipher = Cipher(algorithms.AES(unhexlify(secret)), modes.ECB(),
                        backend = default_backend())
        decryptor = cipher.decryptor()
        res = decryptor.update(base64.b64decode(payload)) + decryptor.finalize()
        res = res.rstrip(PADDING)
        return res
    except:
        return None


def aes_decrypt(payload, secret):
    """
    Decrypt a base64-encoded payload with a hex-encoded secret.
    Returns the plaintext on success
    Returns None on error
    """
    try:
        res = scrypt.decrypt(base64.b64decode(payload), unhexlify(secret))
        return res
    except scrypt.error:
        res = aes_decrypt_legacy(payload, secret)
        return res
TheBeardedBaby
Legendary
*
Offline Offline

Activity: 2184
Merit: 3134


₿uy / $ell


View Profile
January 08, 2021, 12:14:44 AM
 #38

Focus on installing the cli wallet.
Using a virtual machine gives you the conformity to start all over again very quickly if something goes wrong.
Make a backup of the clean installation.

Post here your steps, there are enough people around who would like to help in the process.

Just a note, Windows 10 comes with0 Ubuntu too, only the console versjon but it will be enough for you.

Good luck Smiley

21XO (OP)
Jr. Member
*
Offline Offline

Activity: 57
Merit: 29


View Profile
January 08, 2021, 12:36:52 AM
 #39

I managed to install it using cygwin, so on your linux machine it should work... Or on Windows... 
Remember that you will probably need packages libssl-devel (for cryptography/wheels) and python-devel.

Okay so I can install it on Windows, Debian, or Ubuntu....anyways so far I downloaded libssl-devel on Ubuntu using these instructions (https://zoomadmin.com/HowToInstall/UbuntuPackage/libssl-dev) but I'm not sure how to download python-devel?
21XO (OP)
Jr. Member
*
Offline Offline

Activity: 57
Merit: 29


View Profile
January 08, 2021, 12:38:09 AM
 #40

Okay I just installed Ruby but can someone confirm exactly what code I should save in the "ruby your_file_name.rb" document if my private key is: ef242kfjj24ekf3223jesdkhefsfhk324wuefhw38fhrypofhtr34d342132d34jsd01 ?

If your private key length is 66 and end with 01, then you need to change these line

Code:
privatekey = "0351764dc07ee1ad038ff49c0e020799f0a350dd0769017ea09460e150a64019"
extended = "ef" + privatekey + "01" #  you can remove 01 to make your wallet generate uncompressed public key

into

Code:
privatekey = "ef242kfjj24ekf3223jesdkhefsfhk324wuefhw38fhrypofhtr34d342132d34jsd01"
extended = "80" + privatekey

Quote
You need to install ruby, save the code on a file and run it with this command


Code:
ruby your_file_name.rb


https://ibb.co/09S189V

Are you sure notepadwif.rb file is located on ~ ?

I saved it on my desktop...not sure what you mean by "~"?
Pages: « 1 [2] 3 4 5 6 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!