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.
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.
There is no reason not to use Argon2 in place of weaker alternative, especially when there's no UX overhead.
The threat model "for an average Joe who just wants to stash a secret somewhere and not have it in plaintext" should probably be written in red, font size 48. But take a look what the author is actually saying it can be used for, i.e. to "securely store passwords". The currently available tools like KeepassXC that do just that, also use Argon2. "Your Argon2 memory hard function is useful against mass surveillance and belongs in mass market products." Well if this product isn't for mass-market, it's for niche use, and here I thought niche products are usually for the special security cases for people who need extra security, but you're implying average Joes should NOT use mass market grade security but something niche and less secure.
Thank you for mentioning Argon2, I didn't know about it.
https://en.wikipedia.org/wiki/Argon2 > There is no reason not to use Argon2 In this case, the reason for not using Argon2 is that it's not available: https://www.w3.org/TR/WebCryptoAPI/ > Well if this product isn't for mass-market This is a demo for self-contained HTML encrypted secrets. Do with it what you want.
Definitely not a product in the current format.
This is password protected, so then an attacker must crack the password. The author exchanges the password over a phone call, which requires the password to be relatively weak, meaning the password is probably crackable.
Exchanging the password via a second channel that the other user can copy and paste a more difficult password from to decyrpt the document might be more secure. The password may be more exposed, but an attacker would have to compromise both channels. Basically use two messaging platforms (one of which could be email) ideally where at least one channel is sent encrypted. For example if the other party is using their mobile phone to view the payload they should have a messaging app to copy and paste from that is at least encrypted in transit if not e2e.
This is not meant as a solution. It's a demo of a self-contained, self-extracting, portable encrypted file.
That said, the password strength and the strength of the side-channel to transmit it depend on your use case. If we were friends for example, I may not need to send you a password at all.
I could just add some secret questions we both know in the hint. Or, at the opposite side of the spectrum, I could send you a secret as email attachment and *include the password in the email itself*.
This adds zero security in certain scenarios, but for example it keeps Google bots out of your private correspondence. Which is all I want sometimes.
Challenge: make it possible to use something like Diffie Hellman[0] to exchange a key securely even over an unsecure channel but where they resulting key is actually the password to type in and "reads" like https://xkcd.com/936/ i.e. something my grandma could type in. Without reducing the key space too much to be insecure ;)
The author recommends the use of XKCD correct-horse-battery-staple style passwords (aka diceware), which have a high ratio of entropy to ease of transmission effort.
In other words they're relatively easy to exchange over a phone call but still secure.
And you can compose them from "pre shared" secrets.
For example, the password hint for a secret I send to my sister: - The name of our neighbors cat - The name of your first boyfriend who scratched dad's car - Mom's nickname for aunt Ilda Concatenate those three with a dot. And voila, a pretty secure password without need of a side channel. (just made this up, I don't have a sister...)
It does not mean the password needs to be weak at all. Make it a full sentence with punctuation, like:
"Don't you hate passwords that need a number and symbol?" Easy enough to transmit over the phone and definitely more difficult than the ubiquitous "Password1!" that most people I know end up using to meet password "security" requirements. Also, phone exchange can be preferable for many people who are less tech comfortable
Passwords being transmitted over a voice call does not equate to a weak password. You can very easily communicate 4-6 English words outside the 10,000 most common to produce a password with 49-83 bits of entropy. And most people will have just as easy a time remembering 5 words as 5 alphanumerics, if not easier.
There is nothing requiring the password to be “weak”. It can be a strong password generated with a random number/strong password generator. Sharing a string of characters or a “weak phrase” is no different if reading it to the person.
28 words would be about 200 characters, though, and I don't think simply existing somewhere in plaintext is enough -- what if I said it is the first 28,000 words of the Latin Bible -- would you still consider that a weak password because it exists in plain text somewhere?
I took a list of "2000 most common English words" used metaphopne to eliminate words that sound similar to other words on the list, and reduced it to a power of 2. I ended up with 512 words that are probably in all fluent English speakers vocabularies so can easily be read over the phone. It's 9 bits per word, so 7 words is 63 bits of entropy which means it's (on average) 2^62 times more computational work to brute-force than it is do decrypt. That's a pretty good margin to have.
If they were using a stupid hash like, say, MD5 the time to brute force that would still be months on a GPU, but they are using PBKDF2/SHA-1 which is significantly more work.
There needs to be a new browser standard for sandboxed html files (.htmlsbx files) that only open in a special sandboxed tab with no off-page connectivity allowed.It would be perfect for this.
Comments (376) 84 threads
Earlier commentsFirstly, 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.
Even if it was loading remote scripts, they could be secured by using an integrity hash (another modern browser feature).
But yeah my bad, apparently the actual problems with this tools are with usage, password hashing, and non-existent secret sharing mechanisms.
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.
The threat model "for an average Joe who just wants to stash a secret somewhere and not have it in plaintext" should probably be written in red, font size 48.
But take a look what the author is actually saying it can be used for, i.e. to "securely store passwords". The currently available tools like KeepassXC that do just that, also use Argon2.
"Your Argon2 memory hard function is useful against mass surveillance and belongs in mass market products."
Well if this product isn't for mass-market, it's for niche use, and here I thought niche products are usually for the special security cases for people who need extra security, but you're implying average Joes should NOT use mass market grade security but something niche and less secure.
Thank you for mentioning Argon2, I didn't know about it. https://en.wikipedia.org/wiki/Argon2
> There is no reason not to use Argon2
In this case, the reason for not using Argon2 is that it's not available: https://www.w3.org/TR/WebCryptoAPI/
> Well if this product isn't for mass-market
This is a demo for self-contained HTML encrypted secrets. Do with it what you want. Definitely not a product in the current format.
Continue this thread — 1 reply
That said, the password strength and the strength of the side-channel to transmit it depend on your use case.
If we were friends for example, I may not need to send you a password at all. I could just add some secret questions we both know in the hint.
Or, at the opposite side of the spectrum, I could send you a secret as email attachment and *include the password in the email itself*. This adds zero security in certain scenarios, but for example it keeps Google bots out of your private correspondence. Which is all I want sometimes.
> I created Portable Secret to securely exchange documents via email with my mother, who can’t be expected to learn PGP, age, or similar.
[0] https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exc...
In other words they're relatively easy to exchange over a phone call but still secure.
For example, the password hint for a secret I send to my sister:
- The name of our neighbors cat
- The name of your first boyfriend who scratched dad's car
- Mom's nickname for aunt Ilda
Concatenate those three with a dot. And voila, a pretty secure password without need of a side channel.
(just made this up, I don't have a sister...)
"Live well, Laugh Often, Love Much"
"Don't you hate passwords that need a number and symbol?"
Easy enough to transmit over the phone and definitely more difficult than the ubiquitous "Password1!" that most people I know end up using to meet password "security" requirements.
Also, phone exchange can be preferable for many people who are less tech comfortable
Psalms23:2
and have a 14 word passphrase.
If they were using a stupid hash like, say, MD5 the time to brute force that would still be months on a GPU, but they are using PBKDF2/SHA-1 which is significantly more work.
Extends OP's page to allow saving secrets for later use.
All comments shown.
Couldn't load more comments. Check your connection and try again.