Skip to main content
added 24 characters in body
Source Link
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 are only used when you havedo not require at least two blocks of plaintext to encrypt, you can use them on just one as well.

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 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 are only used when you have at least two blocks of plaintext to encrypt.

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.

Source Link
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 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 are only used when you have at least two blocks of plaintext to encrypt.