Live data from Hacker News

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

mprimi.github.io

251–260 of 385 posts

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

#251
Hate to be that guy that ruins parties but there's a couple of obvious issues here

Firstly, the repeated Java Script delivery problem

The library that generates random numbers is bundled in your browser. However, the code that calls that library is delivered from network every time, e.g.

let iv = crypto.getRandomValues(new Uint8Array(blockSize));

This code depends on what the server yields for every connection. There is no audit trail to check how the program behaved in the past.

Secondly, passwords. When you're grandma-proofing your product, introducing a low entropy secret from which key is derived creates a weak link for the communications' key. Stretching the key with PBKDF2 doesn't really help because the initial entropy is so low.

Ideally you want very strong key stretching with memory hard hash functions like Argon2, and you'll want to target local encryption of strong random keys with the password, not the communications itself. This is why we want public key authentication for SSH server and no passwords. It's safer that the weak password stays on the user's device.

Lastly, encryption is about converting confidentiality problem into a key management problem. This application doesn't solve the key delivery problem, if exchanging a secret such as the password over e.g. a telephone line is what you need to do, you might as well use that line to exchange the super secret comms.

The author describes this as a hack, when in reality it's just a bad product that doesn't make it easy to automate best practices. I have much more trust in stuff like Signal that generates (and upgrades automatically) strong secrets, uses public key crypto, and allows authenticating key exchanges with values that are safe to say over even an eavesdropped channels.

There's even open source and reproducible builds. That stuff isn't grandma proof, but at least its researcher proof when there at least IS some audit trail.

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

#252

Earlier quoted context omitted.

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.

I'd be happy to see the wallet emptied. This is what the bounty is for. I just hope whoever cracks it lets me know how they did it and how hard it was. This is what a bounty is, no?

$400 is nothing, put your life savings into this system if you trust it so much.

It's a cute marketing gimmick, that's about it.

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

#253
post #251

Hate to be that guy that ruins parties but there's a couple of obvious issues here Firstly, the repeated Java Script delivery problem The library that generates random numbers is bundled in your browser. However, the code that calls that library is delivered from network every time, e.g. let iv = crypto.getRandomValues(new Uint8Array(blockSize)); This code depends on what the server yields for every connection. There…

Crypto is a browser built-in, it’s not being loaded over the network at all. The HTML file is self-contained.

Even if it was loading remote scripts, they could be secured by using an integrity hash (another modern browser feature).

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

#254
post #251

Hate to be that guy that ruins parties but there's a couple of obvious issues here Firstly, the repeated Java Script delivery problem The library that generates random numbers is bundled in your browser. However, the code that calls that library is delivered from network every time, e.g. let iv = crypto.getRandomValues(new Uint8Array(blockSize)); This code depends on what the server yields for every connection. There…

Hate to be that guy that ruins your security researcher dreams. Your Argon2 memory hard function is useful against mass surveillance and belongs in mass market products. Let's leave it there.

Despite your protests, for an average joe who just wants to stash a secret somewhere and not have it in plaintext, this is absolutely ok.

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

#255
post #178
post #131

If anyone is actually going to use this for their top secrets, I can find two things to be aware of. * When you decrypt then close the tab and open the tab again via the recently closed tab, the password is still there. * Browser extensions could read the contents of the webpage. So if anyone is going to use this, they should do it in a "clean" incognito browser without any extensions.

For me the biggest problem with a setup like this is complete loss of access to my secrets. The crypto functions supported by browsers may change in future. A cipher algorithm used to encrypt my secrets may get deprecated and removed by the browser in future. Then I will be left with a bunch of HTML files with data that the browsers cannot decrypt anymore. GPG or vim -x might be much better choices for secrets that n…

All of these crypto functions have many implementations in every popular programming language that return the exact same bits no matter which implementation you use. As long as you have the keys (which is a serious issue) and someone remembers which function was used with which parameters the risk of "will be left with a bunch of HTML files with data that the browsers cannot decrypt anymore." is not even on the same scale as getting hit by lightning but rather on the same scale as getting hit by lightning during clear weather in a deep basement.

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

#256

Earlier quoted context omitted.

this doesn't, it uses the browser's builtin Web Cryptography API. if using a crypto algorithm also counts as "rolling your own crypto" then what's left? just don't encrypt anything, ever, because HN says we shouldn't roll our own?

Yes, using a crypto algorithm also counts as rolling your own crypto. You're putting together crypto libs that others wrote. Most crypto vulnerabilities come from glueing together solid crypto implementations. The glueing has to be solid too. Just "using" a crypto algorithm sounds like a recipe for a vulnerability. I'm not a crypto expert, I'm just telling you what I've been reading on HN for the past few years.

You're not completely wrong in that it's still possible to f up, even when using misuse resistant primitives.

The difference is, you're sort-of allowed to f up if it's an intelligent mistake that teaches the creators of misuse resistant libraries a thing or two about where they went wrong. If OTOH you're clearly just yoloing it, introducing your pseudo-math BS into the mix, or intentionally deviating from best practices or breaking it, then it's on you.

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

#257

Cyphers, the algorithms used to encrypt the secret file, become obsolete over time. We still need to solve for obsolescence. You can encrypt a file today using a cypher that will eventually be removed from all browsers, desktops, and phones.

XChaCha20-Poly1305 will probably never go out of fashion.

Argon2 is only making itself in, phasing it out will take decades. OTOH you have a point in that the author's implementation PBKDF2 is being used, and that should already have retired a decade ago.

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

#258
post #221

Earlier quoted context omitted.

Keys should be random. The hints make it too easy. Lets say there exist 100 male names and 100 female names, thats just 100*100 combinations for names part. You could make the key generation intentionally slow though to limit the crack speed.

> You could make the key generation intentionally slow though to limit the crack speed. Am attacker keen enough to bruteforce can easily copy the ciphertext, IV, and salt to a tool that doesn't have a slowdown. Or, just modify the JS to remove the artificial slowdown.

Presumably they are using some KDF (Key derivation function) that is designed to be algorithmically slow in some way that you can't trivially sidestep.

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

#260
post #95

if you've got to communicate the decryption key separately anyway, might as well just use password protected zip files, no?

Indeed, it's functionally similar to password-protected PDF or ZIP for some use cases . You should probably not treat password-protected zips as secure: https://security.stackexchange.com/questions/35818/are-passw...

The argument your answer makes discusses confidentiality issues with passwords in Zip-files, yet the Portable Secret application doesn't take any major steps or use best practices like Argon2 to solve "brute forcing the password" problem.
Post reply on HN