Live data from Hacker News

Show HN: Portable Secret – How I store my secrets and communicate privately

mprimi.github.io

81–90 of 385 posts

Re: Show HN: Portable Secret – How I store my secrets and communicate privately

#81
post #10
post #4

It would be awesome if this could be code-golfed into a small enough package to fit in a QR code.

Do you mind expanding? Specifically, what do you mean by de-golfed (I'm only vaguely aware of what 'kids' mean by code-golf these days, and I'm kinda lost on de-golfing). What would you like to fit into a QR code? A PortableSecret (e.g. html file)?

Not just QR code, may be small enough secrets fit in a URL (2KB I think is the limit)!

See also the now defunct sharelock.io by Auth0: https://news.ycombinator.com/item?id=9109924

For creating and later validating magic-links (using Web APIs), I encode the IV, Salt, Cipher all in the URL as a single base64 token: https://github.com/celzero/otp/blob/cddaaa03f12f765fa8da9178...

(Btw, reading through your code makes me wonder if I should pad the plaintext to match blocksize despite https://archive.is/NX7Y2)?

Re: Show HN: Portable Secret – How I store my secrets and communicate privately

#83
post #69

The main problem with this is that someone uses it outside of its intended use cases, which even cultured people are missing. Jokes aside, great hack!

Definitely intended for more technical audiences, lots of sharp edges.

Re: Show HN: Portable Secret – How I store my secrets and communicate privately

#84
post #47

Earlier quoted context omitted.

Very creative and efficient use of $400 on PR/advertising!

$400 or $0? I don't think of it as PR/Ad. It's a bounty. If you put in time to find a flaw, you deserve at least that much (and I'll give you more if you help me fix it).

Why can't it be both?

Re: Show HN: Portable Secret – How I store my secrets and communicate privately

#85
post #80

Works pretty well on Android! Unfortunately, today I learned that FireFox doesn't seems to support opening html files. When I download the html file FF isn't one of the options to open it. Only Chrome. Anyone know an way around this?

On what OS? They're all slightly weird about file associations.

Re: Show HN: Portable Secret – How I store my secrets and communicate privately

#86
post #2

"Do you think this cannot possibly be secure? Great, prove it. This secret contains the recovery key for a Bitcoin wallet. Crack it and take my money!" Love it.

What happened to the "don't roll your own crypto" that HN loves?

Re: Show HN: Portable Secret – How I store my secrets and communicate privately

#87
This has some desirable security properties, but I would like to see more analysis on the security side (not just: is secure or is not secure).

Passwords:

- Easy to memorize. Pro: Does not rely on a device, can be recovered if devices stolen.

- Easy to phish. Con: Attacker can use a look-a-like page, click-jacking, and pixel extraction (frame stealing) attacks to get password & secret.

- Easy to brute force. Con: Relies on human adherence to password best practices to maintain sufficient entropy. Learning from industry that this does not work in widespread adoption. This will work for certain power users.

Cryptography:

- Uses current state of art algos. Pro: Resistant to access by known methods.

- Will become obsolete. Con: Eventually the secrets will become exposed due to advances in crypt-analysis. Mitigation: Don't store anything to remain secure for decades, shorter lived is okay.

- Secrets are encrypted once. Con: Any issue (there have been many) in WebCrypto implementation at time of encryption can not be fixed by browser upgrade (because of secret caching).

- Secrets can be extracted from page and cracked elsewhere offline. Note: Security features such as timers, throttling, guess limits can not be enforced. They must be implemented e.g. in PBKDF.

Client Side Security:

- Cached objects. Note: For example a web page with browser vulnerability can walk JS objects and get existing secrets. Browser may also cache secrets, passwords, inputs, images to disk where they are not protected.

- Web Browser WebCrypto and Same Origin Bypasses. Pro: Browsers have updates and are constantly being improved to enforce security model. Con: The direction the W3C goes in future (tens of years) is not certain and security model may change. Implementation issues in browser web APIs and Same Origin (common) can put secrets at risk.

- Secret hosting. Con: Hosting content on other servers (e.g. github) may not allow management of access control. For example hosting on one subdomain could now or in future allow JS on sister pages to interact with page and the resources loaded, enabling side-loading attacks in JS. This may not be in control of victim if they uploaded their secret to be hosted by another party.

- Trusted hosting. Con: Any untrusted source of HTML can steal the secrets, e.g. by serving malicious javascript along with the secret. This means the security of the hosting party and trust in the hosting party is required. (Note: this con was added in an edit)

Re: Show HN: Portable Secret – How I store my secrets and communicate privately

#88
post #2

"Do you think this cannot possibly be secure? Great, prove it. This secret contains the recovery key for a Bitcoin wallet. Crack it and take my money!" Love it.

What happened to the "don't roll your own crypto" that HN loves?

I can't be the only one who thinks this wallet will be emptied before 2023.

Security by obscurity is real, there's nothing secret about defining the problem space in which your attackers can search.

Re: Show HN: Portable Secret – How I store my secrets and communicate privately

#89
post #80

Works pretty well on Android! Unfortunately, today I learned that FireFox doesn't seems to support opening html files. When I download the html file FF isn't one of the options to open it. Only Chrome. Anyone know an way around this?

On what OS? They're all slightly weird about file associations.

On Android. It is a known issue which Mozilla don't seem to intend to fix: https://github.com/mozilla-mobile/fenix/issues/7546

Re: Show HN: Portable Secret – How I store my secrets and communicate privately

#90
post #20
post #13

This is really cool! The "lost thumbdrive" comment makes me wonder if a browser from 20 years (or more) in the future will still have enough legacy functionality to decrypt these payloads.

Even if not, it's affordable to hire a programmer for a few hours to migrate the code to the newer API.

I doubt that would work. You can’t decrypt things encrypted 20 years ago on modern API’s because those algorithms are known to be insecure. You’d have to probably rewrite it from scratch or install an old version of the browser. So it’s probably best to keep a windows version of the browser since that’s currently the only OS that can run software from 20 years ago, so hopefully they’ll still be able to do that 20 years from now.
Post reply on HN