Image potential mistake - Block ciphers #317
Unanswered
gonzalo-munillag
asked this question in
Course: Foundations of Private Computation
Replies: 1 comment
-
Hi @gonzalo-munillag, not sure what you mean with this
I think the illustration is arbitrarily showing the ciphertext to have blocks of K bytes (in blue) as a generic depiction, and that it should not be taken literally that it is a longer byte array than the message itself? You are correct though, given K = 16 bytes, a message have any length K. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi :)
Amazing prep from Sebastià.
I think there might be a mistake in the images depicting the block cipher.
I think K does not necessarily need to be lower than N, as a matter of fact, I think the last byte N should be in the last block. I think the number of blocks is round_down(N/K)+1. (With round down I mean that we forget about the reminder). In the image, however, the blocks go beyond N.
See this example from the notebook:
bytes per block: 16 = K
bits per block: 128
message length: 46 = N (This is in bytes)
padded_message lenght: 48 = 16*3
We have 3 blocks
There are N/K+1 = round_down(46/16)+1=2+1=3
Beta Was this translation helpful? Give feedback.
All reactions