Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: Add capability spec #6
base: main
Are you sure you want to change the base?
feat: Add capability spec #6
Changes from 4 commits
054029e
a164ef7
3324e8c
9e92913
1825d82
83996b1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Counterproposal: publish under
scalarmult(my_sk, their_pk)
. They can computescalarmult(their_sk, mypk)
(which yields the same value) to look up my capabilities for them.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, that's super neat, thanks :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question - does this pose an issue if any other app tries to use the public/secret combination as a shared secret, e.g. for encryption?
Just been reading a bunch of random stuff like this
Perhaps this should be
HKDF-Expand(scalarmult(my_sk, their_pk), "capability-publication", 32)
, so we never disclose the original shared secret?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are other issues as well: if you and I both write capabilities using the naive implementation, we both use the same curve point, so an observer actually sees that the two of us have exchanged capabilities. So there needs to be some further symmetry breaking. So see this "counterproposal" more as opening up some design space rather than as a serious suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But a definite "yes" to "Does this pose an issue if any other app tries to use the public/secret combination as a shared secret, e.g. for encryption?"
It might suffice to hash the shared secret (using a hash function that isn't used anywhere else - in practice, the same function you'd use elsewhere, but salted by hashing
concat("CapabilityBuddies!", <shared secret>)
) to work around problems with using the shared secret directly elsewhere? Could also break the symmetry for mutual capability-giving by using different hash functions depending on whether it is the peer with the greater or the lesser publickey issuing the capability.edit: I basically redescribed hkdf, didn't I. I mean, not exactly, but pretty close in intent...
Take all of this with a large I-am-not-a-cryptographer grain of salt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The document exposition needs some clarification on whether we assume peers to reuse keypairs on multiple devices, or whether there should be at most one device per keypair. Do we wish to support both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not quite getting either what exactly you describe here, nor which problem it solves =(
Which might very well be attributed to me being exhausted, but at the very least, it points to an opportunity to clarify the writing a bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair, will try and elaborate and reword. This relates to our discussion on Discord on multiple client apps using the same keypair to run this extension process, and what happens if they conflict. I think some more explicit examples would likely help. (Hmm, maybe a diagram? Will give it a go)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section needs a discussion of alternatives. Of the top of my head, you could also post a new capability to
/stuff-they-care-about/next-capability
at the end of the week.Also: recommendations for posting overlapping capabilities (chances are you want to issue week-long capabilities every 3.5 days or so).
Also: How about immediately merging caps? I.e. not giving one for week 1 first and week 2 second, but one for week 1 first, and one for (week1and wek2) second, and so on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 I guess I was purely imagining this from a "giving out read-only caps" perspective. So, if you've not written anything new, no need for new caps, there'd be no entries anyway. But, for allowing writing - yeahh, you want overlap. I'll extend this section and cover some of these use-cases. Thanks :)
This is what I was imagining. Will make this more explicit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can probably omit the details for this from the design process until everything else has settled.