# Is it possible to split a large AES encrypted string and decrypt the parts one by one?

Due to some platform restrictions our decryption algorithm can only handle up to 1 million bytes. The string we receive is larger, having been generated by AES in cipher block chaining (CBC) mode, with PKCS5 padding.

Is it possible to somehow split the encrypted data and decrypt the parts?

• What mode of operation is being used? AES only encrypts blocks of 128bits. Dec 6, 2013 at 14:03
• We use cipher block chaining (CBC) and PKCS5 padding. Dec 6, 2013 at 14:06
• With no authentication? This tends to be a risky scenario to be in, since unauthenticated encryption may be malleable. Dec 6, 2013 at 14:16
• No, authenticated encryption is about ensuring two things: privacy (no-one can read our encrypted messages) and non-malleability (no-one can create a fake message). Hopefully this blogpost will explain better than I can here Dec 6, 2013 at 14:24
• In the hopes of deriving a clearer explanation that "because you should!", I've started this question - hopefully it'll be of use. Dec 10, 2013 at 16:04

I assume from what you've said that you have a function that will "do" AES-CBC decryption on large amounts of data, and you wish to use this. So, you simply run: $$D_k^{IV}(c_1\ ||c_2\ ||\dots||c_n\ ) = m_1\ ||m_2\ ||\dots||m_n\ \\ D_k^{c_n}(c_{n+1}||c_{n+2}||\dots||c_{2n}) = m_{n+1}||m_{n+2}||\dots||m_{2n}$$