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

Where do we get own_key from? #29

Open
Powersource opened this issue Mar 1, 2023 · 3 comments
Open

Where do we get own_key from? #29

Powersource opened this issue Mar 1, 2023 · 3 comments

Comments

@Powersource
Copy link
Collaborator

https://github.com/ssbc/private-group-spec/tree/master/direct-messages#b-self-case---mapping-our-own-feed_id-to-recp_key

That section just says

Instead, when you see your own feed_id as a recipient, you're expected to map that to a private symmetric key, own_key.

how do you do that mapping? @staltz said that he adjusted box2 so that own_key should be recoverable from the recovery string (used in mv) but how?

@staltz
Copy link
Member

staltz commented Mar 1, 2023

Here is the encryption mapping: https://github.com/ssbc/ssb-box2/blob/2660ced84f75129a5011f5bb44776ae2afffec19/format.js#L185-L186

And here is the decryption (no mapping needed because we just try all the keys): https://github.com/ssbc/ssb-box2/blob/2660ced84f75129a5011f5bb44776ae2afffec19/format.js#L265

Then we just need to call box2.setOwnDMKey where the input is derived from your secret, but that's not done in Manyverse yet.

@Powersource
Copy link
Collaborator Author

Then we just need to call box2.setOwnDMKey where the input is derived from your secret,

I guess my question is maybe how would this exactly be derived?

@staltz
Copy link
Member

staltz commented Mar 7, 2023

Good question. I am sure I gave this topic a thought in the past, but can't remember at all what the derivation would look like...

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

No branches or pull requests

2 participants