Details decryption electrum wallet (in golang)


How can I manually decrypt the modern versions of Electrum wallets and how do they differ from the old versions?

I tried:

encKey := doubleSHA([]byte("password"))
ciphertext, err := base64.StdEncoding.DecodeString("***base64 string from the wallet***")
if err != nil {

block, err := aes.NewCipher(encKey)
if err != nil {
blockSize := block.BlockSize()
iv := ciphertext[:blockSize]

ciphertext = ciphertext[blockSize:]
if len(ciphertext)%blockSize != 0 {
    panic("ciphertext is not a multiple of the block size")

mode := cipher.NewCBCDecrypter(block, []byte(iv))
mode.CryptBlocks(ciphertext, ciphertext)

fmt.Printf("%sn", ciphertext)

But it doesn’t work: panic: ciphertext is not a multiple of the block size

Source link

Leave a reply