decentralized-identity / sidetree

Sidetree Specification and Reference Implementation
https://identity.foundation/sidetree/spec
Apache License 2.0
438 stars 112 forks source link

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

Closed thehenrytsai closed 1 year ago

thehenrytsai commented 3 years ago

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.

csuwildcat commented 3 years ago

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.

sandrask commented 3 years ago

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

OR13 commented 3 years ago

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

sandrask commented 3 years ago

@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).

thehenrytsai commented 3 years ago

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

decentralgabe commented 1 year ago

Handled in spec.