taurushq-io / multi-party-sig

Implementation of protocols for threshold signatures

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hash.WriteAny should employ domain separation

cronokirby opened this issue · comments

Right now, it just hashes things based on their bytes, but this could theoretically cause problems, because a Curve Point might affect state in the same way as a byte slice with the same pattern. It would be a good idea to add in some extra bytes when hashing each of these, so that different sequences of these objects can't be confused with each-other.

I don't think this presents a concrete issue, but it's a good best practice to follow, and pretty simple to implement.