<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Perhaps you should use oblivious function evaluation with a user-specific secret at the server.  So for example, server has a per-user secret key e, and user has a (salted, scrypted) password p.  Let h = hash(p) on some curve.</div><div class=""><br class=""></div><div class="">client chooses a uniformly random scalar r.</div><div class="">client -> server: Q = h^r</div><div class="">server -> client: P = Q^e = h^er</div><div class="">client computers P^1/r = h^e, and uses the hash of that point as part of the secret key derivation.</div><div class=""><br class=""></div><div class="">You can gate this interaction by the PIN code.  But even if an attacker can query it, under the one-more-DH assumption he needs N queries to check N passwords.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">— Mike</div><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 28, 2015, at 11:57 AM, Nadim Kobeissi <<a href="mailto:nadim@nadim.computer" class="">nadim@nadim.computer</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Re. Trevor and dkg,<div class="">I easily concede that further study is required. If it turns out our current passphrase model is not expensive enough, I'll hold myself to updating the Peerio client to have more stringent parameters on how generation is handled. I'm also open to improving derived-key storage in the near future. Again, I think this is overwhelmingly a threat-model issue. But the questions you raise are reasonable and I think it would be fruitful to work on improving the current model, preferably while Peerio is still in public beta.</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sat, Feb 28, 2015 at 8:46 PM, Trevor Perrin <span dir="ltr" class=""><<a href="mailto:trevp@trevp.net" target="_blank" class="">trevp@trevp.net</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Feb 27, 2015 at 7:26 AM, Daniel Kahn Gillmor<br class="">
<span class=""><<a href="mailto:dkg@fifthhorseman.net" class="">dkg@fifthhorseman.net</a>> wrote:<br class="">
> On Fri 2015-02-27 04:50:19 -0500, Nadim Kobeissi wrote:<br class="">
>> On Thu, Feb 26, 2015 at 11:55 PM, Daniel Kahn Gillmor <<a href="mailto:dkg@fifthhorseman.net" class="">dkg@fifthhorseman.net</a>> wrote:<br class="">
>><br class="">
>>> I agree that this part of the peerio/minilock approach is pretty<br class="">
>>> disconcerting, and not just because it goes against years of practice<br class="">
>>> and convention.  it opens an obvious hole (offline dictionary attacks<br class="">
>>> for high-value key material) and i'd love to see some more analysis of<br class="">
>>> the underlying tradeoffs involved.<br class="">
>><br class="">
>> My understanding is that any search would be currently simply too expensive.<br class="">
><br class="">
> I'm glad to hear that.  Do you have pointers to details of your<br class="">
> analysis?  I'd love to read those thoughts.<br class="">
<br class="">
<br class="">
</span>I echo dkg - I'd really like to see more analysis, it's not obvious<br class="">
the attack cost is that high.<br class="">
<br class="">
Back of envelope:<br class="">
<br class="">
The peerio scrypt parameters (N=2^14, r=8) have been estimated to take<br class="">
< 100 milliseconds on a single core of a 2009 Intel processor [1].<br class="">
Assuming I can rent cores at ~$0.04/hr [2] = $1/day, that means:<br class="">
 - about $1 per 2^20 (~1 million) guesses<br class="">
 - about $1K per 2^30 guesses<br class="">
 - about $1M per 2^40 guesses<br class="">
<br class="">
How much entropy is in peerio passphrases?  The tutorial video [3]<br class="">
suggests choosing a sentence "that is unique to you, like moments<br class="">
shared with friends, or childhood memories", and gives a couple<br class="">
examples:<br class="">
 "My mother makes the best cheesecake." (36 chars)<br class="">
 "Waffles the cat had blue eyes" (29 chars)<br class="">
<br class="">
You'll find various estimates for entropy-per-English character, but 1<br class="">
to 1.5 bits per character seems common [4].  This is very crude, but<br class="">
that would put sentences like above in the 30-50 bit range.  So it<br class="">
seems plausible that a million-dollar 2^40 attacker might have a good<br class="">
chance of success targeting a single account.<br class="">
<br class="">
(I guess the zxcvbn password-strength-checker is estimating these as<br class="">
>100 bits entropy?  That seems high.  Maybe zxcvbn is tuned for<br class="">
passwords, not sentences?).<br class="">
<br class="">
If the attacker spread his bets he'd do better.  For example, the<br class="">
milllion-dollar attacker could try a billion common phrases against a<br class="">
thousand accounts.  Specialized hardware would be even more efficient.<br class="">
<br class="">
Note also that this is a powerful attack - if it succeeds, the<br class="">
attacker can log in as you and read your old messages, without needing<br class="">
server compromise or traffic interception.<br class="">
<br class="">
Anyways, these numbers are so rough there's huge uncertainty - maybe<br class="">
people will do a good job choosing weird, high-entropy sentences.  Or<br class="">
maybe they'll just choose song lyrics, or simple facts about their<br class="">
life well known to their estranged spouse / family members.  I don't<br class="">
know what data exists for this, it would be a great M-Turk study.<br class="">
<br class="">
<br class="">
Trevor<br class="">
<br class="">
<br class="">
[1] <a href="http://www.tarsnap.com/scrypt/scrypt.pdf" target="_blank" class="">http://www.tarsnap.com/scrypt/scrypt.pdf</a><br class="">
[2] <a href="https://cloud.google.com/compute/#pricing" target="_blank" class="">https://cloud.google.com/compute/#pricing</a><br class="">
[3] <a href="https://www.youtube.com/watch?v=1jrtAnwHU14" target="_blank" class="">https://www.youtube.com/watch?v=1jrtAnwHU14</a><br class="">
[4] <a href="http://en.wikipedia.org/wiki/Entropy_(information_theory)" target="_blank" class="">http://en.wikipedia.org/wiki/Entropy_(information_theory)</a><br class="">
</blockquote></div><br class=""></div>
_______________________________________________<br class="">Messaging mailing list<br class=""><a href="mailto:Messaging@moderncrypto.org" class="">Messaging@moderncrypto.org</a><br class="">https://moderncrypto.org/mailman/listinfo/messaging<br class=""></div></blockquote></div><br class=""></body></html>