Skip to content

Prevent trivial hash collisions - fixes #201#212

Merged
jakinyele merged 1 commit intoJHUISI:devfrom
timothymctim:issue-201
Apr 10, 2019
Merged

Prevent trivial hash collisions - fixes #201#212
jakinyele merged 1 commit intoJHUISI:devfrom
timothymctim:issue-201

Conversation

@timothymctim
Copy link
Copy Markdown
Contributor

Tuples are hashed in a way similar to the TupleHash algorithm defined in NIST SP 800-185.

@timothymctim timothymctim mentioned this pull request Mar 31, 2019
Tuples are hashed in a way similar to the TupleHash algorithm defined
in [NIST SP 800-185](https://doi.org/10.6028/NIST.SP.800-185).
print("unexpected type: ", type(i))
# consider other types
#print("s => %s" % s)
assert len(s) != 0, "hash input is empty."
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assertion doesn’t exists anymore in the new code. Now group.hash('') == group.hash(tuple()).

@jakinyele jakinyele merged commit 4f5f030 into JHUISI:dev Apr 10, 2019
@timothymctim timothymctim deleted the issue-201 branch May 10, 2019 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants