TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Diffie-Hellman exchange for the layman

75 点作者 boris1大约 4 年前

12 条评论

MauranKilom大约 4 年前
It bears note that this is still subject to a MITM attack on whatever channel is used for the information exchange. You cannot generate a shared secret without either an existing shared secret or some form of secure authenticated communication channel in the first place. I mean, you can, but you can't be sure who it is that you're sharing the new secret with.
评论 #26906029 未加载
评论 #26901572 未加载
anon_tor_12345大约 4 年前
diffie-hellman key change for anyone:<p>given large prime p, some a, some b:<p>1. A = g^a mod p<p>2. B = g^b mod p<p>3. exchange A,B<p>4. B^a mod p = (g^b)^a mod p = (g^a)^b mod p = A^b mod p is the shared key.<p>the end
评论 #26899264 未加载
评论 #26903081 未加载
评论 #26937712 未加载
评论 #26901532 未加载
评论 #26906650 未加载
评论 #26901305 未加载
评论 #26900210 未加载
评论 #26908826 未加载
评论 #26899661 未加载
ineiti大约 4 年前
Interesting, but why does the &quot;Check&quot; use a handmade hashing algorithm that is just summing up all bytes?<p>A much safer implementation would be to take the sha256 of the key and only show the 2 rightmost bytes.
评论 #26906197 未加载
boris1大约 4 年前
I&#x27;ve improved the encrypt&#x2F;decrypt form. Now the textareas expand, and there&#x27;s a copy to clipboard button in order to copy the output. It makes it much easier to use on the phone.
boris1大约 4 年前
Update: the tool now allows to encrypt (and decrypt) files. It works in mobile browser too.
thunderbong大约 4 年前
This is really great! I liked the video explanation as well as the page which shows how we go about exchanging information using DH exchange. Will be sharing this page with some of my non-technical friends.<p>Thank you!
评论 #26934223 未加载
评论 #26906103 未加载
libeclipse大约 4 年前
Note: P-256 is not considered a safe curve. Use Curve25519 instead. See: <a href="https:&#x2F;&#x2F;safecurves.cr.yp.to&#x2F;" rel="nofollow">https:&#x2F;&#x2F;safecurves.cr.yp.to&#x2F;</a>
评论 #26906171 未加载
boris1大约 4 年前
I&#x27;ve made a new addition: now the operating system of the other party is also sent as part of the exchange. This info helps decide what software to use for further encryption. e.g. DMG or BitLocker? And, I managed to do it without making the string longer. I stuffed it in the unused bits of the compressed coordinate.
boris1大约 4 年前
I&#x27;ve simplified the page by creating two modes: &quot;simple&quot; and &quot;advanced&quot;. By default &quot;simple&quot; is shown, and it&#x27;s what you&#x27;d need if you are the recipient, rather than initiator.
doggodaddo78大约 4 年前
IIRC, aren&#x27;t there a bazillion gotchas and practical problems implementing DH where it&#x27;s definitely something one shouldn&#x27;t roll their own?
评论 #26906570 未加载
kabylake999大约 4 年前
cant help but be distracted by there being a circular picture of the author staring at me as i read this
评论 #26906528 未加载
NiceWayToDoIT大约 4 年前
Only thing I would improve on this page is to remove all remote dependencies, youtube, font, cdn files ... sw.js consonantly sending some data. Personally I do not trust Google they have way to more data, and even if all scripts are stripped questions is does Chrome collecting data as well?
评论 #26906143 未加载
评论 #26911171 未加载
评论 #26903139 未加载