Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Cryptosuites #315

Open
decentralgabe opened this issue Mar 22, 2023 · 2 comments
Open

Refactor Cryptosuites #315

decentralgabe opened this issue Mar 22, 2023 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed quality-of-life sign-verify

Comments

@decentralgabe
Copy link
Member

          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)

@decentralgabe
Copy link
Member Author

decentralgabe commented Mar 22, 2023

Ask is to refactor cryptosuites to all follow the form outlined by the Data Integrity specification. We should define a method on the interface to run the CVH and other algorithms in a generic manner, without needing to understand the specifics/internals of any cryptosuite

See: https://github.com/workdaycredentials/ledger-common/blob/master/proof/ld_signaturesuite.go#L36

@decentralgabe decentralgabe self-assigned this Mar 22, 2023
@decentralgabe decentralgabe added sign-verify enhancement New feature or request labels Mar 22, 2023
@decentralgabe decentralgabe added this to the BTC Miami milestone Mar 24, 2023
@decentralgabe decentralgabe modified the milestones: BTC Miami, Next Apr 12, 2023
@decentralgabe decentralgabe removed this from the Next milestone May 10, 2023
@decentralgabe
Copy link
Member Author

Much has changed; so we'll need to update the cryptosuite package to align with https://www.w3.org/TR/vc-data-integrity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed quality-of-life sign-verify
Projects
No open projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant