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] fetch ECDH key from key rotate server by HTTPS #21

Open
xtexChooser opened this issue Feb 12, 2022 · 1 comment
Open

[feat] fetch ECDH key from key rotate server by HTTPS #21

xtexChooser opened this issue Feb 12, 2022 · 1 comment

Comments

@xtexChooser
Copy link

看起来rs-qq并没有从keyrotate服务器获取密钥的实现?

QQ(oicq.wtlogin.tools.e)会从https://keyrotate.qq.com/rotate_key?cipher_suite_ver=305&uin=${uin}获取指定用户的ECDH密钥并使用,QuerySpan为按秒计算的有效期。

Mirai实现:EcdhInitialPublicKeyUpdater.kt#L80
MiraiGo实现:crypto.go?L52

@lz1998
Copy link
Owner

lz1998 commented Feb 12, 2022

看起来rs-qq并没有从keyrotate服务器获取密钥的实现?

QQ(oicq.wtlogin.tools.e)会从https://keyrotate.qq.com/rotate_key?cipher_suite_ver=305&uin=${uin}获取指定用户的ECDH密钥并使用,QuerySpan为按秒计算的有效期。

Mirai实现:EcdhInitialPublicKeyUpdater.kt#L80 MiraiGo实现:crypto.go?L52

这个有 V1 和 V2,会优先用 V2,如果从服务器获取失败了,会用 V1 兜底(固定的)。现在暂时只写了 V1 的,因为比较方便。

@xtexChooser xtexChooser changed the title [feat] fetch ECDH key from server by HTTPS [feat] fetch ECDH key from key rotate server by HTTPS Feb 18, 2022
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