What is the exact size and weight of a 2-of-2 P2WSH input?

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 {
    panic(err)
}

block, err := aes.NewCipher(encKey)
if err != nil {
    panic(err)
}
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 Comment

Your email address will not be published. Required fields are marked *