CBC mode and controllable bitflips
Bitcoin Core encrypts the master key MK and private keys SK_i
with AES‑256‑CBC. The ciphertext is structured as C_0 = IV,
C_i = E_K(P_i XOR C_{i-1}). Decryption yields
P_i = D_K(C_i) XOR C_{i-1}, and this XOR dependency gives the attacker
deterministic control over individual bits of P_i by flipping bits in
C_{i-1}.