tags:

views:

49

answers:

1

how can I encrypt a 300-bit plaintext using a block cipher with a block size of 128 bits in ECB mode.

A: 

First you have do some padding. The most simple padding would be to fill your plaintext with zeros up to size 3*128 bits. Now you can encrypt it with your block cipher in three steps, first encrypting bits 0 to 127, then 128 to 255 and last 256 to 383. That's ECB.

For decryption you do the reverse. Decrypt the single blocks, then remove the padding.

tangens