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

feat(encrypt): support encrypt when sync #11

Merged
merged 49 commits into from
Dec 1, 2023
Merged

feat(encrypt): support encrypt when sync #11

merged 49 commits into from
Dec 1, 2023

Conversation

GoldenSheep402
Copy link
Contributor

创建新组的时候生成密钥链
获取加密的密钥是根据提供的gid获取
修改master_key时,将服务器上用户相关的密钥全部更新

@GoldenSheep402 GoldenSheep402 requested a review from asjdf November 5, 2023 13:32
proto/sync/v1/sync_service.proto Outdated Show resolved Hide resolved
proto/sync/v1/sync_service.proto Outdated Show resolved Hide resolved
proto/sync/v1/group.proto Outdated Show resolved Hide resolved
proto/sync/v1/sync_service.proto Outdated Show resolved Hide resolved
proto/sync/v1/sync_service.proto Outdated Show resolved Hide resolved
@GoldenSheep402 GoldenSheep402 requested a review from asjdf November 6, 2023 06:51
@asjdf asjdf changed the title Feat/encrypt: support encrypt when sync feat(encrypt): support encrypt when sync Nov 6, 2023
proto/sync/v1/group.proto Outdated Show resolved Hide resolved
proto/sync/v1/sync_service.proto Outdated Show resolved Hide resolved
@@ -48,8 +60,11 @@ message SyncResponse {
repeated Identity identity_set = 14;
}

// 如果是用于创建新的组,则提供master_key,用于加密rsa密钥
message UpdateRequest {
Copy link
Member

Choose a reason for hiding this comment

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

建议请求名称打全,UpdateRequest的翻译结果是“更新请求”,单独看很难看出来是update啥

Copy link
Member

Choose a reason for hiding this comment

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

看起来是历史遗留的问题x 之前只有update一点东西x

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这个命名 确实难绷了

Copy link
Member

Choose a reason for hiding this comment

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

尚未完善

proto/sync/v1/sync_service.proto Outdated Show resolved Hide resolved
proto/sync/v1/sync_service.proto Outdated Show resolved Hide resolved
@GoldenSheep402 GoldenSheep402 requested a review from asjdf November 6, 2023 08:56
@asjdf
Copy link
Member

asjdf commented Nov 6, 2023

image

proto/sync/v1/group.proto Outdated Show resolved Hide resolved
@@ -48,8 +60,11 @@ message SyncResponse {
repeated Identity identity_set = 14;
}

// 如果是用于创建新的组,则提供master_key,用于加密rsa密钥
message UpdateRequest {
Copy link
Member

Choose a reason for hiding this comment

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

尚未完善

proto/sync/v1/sync_service.proto Outdated Show resolved Hide resolved
@asjdf
Copy link
Member

asjdf commented Nov 14, 2023

来观测一下进度x

@GoldenSheep402 GoldenSheep402 requested a review from asjdf November 15, 2023 05:52
Copy link
Member

@asjdf asjdf left a comment

Choose a reason for hiding this comment

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

还是有一些偏差,需要一个改以及沟通

proto/sync/v1/group.proto Outdated Show resolved Hide resolved
proto/sync/v1/sync_service.proto Outdated Show resolved Hide resolved
proto/sync/v1/sync_service.proto Outdated Show resolved Hide resolved
proto/sync/v1/sync_service.proto Outdated Show resolved Hide resolved
proto/sync/v1/sync_service.proto Outdated Show resolved Hide resolved
proto/sync/v1/sync_service.proto Outdated Show resolved Hide resolved
proto/sync/v1/sync_service.proto Outdated Show resolved Hide resolved
proto/sync/v1/sync_service.proto Outdated Show resolved Hide resolved
proto/sync/v1/group.proto Outdated Show resolved Hide resolved
string publicKey = 9; // 公钥,公钥存在服务器上,加密的私钥与相关用户关联存储
}

message GroupKeyChain{
Copy link
Member

Choose a reason for hiding this comment

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

这东西我没明白作用啊

Copy link
Member

Choose a reason for hiding this comment

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

sync的时候肯定还得鉴权,不能单靠key来管 另外key是在用户的keyWallet里头 而不是在群组下

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这个PubKey是用来加密具体组的密钥,不是个人的

Copy link
Contributor Author

Choose a reason for hiding this comment

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

打算是用于加密组的组PubKey和组直接放一起 作为基本信息,PriKey直接存到用户KeyWallet下,鉴权的话涉及密钥操作就判断是否是管理和非管理的区别

@GoldenSheep402 GoldenSheep402 requested a review from asjdf November 15, 2023 11:27
@daidr
Copy link
Member

daidr commented Nov 22, 2023 via email

@GoldenSheep402
Copy link
Contributor Author

草 看到了

@asjdf asjdf merged commit b8bcae9 into main Dec 1, 2023
2 of 3 checks passed
@GoldenSheep402 GoldenSheep402 deleted the feat/encrypt branch December 16, 2023 05:08
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