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

recommend that the COSE kid be a Subject Key Identifier #23

Closed
laurencelundblade opened this issue Mar 18, 2020 · 10 comments
Closed

recommend that the COSE kid be a Subject Key Identifier #23

laurencelundblade opened this issue Mar 18, 2020 · 10 comments

Comments

@laurencelundblade
Copy link

Particularly with x5bag, the signature verifier needs to figure out which cert is the leaf to use to verify the COSE signature. CMS and such did with the Subject Key ID and it seems that should be a described option here.

@jimsch
Copy link
Contributor

jimsch commented Mar 18, 2020

I would not be using a kid in this case, I would be more likely to use a thumbprint for the identification purposes. Given that we have consistently said that the structure of kid is not known, making it known in this case seems to be a bad idea to me.

@laurencelundblade
Copy link
Author

Suppose I'm using COSE for code signing and a root has been embedded in the entity that will verify and run the signed code. The cert chain is a leaf, two intermediates and a root. The two intermediates and leaf are put in an x5bag. How does the verifier know which of the three in the x5bag is the leaf?

It seems that it should be Subject Key ID as that is best practice for this identification AFAIK. Thus, there should be some COSE header that contains the Subject Key ID. If that is not the kid, then another header should be formally defined. If it is a thumbprint then how the thumbprint works should be described.

Said another way, I think this draft should give enough info (along with 5280) to accomplish chain formation with an x5bag for the code signing example or other similar uses.

@jimsch
Copy link
Contributor

jimsch commented Mar 19, 2020

Starting at the top, this is a case where a chain makes more sense because it resolves that problem entirely. Using a bag only makes sense if you have certificates that are outside of the chain.

Second, as I said I would put in a bag and a thumbprint. The thumbprint would be used to identify the leaf certificate to use.

@laurencelundblade
Copy link
Author

Understand that a thumbprint can work, but the word "thumbprint" only occurs in the document once in Table 2 which applies only to ECDH. Seems like there is some important text missing.

If x5t is the thumbprint, then it should say something like "x5t identifies the leaf cert in the chain, such as the one with the public key to verify the signature on a COSE_Sign1."

@jimsch
Copy link
Contributor

jimsch commented Mar 22, 2020

That is implied by the bullet items immediately prior to table 1.

@ivajloip
Copy link
Contributor

Is that fixed now (with commit d6ba2d5)

@kaduk
Copy link
Contributor

kaduk commented Nov 19, 2021

I think we can consider it addressed, yes. @laurencelundblade is encouraged to chime in as well, of course.

@laurencelundblade
Copy link
Author

It still doesn't say "the x5t header indicates the end-entity certificate" in any explicit way that I can see. I searched the tip of the repo document for "end-entity" and "leaf" to check. JWS is more clear.

The solution to this one and #29 are probably the same, so maybe it's OK to close this one if #29 stays open.

@laurencelundblade
Copy link
Author

I've made a PR to resolve this: #41

@ivajloip
Copy link
Contributor

Thank you, Laurence!

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

No branches or pull requests

4 participants