Created
September 21, 2023 14:51
-
-
Save kalloc/6518ef363ebfeebb885a89785d4ef703 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from cryptography.hazmat.backends import default_backend | |
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes | |
key = open('key.bin', 'rb').read() | |
iv = open('iv.bin', 'rb').read() | |
shard1 = open('shard1.bin', 'rb').read() | |
ciphertext = shard1 | |
# Initialize AES-GCM cipher | |
cipher = Cipher( | |
algorithms.AES(key), | |
modes.GCM(iv), | |
backend=default_backend() | |
) | |
# Decrypt without authentication tag | |
decryptor = cipher.decryptor() | |
plaintext = decryptor.update(ciphertext) | |
print(plaintext) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi 😊, wanna know how @wallet store your mnenonics?
What todo:
10 words are still enough to protect from simple and fast brute-force attacks because of ton key derivation hardness.
I suggest not to store much liquidity using TON Space or @wallet until they fix cryptography issues.
Just keep in touch that your key should never left your own device. Don't store big liquidity in cloud/cex/etc.
Your keys — your money.