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

Generate counter signatures #170

Closed
balena-zh opened this issue Sep 8, 2023 · 3 comments
Closed

Generate counter signatures #170

balena-zh opened this issue Sep 8, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@balena-zh
Copy link

What is the areas you would like to add the new feature to?

Go-COSE Library

Is your feature request related to a problem?

  • One willing to attribute counter signatures to either COSE_Sign1 or COSE_Sign will not find a way except fork the project and write alternative toBeSigned functions.

What solution do you propose?

  • Extend the current Signature struct adding a CounterSign(rand io.Reader, signer Signer, protected cbor.RawMessage, payload, external []byte) error so that the toBeSigned function receives also a context parameter that can be "Signature" or "CounterSignature".

Above supports recursive counter signatures, where a counter signature also contains a counter signature.

What alternatives have you considered?

  • I considered implementing an external package extending go-cose but I had to copy-paste many private functions, such as toBeSigned, deterministicBinaryString, marshal, ensureIV, ensureSigningAlgorithm, and ensureVerificationAlgorithm, along with global variables encMode, decMode, decModeWithTagsForbidden and the init() function.

Any additional context?

No response

@balena-zh balena-zh added the enhancement New feature or request label Sep 8, 2023
@balena
Copy link
Contributor

balena commented Sep 11, 2023

Started to add such support in #172

@balena
Copy link
Contributor

balena commented Sep 30, 2023

Now #172 has been merged you may want to close this one @qmuntal

@SteveLasker
Copy link
Contributor

Thanks, @balena, closing per comment above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants