Compute secret should have blinds
@calvinmetcalf đang làm issue này rồi.
Từ ngày 22/4/2017.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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.
- Ngôn ngữ chính
- JavaScript
- Star
- 95
- Fork
- 26
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của browserify/diffie-hellman
-
Tests fail for Node.js >= 12Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
browserify/diffie-hellman#33 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
browserify/diffie-hellman#30 · 1 bình luận ·
-
[Bundler] BN.red is undefinedĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
browserify/diffie-hellman#28 ·
-
standalone js file?Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 30/100
browserify/diffie-hellman#25 · 5 bình luận ·
-
setPublicKey function errorĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
browserify/diffie-hellman#24 ·
Tất cả issue của browserify/diffie-hellman
Issue tương tự
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
andromarces/agent-loops#886 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug effort:low model:light plan planner:gpt-6-1-sol tests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
B: visual
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
FreeTubeApp/FreeTube#9929 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
🐛 Bug: `--clear-screen` not very useful (at least not for dealing with large test/error output)Đang mởstatus: in triage type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
mochajs/mocha#6428 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
supabase/supabase-js#2768 ·
Maintainer thường phản hồi trong vòng 1 ngày