Compute secret should have blinds
@calvinmetcalf 已经在做这个了。
开始于 2017年4月22日。
评估
这个 Issue 还没有评估数据。
描述
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=860771#10From
Is this timing safe? From the github page it uses a pure-JS
BigNum implementation (bn.js) for the complicated stuff, but
the README of that code doesn't mention timing at all. And
from perusing the source code of bn.js, it doesn't appear to
be the case that their implementation of exponentiation in
a prime field is geared towards constant-time execution (when
the sizes are the same).
If you look at e.g. OpenSSL's source code (bn_exp.c), there's
a specific function (bn_mod_exp_mont_consttime) in there that
takes great care of making sure that the operation runs in
constant time - down to how the memory layout is organized. I
wouldn't know how you'd even do that in an interpreted
language such as JavaScript, but even if that's possible, I'd
suspect that a lot of brain power would need to go into
designing that [1], while bn.js's implementation of the
Red.pow function seems rather straight-forward. (Which is
fine, bn.js appears to have the goal to be a generic bignum
library, and not targeted at crypto.)
What I'm saying is: while not having tested that, I believe
that this implementation of DH is going to be susceptible to
timing attacks. (And if it isn't, the author should really
provide some rationale why not, with some test results. The
README is rather sparse, though.) Which would be fine if you
just wanted to use this library to generate the DH prime
itself (that is not timing critical), or just use it in an
academic context (to let people play around with DH), but
I'd not want to use this for real-world applications of the
actual key exchange protocol.
Regards,
Christian
[1] Especially if this is to be run in browsers, with
different JITs etc. Designing algorithms in pure JS
for these environments that are timing-safe looks rather
daunting to me.
- 主要语言
- JavaScript
- 星标
- 95
- 派生
- 26
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
browserify/diffie-hellman 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 30/100
browserify/diffie-hellman#33 ·
-
难度 3/5 1-2 天 新手友好度 35/100
browserify/diffie-hellman#30 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 25/100
browserify/diffie-hellman#28 ·
-
难度 2/5 1-3 小时 新手友好度 30/100
browserify/diffie-hellman#25 · 5 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
browserify/diffie-hellman#24 ·
查看 browserify/diffie-hellman 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
capricorn86/happy-dom#2485 ·
维护者通常 2 天内回复
-
难度 2/5 1 小时以内 新手友好度 74/100
siyuan-note/siyuan#20429 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 72/100
yjh051108/dsh-routing-suite#216 ·
-
[Bug] Completion info popup (.cm-completionInfo) ignores the configured editor font可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭bug user-priority/P2
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复