sidetree icon indicating copy to clipboard operation
sidetree copied to clipboard

Need to decide on what hash algorithm to use when hashing suffix data

Open thehenrytsai opened this issue 3 years ago • 5 comments

Need to decide on what hash algorithm to use when hashing suffix data when multiple hash algorithms are supported, the case overlooked in current implementation is that a long-form DID can be registered any time in the future.

thehenrytsai avatar Dec 05 '20 01:12 thehenrytsai

Question: aren't there already values within the suffix data that indicate this, and if not, should we consider just adding a version string to the create suffix portion that is required, to provide you with specific instructions that are unambiguous?

Ironically, this may be a great example of why a DID Method should have the ability to shift a user's DID representation to a new form using canonical/equivalent ID references.

csuwildcat avatar Dec 05 '20 16:12 csuwildcat

@thehenrytsai @csuwildcat Should we use the multihash code that is used for recoveryCommitment (part of suffix data)?

sandrask avatar Dec 11 '20 20:12 sandrask

prefer to have the behavior fully defined in the spec, with RECOMMENDED text.

OR13 avatar Dec 15 '20 22:12 OR13

@thehenrytsai @csuwildcat @csuwildcat @troyronda According to spec all hashes have to be calculated using the same currently supported multi-hashing algorithm (https://identity.foundation/sidetree/spec/#hashing-process). Does this mean that you should reject create request with hashes that are calculated with different algorithm? For scenario that we discussed today (long-form DID that may get anchored year later) this issue may not be limited to generating unique suffix only. In addition, all hashes in one operation request should be generated with same multihashing algorithm (except for reveal value).

sandrask avatar Dec 15 '20 22:12 sandrask

Having a version property was discussed as a viable approach, absence of such a property can imply version 1.

thehenrytsai avatar Dec 30 '20 19:12 thehenrytsai

Handled in spec.

decentralgabe avatar Feb 07 '23 18:02 decentralgabe