Analysis paralysis 

Not entirely sure why I went with a CAS design for ChiFS Share metadata. Replacing hashes with simple identifiers would work just as well.

- Identifiers are namespaced to a single Share, so they can be much shorter. 4byte ints vs. 32byte hashes is pretty significant.
- Hash-agnostic, no need to come up with contingency plans for possible future hash function breakage.

- Shorter identifiers may be subject to enumeration attacks (not very relevant for ChiFS at the moment, there's no private metadata).
- No opportunity for incidental deduplication of metadata between Shares (I don't expect exact duplicates of metadata to be common, but Share mirroring might be a thing).
- Non-hash identifiers can't be used to validate content (not sure integrity checks are even useful on this metadata).

re: Analysis paralysis 

If you don't rely on the hash for security, there's no need to replace broken hashes. Even md5 is a good hash function that you could use in a hashmap, as long as your enemies don't try to cause collisions

re: Analysis paralysis 

@wolf480pl Some of the metadata is potentially attacker-controlled, so collisions are indeed a concern.

Probably easy enough to mitigate by throwing a randomly generated string in the metadata file if that ever becomes necessary.

Sign in to participate in the conversation

A lonely little town in the wider world of the fediverse.