-1
$\begingroup$

I have a plaintext "DENKMAL" which I have to encode in the ECB mode with the block size = 1 character (whereby the assignment $A\leftrightarrow 0, B \leftrightarrow 1$, etc.)

Now I should find the ciphertext of the plaintext.
What I have done up to now is the following step:

 D E N  K  M  A L  
 3 4 23 10 12 0 11

But I have no idea how to proceed.

$\endgroup$
5
$\begingroup$

Well, in ECB mode you'll simply encrypt each block independently of the others with the same key and they build the correspond ciphertext blocks, which means for an encryption algorithm $E$ of block size $\ell$ and key $k$ that you end up with $C_i=E_k(B_i)$ for $B_i$ the ith block of your plaintext and where the $C_i$ represent the ith block of the resulting ciphertext.

So in you case, you simply need to apply your encryption algorithm to each of your blocks, i.e. to each of your characters (or to their encoded numerical version), independently of each other and obtain the ciphertext by taking the resulting ciphertext block in the same order than your original string.


Now the mandatory remarks:

  • ECB is a mode of operation, which is to be used with a blockcipher in order to get rid of the blocksize limitation (being only able to encrypt data of fixed size), you are not encoding data with a blockcipher in ECB mode, but encrypting it.
  • You need a key to encrypt data with a blockcipher, which you have not provided, so without a blockcipher and a key, you cannot use ECB mode as it is thought to be used.
  • If you really want to only encode your characters into their corresponding encoded version, you actually use something similar to ECB, that's true, but it's not ECB, it is a plain, simple one-to-one mapping between the characters and their encoded version, just like what you did (in which case you already have the solution).
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.