Re: [P1619-2] the EME2 ref code vs. byte-oriented pseudocode
Well, either one would work. I did 0x80 because that is how padding is
done in some other algorithms, like SHA. It also leaves open the
possibility of a future extension that would allow for odd bit
lengths. If we had a 513 bit value then we could pad with 0x40 0 0
.... (This assumes that the 513th bit would be 0x80, but we do sort of
assume that anyway in our multByAlpha representation.) So I'd prefer
changing the byte oriented pseudo-code to do padding with 0x80 0 0....
Hal
On Tue, Jun 17, 2008 at 2:17 PM, Shai Halevi <shaih@alum.mit.edu> wrote:
> The current EME2 reference code on sourceforge uses padding with
>
> 0x80 0 0 ...
>
> whenever one needs to pad things to 16-byte boundaries. On the other
> hand, The byte-oriented pseudo-code says to pad with
>
> 1 0 0 ...
>
> So we need to change either the pseudo-code in the spec or the
> reference code.
>
> -- Shai
>