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

privateKeyMultibase #4

Closed
OR13 opened this issue Sep 18, 2020 · 10 comments
Closed

privateKeyMultibase #4

OR13 opened this issue Sep 18, 2020 · 10 comments
Assignees
Labels
before CR This issue must be processed before the Candidate Recommendation stage. pr exists A Pull Request exists to address this issue.

Comments

@OR13
Copy link
Contributor

OR13 commented Sep 18, 2020

Where will it be defined?

See also w3c-ccg/security-vocab#62

@msporny msporny added the before CR This issue must be processed before the Candidate Recommendation stage. label Jul 16, 2023
@msporny msporny self-assigned this Jul 16, 2023
@dmitrizagidulin
Copy link
Contributor

It's now defined in https://github.com/w3c/vc-di-eddsa/blob/main/contexts/lds-ed25519-2020-v1.json#L9C10-L9C28
@OR13 does that address your concerns?

@OR13
Copy link
Contributor Author

OR13 commented Jul 21, 2023

No, because it's still not defined... "privateKeyMultibase"....

Editing for clarity... In order to represent private keys, you need to describe how they are encoded... If they are curve based, how are the points represented, if they are RSA or lattices, how are the private components represented, etc... Just pointing to a prefix table in multicodec is not enough to ensure the private components can be processed consistently... Many implementations will need to convert from multikey to COSE or JWK in order to use off the shelf libraries etc... Without defining the shape of the private key, it's not possible to do this... And imo, a new key representation that doesn't support or document how to represent private keys, is not helpful, or an improvement.

To resolve this, you need to describe how the private components of multikeys are represented... Just like you do for public keys ( although I don't know that public keys are defined sufficiently either )

@dmitrizagidulin
Copy link
Contributor

@OR13 Ah, ok, so this is less about including the the term in a context, and more that you'd like to see better specification of it in the spec itself?

@OR13
Copy link
Contributor Author

OR13 commented Jul 28, 2023

It's both.

I don't think "not defining things in a context" is a security mechanism.

And I would never recommend a public key serialization that did not have well defined representation for private keys.

Since raising this, multicodec has added prefixes for representing private keys.

But where are they defined? How are the EC and RSA private keys structured, etc...

You can close this if you don't think it's worth specifying, we are not planning to implement.

@dmitrizagidulin
Copy link
Contributor

@OR13 PR w3c/vc-data-integrity#148 adds secretKeyMultibase to the DI vocab

@OR13
Copy link
Contributor Author

OR13 commented Aug 4, 2023

When w3c/vc-data-integrity#148 is merged this can be closed.... however, I still urge caution when considering secretKeyMultibase... particularly since each multikey might present private keys differently, especially for different key types like RSA, vs compressed point ECDSA, vs EdDSA...

@msporny
Copy link
Member

msporny commented Aug 6, 2023

however, I still urge caution when considering secretKeyMultibase... particularly since each multikey might present private keys differently, especially for different key types like RSA, vs compressed point ECDSA, vs EdDSA...

Why do you urge caution? What's the security issue you're alluding to?

@msporny msporny added the pr exists A Pull Request exists to address this issue. label Aug 6, 2023
@OR13
Copy link
Contributor Author

OR13 commented Aug 8, 2023

@msporny the security issue is that each private key representation can be different, and there is little reason to believe that 2 serialized Ed25519 private keys will be represented the same way, because there is no standard that defines how that would be done.

This is in contrast to JWK, JWA... https://www.rfc-editor.org/rfc/rfc7518.html#section-6.2.1.2

For example, where is it defined that privateKeyMultibase for Ed25519 has a public key in it, whereas privateKeyMultibase for P-256 does not?

@dmitrizagidulin
Copy link
Contributor

@msporny the security issue is that each private key representation can be different, and there is little reason to believe that 2 serialized Ed25519 private keys will be represented the same way, because there is no standard that defines how that would be done.

@OR13 - I opened issue #56 to address this.

@msporny
Copy link
Member

msporny commented Aug 26, 2023

This issue is now a dupe of the more accurate issue #35. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
before CR This issue must be processed before the Candidate Recommendation stage. pr exists A Pull Request exists to address this issue.
Projects
None yet
Development

No branches or pull requests

3 participants