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.
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
|
|
|
Right. Electrum wallet could be encoded with password or not. If not - it is easier, file has JSON format, looks like { "addr_history": { "3PQRST.....": [ }, "addresses": { "3456789.......": {}, },
Encrypted wallets are base64 encoded, so it looks like a mess (but only with readable characters). Were you able to retrieve any information about folders? Usually you look for files inside folder.
|
|
|
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?
|
|
|
i use windows 10 i don't have any usb memory to install linux.
cygwin? or virtualbox
|
|
|
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#msg56017277If 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.
|
|
|
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.
|
|
|
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.
|
|
|
Thanks. But using the example of puzzle 64, most of the hex values are just zeroes so only 16 characters are used for calculation so if i use your calculation: 2^16 / 1000000000 (per/second key rate of a fast bitcrack) /86400 would be the correct formula right? but that produces a number in the sub decimal i.e. hours in total to calculate puzzle 64
You mix binary and hex notation.
|
|
|
Since the private key length is 66 character (rather than 64 character), know ef used as prefix which is used to generate WIF from private key in HEX format and example by OP doesn't end with 01, i simply assume ef is the identifier whether the private key meant for testnet wallet/network and 03 as custom prefix.
Thanks for the correction.
He said his key is like "ef242kfjj24ekf3223jesdkhefsfhk324wuefhw38fhrypofhtr34d342132d34jsd49", which is encoded form. it does not look like hex which could be easily converted into WIF, so I would not worry about it as long as we do not know what is decoded hex form.
|
|
|
Information if it is testnet or not is not included in private key itself. Only in prefix which is used to generate WIF. 2. Looking at https://docs.blockstack.org/understand-stacks/accounts, especially example of their private key when generating account also 66 characters. Although i don't know why their example use prefix 03 (maybe it's standard for Stacks 2.0 network) npx -q stacks-gen sk --testnet
{ "phrase": "guide air pet hat friend anchor harvest dog depart matter deny awkward sign almost speak short dragon rare private fame depart elevator snake chef", "private": "0351764dc07ee1ad038ff49c0e020799f0a350dd0769017ea09460e150a6401901", "public": "022d82baea2d041ac281bebafab11571f45db4f163a9e3f8640b1c804a4ac6f662", "stacks": "ST16JQQNQXVNGR8RZ1D52TMH5MFHTXVPHRV6YE19C", "stacking": "{ hashbytes: 0x4d2bdeb7eeeb0c231f0b4a2d5225a3e3aeeed1c6, version: 0x00 }", "btc": "mnYzsxxW271GkmyMnRfiopEkaEpeqLtDy8", "wif": "cMh9kwaCEttgTQYkyMUYQVbdm5ZarZdBHErcq7mXUChXXCo7CFEh" }
In this example the private key is 0351764dc07ee1ad038ff49c0e020799f0a350dd0769017ea09460e150a64019. 01 at the end is a flag to indicate to use compressed address. Because the program was launched with --testnet the generated WIF is "cMh9"... - which is created by adding "ef" at the beginning. This same private key (with compressed flag) for the real network will produce WIF KwLAJ2aLoqCRHy5VawfR3B6a8rGBC7XVDCi9ihK1y63XGTgP3VbR
|
|
|
At least you know you must use python 3.
Blockstack v 0.18 only works with python 2. It is incompatible with python 3. Mea culpa, I did not know - I just took a look at python output. I just thought that if blockstack requires python2 and dependency migrated to python3, using master from git will not work, it will be needed to find the last correct version for python2. But let he first try to install from master...
|
|
|
check if you are using python3. Probably 2. Maybe you must install python 3 or launch using command and/or Edit: ah, yes, you are using python 2.7 Try with 3.x
|
|
|
Yeah, my main concern would be that most dust attacks are too small to send on their own without including another input, be that another dust input or a regular input. Either way, you are revealing some information to the attacker.
Yep, if you pay the fee from the dust, the rest is too small to be send and is rejected by servers. AFAIK now 547 is the limit.
|
|
|
|