2
$\begingroup$

Pretty much the title. We have that $x$ is a prefix of $PAD(x)$, instead of being a suffix - was that an arbitrary choice or is there a reason for it? Thank you.

$\endgroup$
3
  • $\begingroup$ @kelalaka I appreciate that as a general rule, padding should be suffix-free, but I am not too sure why putting the message at the end rather than the start would exacerbate the potential suffix problem? Thank you. $\endgroup$ Apr 29 at 14:08
  • $\begingroup$ @kelalaka That makes sense, thank you! $\endgroup$ Apr 29 at 14:39
  • $\begingroup$ OK. I've converted the comment into an asnwer. $\endgroup$
    – kelalaka
    Apr 29 at 15:17
2
$\begingroup$

I can only provide a programming sense to this;

One may not know the size of the message beforehand (streaming), when finished, the length-padding can be executed nicely at the end. Otherwise, the system must store all of the messages to calculate the size, this will be very bad for constrained environments.

$\endgroup$
0

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.