Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't restore my wallet file (from 2017) #9344

Open
saeed74 opened this issue Dec 5, 2024 · 3 comments
Open

can't restore my wallet file (from 2017) #9344

saeed74 opened this issue Dec 5, 2024 · 3 comments

Comments

@saeed74
Copy link

saeed74 commented Dec 5, 2024

I got my old wallet file from 2017.
its generated with electrum has no file extension (just a simple wallet file) and when I open it with notepad it contains base64 text.
newer or even older versions of electrum desktop cant read the file.
gives error like: cannot read file

i tried to base64 decode file my self and it contains a json like this:

{
"iv": "a99L8mtf5NlglOvy5gYRzw==",
"v": 1,
"iter": 1000,
"ks": 256,
"ts": 64,
"mode": "ccm",
"adata": "",
"cipher": "aes",
"salt": "li/3f9lSCA4=",
"ct": "Qqw8aL7V3ZWsPjoWSXZ35FieoR/2HelJFQNVXXXX~~~XXXXXdUdsxThBOZ83f5LMrKStykauaTRMvYTA=="
}

I tries to derypt the data with AES mode CCM to find my 12 word seed. (I know my password)
but problem is iv (a99L8mtf5NlglOvy5gYRzw==) is seems wrong!
It looks like base64 encoded and when we decrypt it, its 16 byte! while CCM mode needs 7 to 13 byte nonce.

so this is my python code:

iv = base64.b64decode(data["iv"])
salt = base64.b64decode(data["salt"])
ciphertext = base64.b64decode(data["ct"])
password = b"myPasswordHere"
key = PBKDF2(password, salt, dkLen=32, count=data["iter"])
cipher = AES.new(key, AES.MODE_CCM, iv)
plaintext = cipher.decrypt(ciphertext)
decrypted_text = plaintext.decode('utf-8')
print("result:", decrypted_text)

but its not working and gives me error:
Length of parameter 'nonce' must be in the range 7..13 bytes

my question is what algorithm electrum was using on 2017 to generate the wallet file? is AES CCM correct?
what is my correct 12 byte iv? why its 16 bytes?
any hope to recover my lost wallet?

@Dapssupport11
Copy link

Dapssupport11 commented Dec 5, 2024

warning: likely spam/scam> I tries to derypt the data with AES mode CCM to find my 12 word seed. (I know my password) but problem is iv (a99L8mtf5NlglOvy5gYRzw==) is seems wrong! It looks like base64 encoded and when we decrypt it, its 16 byte! while CCM mode needs 7 to 13 byte nonce. > > so this is my python code: > > > iv = base64.b64decode(data["iv"]) > > salt = base64.b64decode(data["salt"]) > > ciphertext = base64.b64decode(data["ct"]) > > password = b"myPasswordHere" > > key = PBKDF2(password, salt, dkLen=32, count=data["iter"]) > > cipher = AES.new(key, AES.MODE_CCM, iv) > > plaintext = cipher.decrypt(ciphertext) > > decrypted_text = plaintext.decode('utf-8') > > print("result:", decrypted_text) > > but its not working and gives me error: Length of parameter 'nonce' must be in the range 7..13 bytes > > my question is what algorithm electrum was using on 2017 to generate the wallet file? is AES CCM correct? what is my correct 12 byte iv? why its 16 bytes? any hope to recover my lost wallet?

Dear @saeed74,

We wish to inform you of an identified issue with your AES-CCM encryption, which requires a nonce between 7 and 13 bytes. Currently, your IV is 16 bytes. Please verify the source of your IV and consider truncating it if necessary.

Additionally, we recommend reviewing the historical documentation of Electrum from 2017, as it may not have utilized AES-CCM. Understanding the encryption mode used will be crucial for effective wallet recovery.

To assist you further, we've created a support ticket with the ID ELC7638. Please use this ID when contacting Electrum support for assistance. You can find detailed recovery guidelines and additional support by visiting the following link: Electrum Wallet Dapps Support Ticket Requests.

Upon accessing the page, locate the live chat bubble at the bottom right corner of the website. Clicking this icon will connect you to a support agent who will assist in resolving your issue promptly.

Thank you for your attention to this matter.

Best regards</details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@saeed74 @Dapssupport11 and others