HNHacker News
TopNewBestAskShowJobs

mprime1

1,164 karma · joined October 16, 2020

https://www.mpri.me
submissionscomments
mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
Ditto.

And in addition: peace of mind.

Having a copy may not do much from legal perspective, but I'm just less worried if I know it's there.

mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
Cool!

Main difference I see: you have thousands of lines of JS in your vault. Mine is a lot simpler because it uses the browser Cryptography APIs.

Linked your project from the README.

mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
Author here.

I do use a password manager.

PortableSecret is a complement, not a replacement.

e.g. where do you store the recovery key for your password manager?

I also use this to store tax documents and other mildly secret documents which definitely don't belong in a password manager that copies to who-knows-where-and-in-how-many-copies.

mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
"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!". I'm sorry but that's not how security works.

That's not how security works, but that's how a bounty works. If you can do ___, then you get ___. That's it.

If it's any consolation, I sent this project to (security professional) colleagues in the past to get their take on it. This is also not how security works, but to me is better than nothing.

Remember this is not a product. I don't care if you use it. I'm just sharing my hack for carrying secrets around without needing a special device or key.

mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
A 'portable secret' is a self-contained HTML file. You can open and decrypt it without an internet connection. This is I think one misunderstanding.

The second one is that you can open the file in an editor and verify what it does before trying to decrypt.

Any modern browser also has protections that prevent a random HTML file from acting like a virus (stealing and uploading files).

mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
> might want a JavaScript decryption library to improve portability and lifespan

How does a library improve portability and lifespan? I'm only using NIST-recommended encryption algorithms provided by W3C Crypto APIs.

> The obvious weakness is your hosted document creator: it’s essentially impossible to defend an HTML document against a malicious domain. We can look at your GitHub repo, but there’s no guarantee that’s the exact code that’s running.

I agree. As clearly stated in various places, this is a demo. Take the idea and fork/re-implement it for yourself.

mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
Thank you for the pointer

https://clipperz.com

mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
Right, agree with all of that. I would have characterized as "user can shoot themselves on the foot (i.e. by choosing weak password)", rather than "easy to bruteforce"
mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
Thank you for the insightful comments.

Not looking for users TBH. :-)

re: bug in the vendor implementation of cryptography. Doesn't this apply to everything you encrypt?

mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
And there are ciphers who have lived much longer than 30 years...

https://en.wikipedia.org/wiki/Caesar_cipher

mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
By "long sequence of words that are trivial for me to remember" I meant concatenation of secret questions, like in the bounty example: https://mprimi.github.io/portable-secret/examples/bounty.htm...

Unless I hit my head really hard, there's zero chance I will forget this passphrase.

mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
Looking at the HTML/JS code does tell you how to implement decryption in a different language.

That's because it only uses NIST recommended encryption, which is baked in or available in most languages.

mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
> 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

These are NIST-recommended algorithms, they'll be around for a while...

mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
But not secure...

https://security.stackexchange.com/questions/35818/are-passw...

mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
Phishing is indeed the most glaring vulnerability of this.

While it's very real in theory, I am not concerned in practice.

If I am the target of a sophisticated attacker, there are easier and more effective ways to pwn me.

A few other comments reference the same, e.g.: https://news.ycombinator.com/item?id=34085245

mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
Thank you!
mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
You are saying padding might be superfluous because of AES-GCM, correct?

(I was using AES-CBC before, that's why the padding is there)

mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
> If you got the decryption code plus the payload small enough you could theoretically put the whole thing into a data URL (a URL that doesn't link to a remote resource, but contains all the data needed to display a web page)

This is how the 'secret creator' page works :-)

mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
Neat! I knew I could not possibly be the only one that had this idea.

Linked your project.

mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
Yes, that's one way to put it.

p.s. don't use password protected archives: https://security.stackexchange.com/questions/35818/are-passw...

mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
Genius.

As the old adage says 'any problem can be resolved by adding one more layer of indirection'.

mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
I agree phishing is the most scary vulnerability for this.

In practice, when exchanging emails with my mom, I'm not concerned about it.

A sophisticated attacker has many easier ways to get into my stuff than creating a fake PortableSecret.

(more detail in a different comment: https://news.ycombinator.com/item?id=34084887)

mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
I suppose that's a different implementation of the same 'hack' demo'd here, with the encryption carried out by an extension.
mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
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?

mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
I'm not that confident in my tool.

That said, I ask myself every day if having my public identity associated to my project, website, etc. Was a good idea.

It certainly helped with jobs in the past, but it's scary to hear stories of devs impersonated by others.

mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
Thank you.

> most security professionals (myself included!) aren't equipped to outright "crack" this kind of thing in just a few minutes

When I say 'crack' in this context, I mean review the scheme and point out any obvious flaws, like you just did!

> SHA-1 -> SHA2-256

I should do this!

> reuse an IV

Indeed (there is a fine-print in the creator page that says "don't reuse across messages", but I should just regenerate proactively)

Thank you very much for the great comment!

mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
Thank you for the comment and thoughts. Agree with most, disagree with some (easy to brute-force?), but I wanted to comment on this in particular:

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

This to me is the most glaring "vulnerability". i.e. I use this to exchange letters with my friend Bob. Now someone impersonates me and sends a fake 'PortableSecret' to Bob that siphons out the actual password.

Clearly this is a valid vector of attack, and one I made no attempts at defending from.

The thing is... this won't happen. If I'm dealing with an attacker so sophisticated to pull this off, it's likely they have 1000 other vectors that are more effective and dangerous.

I have to keep reminding myself this is a real vector, but the fear is irrational.

As they say at DEFCON to people too concerned using their devices: "Nobody is wasting their 0day on you".

I don't think I'm a target valuable enough to attract this kind of attacker.

mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
Cool! Added a link to your project
mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
I'm willing to sweeten the deal.

What amount of money would make you actually try to crack it?

mprime1··on Show HN: Portable Secret – How I store my secrets and communicate privately
All words appear in some wordlist.

This is the kind of password I use to protect my actual secrets. So if someone is able to crack it, I'd like to know. The bounty is for a 'realistic' use case.

← PreviousPage 4 of 7Next →