Skip to main content
2 of 2
added 24 characters in body
zajic
  • 154
  • 5

A standard way to encrypt a message is to apply some sort of padding (PKCS #7 for instance), that converts messages of arbitrary length to a set of fixed-size plaintext blocks (16 bytes in case of AES-128). If your properly padded message is contained in one block only, you just encrypt that block.

CBC and other modes of block cipher operation do not require at least two blocks of plaintext, you can use them on just one as well.

zajic
  • 154
  • 5