HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
jes
hardbin
JavaScript2017–2017
jes / hardbin

hardbin

Encrypted pastebin using IPFS

4Distinct people
4Mentions
2Explicit recommenders
257GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Encrypted pastebin using IPFS

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

I'm not deeply familiar with IPFS, but on a cursory look it appears to be accurate that it optionally[1] offers authentication via HMAC for file objects. Can you indicate how…

dsacco used a recommendation phrase. 2 indexed comments match. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:03:16 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by day4 dated mentions

Observed mentions: 2017-05-23 09:16:16 UTC to 2017-06-22 13:15:04 UTC.

01232017-05-23 00:00:00 UTC to 2017-05-24 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 commentsMay 232017-05-24 00:00:00 UTC to 2017-05-25 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-05-25 00:00:00 UTC to 2017-05-26 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-05-26 00:00:00 UTC to 2017-05-27 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-05-27 00:00:00 UTC to 2017-05-28 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-05-28 00:00:00 UTC to 2017-05-29 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-05-29 00:00:00 UTC to 2017-05-30 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-05-30 00:00:00 UTC to 2017-05-31 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-05-31 00:00:00 UTC to 2017-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-06-01 00:00:00 UTC to 2017-06-02 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-06-02 00:00:00 UTC to 2017-06-03 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-06-03 00:00:00 UTC to 2017-06-04 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-06-04 00:00:00 UTC to 2017-06-05 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-06-05 00:00:00 UTC to 2017-06-06 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-06-06 00:00:00 UTC to 2017-06-07 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-06-07 00:00:00 UTC to 2017-06-08 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsJun 72017-06-08 00:00:00 UTC to 2017-06-09 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-06-09 00:00:00 UTC to 2017-06-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-06-10 00:00:00 UTC to 2017-06-11 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-06-11 00:00:00 UTC to 2017-06-12 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-06-12 00:00:00 UTC to 2017-06-13 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-06-13 00:00:00 UTC to 2017-06-14 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-06-14 00:00:00 UTC to 2017-06-15 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-06-15 00:00:00 UTC to 2017-06-16 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-06-16 00:00:00 UTC to 2017-06-17 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-06-17 00:00:00 UTC to 2017-06-18 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-06-18 00:00:00 UTC to 2017-06-19 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-06-19 00:00:00 UTC to 2017-06-20 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-06-20 00:00:00 UTC to 2017-06-21 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-06-21 00:00:00 UTC to 2017-06-22 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-06-22 00:00:00 UTC to 2017-06-23 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsJun 22

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
May 232017-05-23 00:00:00 UTC2017-05-24 00:00:00 UTC303
May 242017-05-24 00:00:00 UTC2017-05-25 00:00:00 UTC000
May 252017-05-25 00:00:00 UTC2017-05-26 00:00:00 UTC000
May 262017-05-26 00:00:00 UTC2017-05-27 00:00:00 UTC000
May 272017-05-27 00:00:00 UTC2017-05-28 00:00:00 UTC000
May 282017-05-28 00:00:00 UTC2017-05-29 00:00:00 UTC000
May 292017-05-29 00:00:00 UTC2017-05-30 00:00:00 UTC000
May 302017-05-30 00:00:00 UTC2017-05-31 00:00:00 UTC000
May 312017-05-31 00:00:00 UTC2017-06-01 00:00:00 UTC000
Jun 12017-06-01 00:00:00 UTC2017-06-02 00:00:00 UTC000
Jun 22017-06-02 00:00:00 UTC2017-06-03 00:00:00 UTC000
Jun 32017-06-03 00:00:00 UTC2017-06-04 00:00:00 UTC000
Jun 42017-06-04 00:00:00 UTC2017-06-05 00:00:00 UTC000
Jun 52017-06-05 00:00:00 UTC2017-06-06 00:00:00 UTC000
Jun 62017-06-06 00:00:00 UTC2017-06-07 00:00:00 UTC000
Jun 72017-06-07 00:00:00 UTC2017-06-08 00:00:00 UTC000
Jun 82017-06-08 00:00:00 UTC2017-06-09 00:00:00 UTC000
Jun 92017-06-09 00:00:00 UTC2017-06-10 00:00:00 UTC000
Jun 102017-06-10 00:00:00 UTC2017-06-11 00:00:00 UTC000
Jun 112017-06-11 00:00:00 UTC2017-06-12 00:00:00 UTC000
Jun 122017-06-12 00:00:00 UTC2017-06-13 00:00:00 UTC000
Jun 132017-06-13 00:00:00 UTC2017-06-14 00:00:00 UTC000
Jun 142017-06-14 00:00:00 UTC2017-06-15 00:00:00 UTC000
Jun 152017-06-15 00:00:00 UTC2017-06-16 00:00:00 UTC000
Jun 162017-06-16 00:00:00 UTC2017-06-17 00:00:00 UTC000
Jun 172017-06-17 00:00:00 UTC2017-06-18 00:00:00 UTC000
Jun 182017-06-18 00:00:00 UTC2017-06-19 00:00:00 UTC000
Jun 192017-06-19 00:00:00 UTC2017-06-20 00:00:00 UTC000
Jun 202017-06-20 00:00:00 UTC2017-06-21 00:00:00 UTC000
Jun 212017-06-21 00:00:00 UTC2017-06-22 00:00:00 UTC000
Jun 222017-06-22 00:00:00 UTC2017-06-23 00:00:00 UTC101

What Hacker News says

4 sources
It's not my API, it's the standard IPFS writable gateway API, documented here: https://discuss.ipfs.io/t/writeable-http-gateways/210 And there's an example usage here: https://github.com/jes/hardbin/blob/master/js/hardbin.js#L25 There is currently a bug which means you first need to DELETE the filename (in my case "content") that you are trying to replace if it already exists, but apart from that it is straightforward. I started fixing the bug here https://github.com/ipfs/go-ipfs/pull/3931 but ran out of steam - hopefully I'll continue soon.
In Show HN: IPFessay – Publish uncensorable essays to IPFS
dsacco·May 23, 2017Recommendation phrase
I'm not deeply familiar with IPFS, but on a cursory look it appears to be accurate that it optionally[1] offers authentication via HMAC for file objects. Can you indicate how this works in hardbin? I don't see any mention of it in the GitHub readme - is it activated by default or is it assumed that a user has it activated in their own copy of IPFS? Also, while I have you, I recommend you use SJCL for generating random bytes in response to this: https://github.com/jes/hardbin/issues/1.[2] On a meta note, can I ask why you didn't go with something like Tahoe-Lafs[3] if you were looking for a secure, decentralized file store system? I don't immediately know that it would have been better per se, but I'm not quite sure what IPFS provides that you can't get otherwise. EDIT: I'm not trying to grief you here, but there are three people in this t
Read the rest
hread already (myself included) who know security very well (professionally so), and I want to point out comments like this one and the GitHub issue that was opened are good-faith attempts at that. __________________________________________________________________ 1. https://ipfs.io/ipfs/QmR7GSQM93Cx5eAg6a6yRzNde1FQv7uL6X1o4k7... 2. https://bitwiseshiftleft.github.io/sjcl/doc/symbols/sjcl.prn... 3. https://tahoe-lafs.org/trac/tahoe-lafs
In Hardbin: secure encrypted pastebin
garrettr_·May 23, 2017Recommendation phrase
A quick look at the source code shows the generate_key() function [0] to be insecure. It generates 32 random bytes (good, that's what you need for an AES-256 key), but then it uses those random bytes to sample from a distribution which only has 62 characters. This significantly reduces the security of the key, from 256 bits of entropy to ~190 bits (log2(62^32)). And that would be in the best case, if it were sampling uniformly from the distribution - it is not. I recommend reading Section 9.7 of Cryptography Engineering [1] to understand why choosing random elements from a set is harder than it seems. A good example of a similar bug is the nasty bug in Cryptocat's PRNG from 2013 [2]. I assume this step was done so the AES key could be included in the URL fragment, since a set of random bytes may not be url safe. I recommend feeding the ra
Read the rest
ndom bytes of the key directly into the underlying cryptographic functions, and using a urlsafe encoding at a higher level when necessary. Also, it appears you are using AES [3], a block cipher, but I cannot figure out what block cipher mode you are using. I'll have to dig into the CryptoJS code a little more to see what it defaults to, but I have a sinking feeling that it's ECB, which is completely insecure. Dan Boneh's Crypto I course on Coursera is a good way to learn the basics of block cipher modes. [0]: https://github.com/jes/hardbin/blob/c77c2d7eb93586e0e009ea4b... [1]: https://www.amazon.com/Cryptography-Engineering-Principles-P... [2]: https://nakedsecurity.sophos.com/2013/07/09/anatomy-of-a-pse... [3]: https://github.com/jes/hardbin/blob/c77c2d7eb93586e0e009ea4b...
In Hardbin: secure encrypted pastebin

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.