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

Init should also be encrypted to self #24

Merged
merged 5 commits into from
Mar 15, 2023
Merged

Conversation

Powersource
Copy link
Collaborator

Copy link
Member

@staltz staltz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I'm not an expert in this repo

@Powersource
Copy link
Collaborator Author

i guess i'm curious if "to yourself" should be specified further or if we leave that to the actual encryption parts of the spec(s)

Copy link
Member

@mixmix mixmix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as other PR - using own_key, or we link to part of spec that is relevnt

@Powersource
Copy link
Collaborator Author

i'm confused what own_key means, i can only find it mentioned here https://github.com/ssbc/private-group-spec/blob/master/direct-messages/README.md and it's very brief. It 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

but how does that mapping work?

@Powersource Powersource requested a review from mixmix February 17, 2023 13:49
vat msg_key = ... make up a one use key for the msg
var group_key = ... symmetric key as buffer
var own_key = ... symmetric key as buffer
var msg_key = ... make up a one use key for the msg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 this needs to be changed to clarify:

var group_key = { key, scheme: 'xxxxx' }      // key is symmetric key as buffer
var own_key = { key, scheme: 'yyyy' }          // key is a symmetric key as a buffer
var msg_key =  ... make up a one use key for the msg as a buffer

put in actual strings for xxxxx, yyyyy
And check what I'm saying makes sense in the code

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

envelopejs

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have no idea how own_key works and it's not really documented, how would i explain it to someone else lol? Different PR?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Could be in a clearer space but some of these ideas have evolved as we've used them and talked about them.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thanks it actually does mention the scheme, I'll fix.

Two issues with that section though #28 #29

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think i fixed this now

@Powersource Powersource requested a review from mixmix March 1, 2023 10:45
@Powersource
Copy link
Collaborator Author

@mixmix

@mixmix
Copy link
Member

mixmix commented Mar 14, 2023

looks perfect

@Powersource Powersource merged commit f58c2dc into master Mar 15, 2023
@Powersource Powersource deleted the recover-group-init branch March 15, 2023 12:41
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

Successfully merging this pull request may close these issues.

3 participants