-
Notifications
You must be signed in to change notification settings - Fork 110
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
ecdsa keyval.public format is hex-encoded DER, should be PEM #223
Comments
I think the big problem was that newlines inside JSON couldn't be handled well with go. I pulled a PEM encoded public key string from python repository testadata and you'll usually get invalid chars trying to unmarshal: |
I realize the following is not useful to solve the problem that we have now but I'll say this to any future developers thinking of a similar workaround: Redefining an existing keytype is not the best solution to this problem. The specification supports new keytypes just fine. I don't have ideas to fix the issue at hand: I'm not very familiar with the go deployment styles but I suppose we are now in a situation where:
What the project can definitely do is document the issue: "go-tuf does X in a non-compliant way: it works fine but may prevent using other TUF implementations with the same metadata" |
Implemented a fix for this in: #270 |
It looks like the
ecdsa-sha2-nistp256
keytypeskeyval.public
value is incorrectly the hex encoded raw bytes of the key, instead of PEM. Spec says:I'm looking at e.g the sigstore metadata https://github.com/sigstore/root-signing/blob/main/repository/repository/2.root.json#L36 where the value does not seem to be PEM.
Related:
The text was updated successfully, but these errors were encountered: