Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

Refactor Cryptosuites #315

Open
Open
@decentralgabe

Description

@decentralgabe
          Thanks. That makes sense to me now. 

The interface, as it stands, is promoting strong coupling across CryptoSuiteProofType and a signature algorithm (which is unclear in which interface it's defined). That makes it difficult to know what the expectations are when you're dealing with an implementation. Additionally, it's leaking implementation details because users will need to understand what implementation of the interface is being used.

I think the root cause of this is that CreateVerifyHash() is part of the CryptoSuiteProofType interface. Instead, what if there is a separate function with a parameter of
type CryptoSuiteProofType? If you need to specify whether the signing algo does digest within it, another method like IsSignDigested() bool to CryptoSuiteProofType. WDYT?

Originally posted by @andresuribe87 in #288 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions