Skip to content

ParallelHash fails to encode n on zero length input, producing incorrect result. #906

@dghgit

Description

@dghgit

Testing ParallelHash128

{"tcId":967,
"msg":"",
"len":0,
"blockSize":126,
"customization":")7HY7q\u003C \u0027V!Rpq_l4:k(Ju$Q@:Qt]d1R:jRIQ~\u0027CWSQ*ADPNMZx%e5t23v9{?FCBFN8\u0026",
"outLen":16}

Produces "7F2F" in the sample answer. I can reproduce this if I comment out the encoding of n that is listed in step 4 of the algorithm:

  1. z = z || right_encode(n) || right_encode(L).

where n is 0 as there is no data.

The correct answer appears to be: "ef5e"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions