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

Convert ECDSA signing code to produce ECDSA signatures in ASN.1 form #1605

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

stefan-zh
Copy link

@stefan-zh stefan-zh commented Jul 27, 2021

The Elliptic Curve signatures that Notary produces are not in ASN.1 form, which leads to incompatibilities with some popular external libraries and tools such as OpenSSL (#1544) or AWS KMS. The proposed change here will generate ECDSA signatures in ASN.1 form going forward, but also be backwards-compatible in its Verify logic, i.e. all signatures produced so far for users of Notary will continue to be verified successfully as the original verification logic will remain in the code. All that users will need to do, should they wish to upgrade, is rebuild their client, server and signer.

If there are any reasons why Notary should produce non-ASN.1 signatures, please discuss it in this thread.

Note: an important note is that for Docker CLI to be compatible with the ASN.1 signatures, the Docker client needs to be rebuilt with the updated Notary code, otherwise, Docker CLI won't be able to verify signatures.

return ErrInvalid
}
return nil
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the signature cannot be parsed as ASN.1 signature, we continue below trying to parse it in the old Notary signature style.

@justincormack
Copy link
Contributor

It might be good to reference links to the docs for the old and new forms for reference.

@stefan-zh stefan-zh marked this pull request as ready for review July 29, 2021 14:55
@stefan-zh
Copy link
Author

@justincormack I updated the documentation. See if it looks good to you

@stefan-zh
Copy link
Author

Hey @diogomonica @endophage I think you guys have worked on implementing the ECDSA keys functionality in Notary and go-tuf before and I'm curious to hear your thoughts.

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

Successfully merging this pull request may close these issues.

None yet

2 participants