TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Encrypted Communication via GitHub Using Node.js and SSH Keys

39 pointsby jlankover 9 years ago

10 comments

mmalecki_over 9 years ago
This exists already: <a href="https:&#x2F;&#x2F;github.com&#x2F;substack&#x2F;cipherhub" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;substack&#x2F;cipherhub</a>
评论 #10186631 未加载
fredleyover 9 years ago
&gt; Your private key is not being stolen, read the code!<p>I&#x27;d change this to:<p>&gt; Is your private key being stolen? Read the code!
评论 #10186630 未加载
tptacekover 9 years ago
To function, both the reader and writer have to download special software. If you&#x27;re going to do that, why not just have both sides download PGP?
评论 #10187133 未加载
评论 #10186556 未加载
tptacekover 9 years ago
Is this what I think it is? An ECB-mode RSA implementation?
评论 #10186364 未加载
评论 #10186282 未加载
评论 #10186714 未加载
评论 #10186520 未加载
Laawover 9 years ago
Cool, but what I love more about this (post) is how helpful the comments are!<p>It reminds me of the old bash.org quote that basically said the best way to get help from the Internet is not to ask, but to assert an answer, and let people correct you.
sarciszewskiover 9 years ago
Using libsodium, there are two routes you can go:<p><pre><code> - crypto_box() for authenticated public-key encryption - crypto_box_seal() for anonymous public-key encryption (with message authentication) </code></pre> I know for a fact that there are JS bindings for libsodium.<p><a href="http:&#x2F;&#x2F;doc.libsodium.org&#x2F;bindings_for_other_languages&#x2F;index.html" rel="nofollow">http:&#x2F;&#x2F;doc.libsodium.org&#x2F;bindings_for_other_languages&#x2F;index....</a><p>For PHP developers:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;paragonie&#x2F;pecl-libsodium-doc&#x2F;blob&#x2F;master&#x2F;chapters&#x2F;05-publickey-crypto.md#crypto-box" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;paragonie&#x2F;pecl-libsodium-doc&#x2F;blob&#x2F;master&#x2F;...</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;paragonie&#x2F;pecl-libsodium-doc&#x2F;blob&#x2F;master&#x2F;chapters&#x2F;08-advanced.md#crypto-box-seal" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;paragonie&#x2F;pecl-libsodium-doc&#x2F;blob&#x2F;master&#x2F;...</a>
bobbywilson0over 9 years ago
I have also built something similar, I knew of the existence of cipherhub, but my goal was to focus on the ease of use, with the browser (<a href="https:&#x2F;&#x2F;mailbeam.io" rel="nofollow">https:&#x2F;&#x2F;mailbeam.io</a> and <a href="https:&#x2F;&#x2F;github.com&#x2F;bobbywilson0&#x2F;gh-message" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;bobbywilson0&#x2F;gh-message</a>). I do admit that my solution is not as easy as it should be yet.<p>You should consider with RSA keys have a limited size message that can be encrypted (e.g. for 2048 bit keys you are limited to 256 bytes in your message). My solution was to use the SSH key to encrypt the secret I used to encrypt the message with.
评论 #10187182 未加载
评论 #10187105 未加载
hardwaresoftonover 9 years ago
IIRC, asymmetric key encryption is not preferred for large message lengths -- maybe the author could consider embedding an randomly generated AES key, and using that to encrypt the message instead?
评论 #10186651 未加载
hellbannerover 9 years ago
Related: <a href="https:&#x2F;&#x2F;www.agwa.name&#x2F;projects&#x2F;git-crypt&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.agwa.name&#x2F;projects&#x2F;git-crypt&#x2F;</a>
philip1209over 9 years ago
Keybase.io + Gists works well too!