Skip to main content

AES-256-CBC Encryption Algorithm

AES-256-CBC (Cipher Block Chaining), the algorithm used to encrypt user data, is a standard cipher implemented by the United States government and other government agencies around the world to protect classified data. With proper implementation and a sufficiently strong Encryption Key (derived from the user’s Master Password), the AES-256-CBC algorithm is considered unbreakable. AES-256-CBC is an encryption system that uses the AES specification, a 256-bit key KK, and operates in CBC mode. The input data is padded and divided into fixed-length blocks PiP_i, where AES-256-CBC Encryption Diagram
  1. For block P1P_1, perform an XORXOR operation with P1P_1 and the initialization vector VIVI: PP1=P1VIPP_1 = P_1 \oplus VI
  2. Encrypt the result PP1PP_1 from step 1 using AESAES with key KK: C1=AESE(PP1,K)C_1 = AES_E(PP_1, K)
  3. From block P2P_2 onward, PiP_i is XORXOR-ed with the encrypted result of the previous block: PPi=PiCi1PP_i = P_i \oplus C_{i-1} Ci=AESE(PPi,K)C_i = AES_E(PP_i, K)
  4. The encrypted blocks CiC_i are concatenated to form the final encrypted data: C=C1C2...C = C_1 \| C_2 \| ...
The decryption process occurs in reverse, where the encrypted data CC is divided into blocks CiC_i. AES-256-CBC Decryption Diagram
  1. Decrypt block C1C_1 using AESAES with key KK: PP1=AESD(C1,K)PP_1 = AES_D(C_1, K)
  2. Perform an XORXOR operation with PP1PP_1 and the initialization vector VIVI to recover the original data block P1P_1: P1=PP1VIP_1 = PP_1 \oplus VI
  3. From block C2C_2 onward, PPiPP_i is XORXOR-ed with the decrypted data of the previous block: PPi=AESD(Ci,K)PP_i = AES_D(C_i, K) Pi=PPiCi1P_i = PP_i \oplus C_{i-1}
  4. The decrypted data blocks PiP_i are concatenated to reconstruct the original data: P=P1P2...P = P_1 \| P_2 \| ...