Padding: adding extra length to a message so it can be encrypted by a cipher block

plaintexts are all in bytes

Padidng Schemes

1

Append single byte of value 128, and add as many zero bytes as required to make overall length a multiple of b

| l(P) | 1 | 0000000……….. | ← where its a multiple of b

| b |

2

determine number of padding bytes

| l(P) | n |

| b |

<aside> 💡 why add a single byte with value 128

</aside>

Number of blocks = ( I(P) + 1 ) / b)

ECB

encrypt each block separately