how can I encrypt a 300-bit plaintext using a block cipher with a block size of 128 bits in ECB mode.
views:
49answers:
1
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
2010-03-23 22:30:35