enhance(ECDH): reconstruct ECDH #2123
All Vouch review confidence checks passed
Residual risk 0.13 = Change Risk (0.33) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.33 · 148 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.299
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2123"
general
weight: 0.35
sandtechnology
Metadate
ABI Change: No
Supersed #1928
Changelog
Common
common: 移动特定于 QQ 平台的实现到 OicqECDH,重新设计 ECDH,使 ECDH 类只针对算法本身,而不过多包括 QQ 协议的使用细节
感觉这样结构似乎更清晰一点
JVM-like Platform
jvm: 尝试优先使用平台加密实现,可能改善性能(and fallback to
BouncyCastleProviderexplicitly)jvm & android: 使用 curveName
secp256r1代替prime256v1,前者在 Java 中更常用,可以被更多的 JCE 实现所识别(虽然都是指同一条曲线)android: 使用系统自带的实现以减少依赖,并尝试兼容 Android P+ 版本
所以 Android P+ 上也是可以使用自带的加密库的,只是不应该指定
provider = "BC"Native
native(openssl): 中间储存密钥时,保留 OpenSSL 内部数据结构,而不反复 new & free,以便提高性能
(为了实现智能指针,需要用到
@ExperimentalStdlibApi的createCleaner,但个人认为这种风险应该可以接受)native(openssl): 直接使用 point/bignum 到 bytes 的转换,避免了使用 hex string 作为中间层,提高效率(
EC_POINT_point2oct/EC_POINT_oct2point)~mingwx64: 新增使用系统自带实现BCrypt~ (没有启用,写到快结束才发现
BCRYPT_KDF_RAW_SECRET要Win8.1及以上版本才能用,而Oicq用的又是非常见的密钥派生方式,似乎必须要拿到 raw secret 手动处理才能可用 😢,还没想好通过何种方式提供 option,先放这里了)