DEV Community

loading...

Discussion on: Cryptography for programmers 2: Blocks and Randomness

Collapse
differentsmoke profile image
Pablo Barría Urenda

Is the CBC part (the splitting into blocks) done by the crypto library behind the scenes? Shouldn't it be asynchronous, or is it assumed that the amount of data encrypted will always be relatively small?

Collapse
shierve profile image
Sergi Canal Author

Yes the library handles the blocks and padding. You could make it asyncronous depending of your use case. However if you are encrypting large amounts of data, then maybe CBC is not the best mode since it can not be parallelized.