Live data from Hacker News

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

mprimi.github.io

371–380 of 385 posts

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

#372
post #261

Earlier quoted context omitted.

To be clear: I use gpg too. But I can't expect my mom or girlfriend to learn how to use it. With PortableSecret I can communicate privately with them, without installing or learning anything new.

So explain to us the workflow of sharing data to them Problem: Send a file securely Solution: Encrypt file using PortableSecret, send file over unencrypted email. Problem: Send the decryption pasword Solution: I can't use unencrypted email to send secrets. Let me use end-to-end encrypted Signal for that --- What problem did you solve, that didn't complicate the process of just sending the file with Signal to begin wi…

> Problem: Send the decryption pasword

I can choose a password such as 'The name of uncle Robert's favorite movie' (i.e. something that it's easy for her, but hard for everyone else).

OR

I can call her, and say: 'Just sent you a password-protected file. The password is 'Foobar'

OR

I can include the password in the email itself (doesn't protect from an attacker but protects from mail provider snooping/indexing emails).

It doesn't make my communications NSA proof. It adds a little bit of privacy. For the specific use-case, it's more than enough.

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

#373

Earlier quoted context omitted.

Your tool would be safer if you used CBC (with some MAC) rather than GCM as the cipher mode, so that key & IV reuse would not be as dangerous. That said, since you generate a different salt and IV every time, the likelihood of key & IV reuse is very low, and having to implement an AEAD cipher mode by generic construction would be somewhat annoying. So I think the choice of GCM is fine enough.

I started with CBC (without MAC) and upgraded with GCM since it was a more convenient way to provide integrity without adding the MAC step manually. I should really make sure IV/Salt are regenerated automatically after use. (there is a small print warning in the creator about reuse)

> I should really make sure IV/Salt are regenerated automatically after use.

Good idea.

> I started with CBC (without MAC)

Oof, you really didn't want to do that :) Glad you upgraded to GCM.

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

#374
post #301
post #295

This is a really cool project! One thought that I have: would there be an issue sending this file in an unsecure context where MITM is a possibility? Alice sends Bob her HTML file over an unsecured medium, and Jane intercepts this traffic, and gives Bob a modified HTML file that will report the password back to Jane. Jane can set it up so that the browser still displays the local file as it's source, but has an HTTP…

100% agree. This is why I’m always a bit dubious of in-browser decryption. At any moment a little extra snippet of JS can be added to stealthily leak my secrets. There’s no great mechanism to ensure the JS I’m running is always the same JS I ran before. Compare this to a desktop app where I always know I’m running the exact same binary I ran last time. (And if I’m not then I’m probably already pwned anyway) For this…

It may be too much for moms, but maybe the html document includes the content, but a chrome extension does the work and presents the secret in the extension popup.

- attack surface area drastically reduced. only one MITM matters now, the extension installation - requires great extension UX, to help dads know where to click

less portable than just a document, but perhaps a nice middle ground

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

#375

I did something similar in the past and called it emergency contacts [1]. Basically a encrypted json that can be decrypted online. I use it to store emergency contact information in case I got stranded without any own device at hand. [1]: https://github.com/jwillmer/emergency-contacts

Interesting! Never thought of adding important contact info to my emergency stash, but in retrospect it is a great idea.

Linked your project.

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

#376
post #314

Hmm, am I missing something here? Because I have been getting HTML files exactly like this for billing from my credit card company, for years and years. It's encrypted, and, when opened, accepts a simple password for decryption. No plugins or whatsoever, just pure HTML+Javascript.

This is also pure HTML+JS without dependencies.

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

#377
post #354
post #275

Shameless plug: http://hypervault.github.io . Hypervault is a single HTML file (with no external dependencies) which allows you to encrypt files, and it outputs a single html file (with no external dependencies) with a copy of the hypervault decryption software packaged together with your encrypted data. To unlock a hyper vault, all that is needed is the encryption password (entered at creation time).

Unsolicited feedback: the contrast is killing me. It doesn't take much html/css to make a web page a bit more user friendly. See screenshot -> https://drive.google.com/file/d/1qNaBhoH2FsGlScvFmeXk9aZXouo...

That's it. I wasn't sure what it was, but something hurt my eyes when I opened it!

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

#378
post #338

Earlier quoted context omitted.

Time-limited i.e., you rotate master key after a fixed time, say 1 month/1 year etc., depending on the use case. During that period the content can be recovered by using the masterkey to unwrap the data key and decipher the content. Beyond that period, if you don't remember the master key, you cannot decrypt the content. The time-period is only a shortcut. So, for personal use, as the OP intended, resetting the maste…

Time is a finicky concept with computers. Could your time-based scheme be defeated by changing the system clock on the attacker computer?

As I explained above, time is not used in the decryption at all. You use a timer to set expiry for the masterkeyphrase. For eg: If I want to encrypt all personal communication with my family, I could use a single master key phrase for the year 2022 (for all personal correspondence). The UI could prompt me when the new year arrives to reset the master keyphrase. There would still be the file level data encryption key phrase.

In the following [] denotes a byte sequence and | denotes concatenation of two byte sequences and +/-> denotes a transformation.

Encryption

[correspondence] -> [masterkey encrypted datakey|datakey encrypted data]

Normal Decryption

[masterkey encrypted datakey|datakey encrypted data] + [datakey] -> [correspondence]

Key recovery (datakey lost/forgotten)

[masterkey encrypted datakey|datakey encrypted data] + [masterkey] -> [datakey]

Once the datakey is recovered, the encrypted data can be read.

We use keyrecovery as a backup.

We don't need to worry about clock accuracy for this as the timeframe we are talking about is in the order of days or months.

For added security you can use a different keyderivation/encryption method for the masterkey and even a different encryption method. For eg: You could use RSA to encrypt the datakey while you use AES for the data.

I hope this clarifies.

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

#379

"long sequence of words that are trivial for me to remember" I also thought so until I suddenly forgot a master password I have been using for several years. Luckily, I was able to recollect it after several days. Then, I forgot it again. Age, decease and head trauma can happen.

> decease

That one makes passwords vanish from ones memory quite effectively.

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

#380
post #301

Earlier quoted context omitted.

100% agree. This is why I’m always a bit dubious of in-browser decryption. At any moment a little extra snippet of JS can be added to stealthily leak my secrets. There’s no great mechanism to ensure the JS I’m running is always the same JS I ran before. Compare this to a desktop app where I always know I’m running the exact same binary I ran last time. (And if I’m not then I’m probably already pwned anyway) For this…

It may be too much for moms, but maybe the html document includes the content, but a chrome extension does the work and presents the secret in the extension popup. - attack surface area drastically reduced. only one MITM matters now, the extension installation - requires great extension UX, to help dads know where to click less portable than just a document, but perhaps a nice middle ground

> too much for moms

I assume you are referring to the OP's post there but I did a double take because I know some extremely technical moms.

Post reply on HN