Despite being stated as databitlen as a name of the third input of _doUpdate function, it appeared to be len (i.e. length in bytes) according to the way this input is processed in further absorbRange function. Therefore the bug appears, when updateByte function is called (by HMAC computation, for instance, see here the aforementioned calling).
Therefore this pull request fixes the bug and refactors the variable's name.
Changes to
updateByte
function of Keccak.Despite being stated as
databitlen
as a name of the third input of_doUpdate
function, it appeared to belen
(i.e. length in bytes) according to the way this input is processed in furtherabsorbRange
function. Therefore the bug appears, whenupdateByte
function is called (by HMAC computation, for instance, see here the aforementioned calling).Therefore this pull request fixes the bug and refactors the variable's name.