# How to decrypt AES in CBC

i am having problems understanding how CBC works! I know that it is a chain and the IV is XORed with the PT but then what? I mean we encrypt it with key k and the result is the CT which we use for the next chain-XOR but my question is HOW the encryption works? For example in Stream ciphers i just had to XOR the K with the M (or C) to get my result, but on block ciphers i am completely lost...

-
Have a look at the drawings here then tell us what remains unclear – fgrieu Sep 11 '12 at 10:02

The title of your question, however, asks about decrypting AES using CBC mode operation. In which case you should be using AES, $P_t = \operatorname{AES-128-DEC}_k(C_t) \operatorname{XOR} C_{t-1}$. AES decryption is available in many crypto libraries (for example libtomcrypt, Crypto++, openssl, Java Cryptography Extensions, Python Cryptography Toolkit), and you can even use online AES "calculators" such as this one.