What data structure would be best choice for fast and performant bidirectional SHA-1 to SHA-3 mapping? Or in other words fixed-length string to fixed-length string mapping?
To be more precise:
- There exists a set of data (which might count in mega-objects), over each of which SHA-1 and SHA-3 hash of is taken
- For given SHA-1 we want to know if object (data) exists, and its SHA-3 hash function
- For given SHA-3 we want to know if object (data) exists, and its SHA-1 hash function
The set of data is not immutable, but one can assume that only new data would be added.
Most important is fast query and low overhead; the modification may perform slower. It would be good if it could perform lock-less updates. Updates (append only) are much rare than queries, and only need to perform below human reaction time.
Background: one of proposals of moving Git away from SHA-1 requires fast SHA-1 to SHA-3 (or to whatever hash is chosen to replace broken SHA-1).
See it here: RFC: Another proposed hash function transition plan