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 にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 ·
-
standalone js file?オープン
難易度 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
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
answerLoops/answerLoops#344 ·
メンテナーはふだん 1 日以内に返信
-
Engineering
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
techmatters/terraso-web-client#3095 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Service process inherits the caller's cwd at first use, holding that folder open on Windows (EBUSY)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
nextcloud/viewer#3424 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信