Live data from Hacker News

SpiderOak Encryptr – Zero-Knowledge Password Syncing

github.com

51–60 of 63 posts

Re: SpiderOak Encryptr – Zero-Knowledge Password Syncing

#51

Earlier quoted context omitted.

One reason that was never merged was because it was a flawed patch to a non-problem. - Erin @ SpiderOak

The "non-problem" of a biased PRNG is that you get reduced entropy in your generated passwords, thus reducing security. The "flaw" in the pull request was fixed in a later commit (by switching to Uint8Array instead of Uint32Array), and then it was ignored by the SpiderOak team.

Selecting one of 84 characters purely randomly gives you 6.3923174227787602763 bits of entropy.

Selecting one of 84 characters by using modulus on a 32 bit random number gives you 6.3923174227787602889 bits of entropy.

It is a bug, but it is absolutely a non-problem. The difference you would get from using 83 or 85 characters is many orders of magnitude larger; this is not something that needs such an enormous level of precision.

Re: SpiderOak Encryptr – Zero-Knowledge Password Syncing

#52
post #46

Earlier quoted context omitted.

One reason that was never merged was because it was a flawed patch to a non-problem. - Erin @ SpiderOak

Can you go into more detail about this? Because I hear "biased RNG" and the switch that flips in my head is "never use this thing".

The password generator gets 32 bit random values and then does modulus 84 to pick characters. There is a bias, but it has as much entropy as a perfect generator choosing out of 83.999999999999999 characters.

Edit: The question in my mind is whether it was oversight or intentional simplicity. The first is a bad sign, the second isn't a big deal.

Re: SpiderOak Encryptr – Zero-Knowledge Password Syncing

#53
post #46

Earlier quoted context omitted.

One reason that was never merged was because it was a flawed patch to a non-problem. - Erin @ SpiderOak

Can you go into more detail about this? Because I hear "biased RNG" and the switch that flips in my head is "never use this thing".

Considering how tiny the bias is along with the added complexity of the solution (in a chaotic language like Javascript, no less), I'd say the SpiderOak people are not crazy for not having accepted it. There would be somewhat of an argument here if the original was reducing random bytes modulo 84. As it is, this is almost like dinging EdDSA for doing a similar thing: reducing a 512-bit number modulo a 252-bit integer instead of doing the 'proper' procedure.

Re: SpiderOak Encryptr – Zero-Knowledge Password Syncing

#54

Earlier quoted context omitted.

I lean towards "No". For example, this was never merged: https://github.com/SpiderOak/Encryptr/pull/180 I eventually closed it because I keep an eye on https://github.com/pulls and it was unnecessary clutter.

One reason that was never merged was because it was a flawed patch to a non-problem. - Erin @ SpiderOak

While I agree that 2^32%85 produces a minuscule bias, there's this thing called base 64 that interoperates pretty well with arbitrary byte strings.

Re: SpiderOak Encryptr – Zero-Knowledge Password Syncing

#55
post #46

Earlier quoted context omitted.

Can you go into more detail about this? Because I hear "biased RNG" and the switch that flips in my head is "never use this thing".

The password generator gets 32 bit random values and then does modulus 84 to pick characters. There is a bias, but it has as much entropy as a perfect generator choosing out of 83.999999999999999 characters. Edit: The question in my mind is whether it was oversight or intentional simplicity. The first is a bad sign, the second isn't a big deal.

Considering they had earlier tickets opened by their own team to fix it and hadn't, I'm calling "oversight".

https://github.com/SpiderOak/Encryptr/issues/49

That being said, I do agree with your analysis that the impact of this isn't a problem for users.

Re: SpiderOak Encryptr – Zero-Knowledge Password Syncing

#56
post #53
post #46

Earlier quoted context omitted.

Can you go into more detail about this? Because I hear "biased RNG" and the switch that flips in my head is "never use this thing".

Considering how tiny the bias is along with the added complexity of the solution (in a chaotic language like Javascript, no less), I'd say the SpiderOak people are not crazy for not having accepted it. There would be somewhat of an argument here if the original was reducing random bytes modulo 84. As it is, this is almost like dinging EdDSA for doing a similar thing: reducing a 512-bit number modulo a 252-bit integer…

> I'd say the SpiderOak people are not crazy for not having accepted it.

They didn't simply not accept it.

They tossed one bit of feedback my way, which I addressed in a follow-up commit, and then they neglected to do anything further. No discussion, no rejection, etc.

If they wanted to reject it because of complexity concerns, I would have been fine with that. At least it would have been some sort of closure, and I wouldn't feel like the person I replied to originally about this project being inactive. If it turns out that they're actually still planning to develop it further, I'm happy to be proven wrong about that.

Today, 'dchest wrote a superseding PR that solves the problem while maintaining a very small code diff, and I'd prefer his solution over my own. (I have no ego about my JavaScript coding skills. There are tens of millions of people who can do it better than me.)

Re: SpiderOak Encryptr – Zero-Knowledge Password Syncing

#57
post #53

Earlier quoted context omitted.

Considering how tiny the bias is along with the added complexity of the solution (in a chaotic language like Javascript, no less), I'd say the SpiderOak people are not crazy for not having accepted it. There would be somewhat of an argument here if the original was reducing random bytes modulo 84. As it is, this is almost like dinging EdDSA for doing a similar thing: reducing a 512-bit number modulo a 252-bit integer…

> I'd say the SpiderOak people are not crazy for not having accepted it. They didn't simply not accept it. They tossed one bit of feedback my way, which I addressed in a follow-up commit, and then they neglected to do anything further. No discussion, no rejection, etc. If they wanted to reject it because of complexity concerns, I would have been fine with that. At least it would have been some sort of closure, and I…

Thank you for your interest and efforts to contribute to the project.

I think there were some questions about your patch that you did not answer, and reviewers moved to other projects. Honestly we felt overall the patch was low quality. Certainly the serious error in the first version of the patch which dramatically added bios didn't help. In general we had already completed auditing the selection approach taken by the existing password generation code and did not want to consider a different approach for little benefit.

We should have given you better feedback. Sorry.

Re: SpiderOak Encryptr – Zero-Knowledge Password Syncing

#58
post #45

Earlier quoted context omitted.

One reason that was never merged was because it was a flawed patch to a non-problem. - Erin @ SpiderOak

Wow. While the bias was tiny, I expect more from crypto software. Calling it a "non-problem" is very strange. Edit: submitted another patch https://github.com/SpiderOak/Encryptr/pull/263

Thank you! We'll take a look.

By the way: I recognized your nick from various repos you've authored/contributed to. Always really solid stuff!

Re: SpiderOak Encryptr – Zero-Knowledge Password Syncing

#59
post #8

I prefer pass, which uses GPG and regular bash scripts to store passwords. You can sync the directory of encrypted passwords via git too. No fancy stuff. https://www.passwordstore.org/

What is the easiest way to access such a store from a phone? Assume I have synchronized the encrypted files myself.

I haven't figured that one out yet! :(

Re: SpiderOak Encryptr – Zero-Knowledge Password Syncing

#60
post #8

I prefer pass, which uses GPG and regular bash scripts to store passwords. You can sync the directory of encrypted passwords via git too. No fancy stuff. https://www.passwordstore.org/

What is the easiest way to access such a store from a phone? Assume I have synchronized the encrypted files myself.

For Android: Password Store! https://github.com/zeapo/Android-Password-Store It's on F-Droid (not sure about Google Play) and it works really well. You need another app to manage your keys, but there is OpenKeyChain for that (also on F-Droid).
Post reply on HN