<div dir="ltr"><br>On Fri, Jul 15, 2016 at 9:33 AM, Rhys Weatherley <<a href="mailto:rhys.weatherley@gmail.com">rhys.weatherley@gmail.com</a>> wrote:<br>> New Hope [1] seems to be the latest "it" PQ scheme, with Google<br>> investigating adding it to TLS.  So I did a little digging and<br>> experimenting.<br>[...]<br>><br>> I've put the details on the method on the wiki [2]<br><br><br>Thanks!, that's a great exploration of different approaches to post-quantum forward-secrecy in Noise.  Let's try to work through them and figure out what's best:<br><br><br>(1) Split(SSK) - Per current spec, the PQ handshake is handled at the application layer, which feeds a "secondary symmetric key" into Noise.  But that's punting the problem, not solving it!<br><br>Also, mixing in the SSK at the end of the handshake doesn't protect identity info exchanged during the handshake.<br><br><br>(2) Treat the PQ handshake as a DH:  Rhys combines this with (1), i.e. he does a Noise_NN handshake using a PQ algorithm in the application layer, then uses the result as an SSK to Split() the enclosing handshake.<br><br>A related approach which wouldn't require nesting Noise protocols would be to define a "combined" DH function ("25519+NewHope" or something) where "e" is actually a pair of (25519, NewHope) public values, and "dhee" performs both 25519 and NewHope, and mixes together the results.<br><br>But in either case, does it make sense to treat NewHope as a DH function?  That's an interesting terminology question.  Rhys (and the NewHope authors) argue that NewHope is DH-like.<br><br>The Noise spec actually has no definition of what a DH() function should do!  That needs fixing, e.g. with terms like "Non-Interactive Key Exchange" (NIKE) and "Gap-DH" or something to justify key reuse.<br><br>NewHope wouldn't meet those criteria:<br> * Unlike a NIKE, NewHope required ordered messages: one party presents a public key, and the other party gives them a value they can derive a shared secret from.  Rhys finesses this ("unbalanced" vs "balanced" DH), but I sort of feel that "balanced" aka "non-interactive" is the essence of DH.  Instead, NewHope seems more like a One-Pass Key Exchange (OPKE) or Key Encapsulation Method (KEM) [1].  The KEM term is used in related works (NewHope also uses it, so does NTRU-Prime [2], and Peikert [3]).<br><br> * But unlike other OPKEs / KEMs, the NewHope public key is single-use.  So we could call this an... "ephemeral KEM"?  Anyone have something better?<br><br>Anyways, because NewHope has ordering and single-use restrictions that existing DH functions don't have, it feels awkward to pretend it's the same as other DHs.  So that leaves...<br><br><br>(3)  Add new tokens for NewHope, and other post-quantum options.  For example:<br><br>  "ekem1" - Sends the first NewHope message, or a similar one-time public key from (SIDH, NTRU-Prime, etc).  Encrypts the value if "k" is present.<br><br>  "ekem2" - Sends the second NewHope message, or a similar encapsulated key, that is combined with "ekem1" to produce a 32-byte key which is provided to MixKey().  Encrypts the value if "k" is present.<br><br><br>We can easily transform any of the interactive patterns to use ekem:<br><br>Noise_XX(s, rs):                 Noise_XXekem(s, rs):<br>  -> e                                     -> e, ekem1, s<br>  <- e, dhee, s, dhse             <- e, ekem2, dhee, dhes, s, dhse<br>  -> s, dhse                           -> s, dhse<br><br>But if we want the ekem1/ekem2 values to be encrypted, maybe for indistinguishability, we could also send them later:<br><br>Noise_XX(s, rs):                 Noise_XXekem+???(s, rs):<br>  -> e                                     -> e<br>  <- e, dhee, s, dhse             <- e, dhee, s, dhse, ekem1<br>  -> s, dhse                           -> s, dhse, ekem2<br><br><br>And we could name ekem protocols like:<br><br>  Noise_XXekem_25519+NewHope_ChaChaPoly_SHA256<br><br><br>Having "ekem1" and "ekem2" be encrypted if k exists (like static DH public keys) lets us move them in or out of encryption, so that seems better than treating them like DH ephemerals which are always in clear (DH ephemerals have a special role to play in randomizing the encryption, thus can't be encrypted themselves).<br><br><br>Anyways, I tentatively like the new tokens approach (3), *if* the semantics of something like ekem1/ekem2 can be made a good-enough fit for the most-likely PQ algorithms - which I'm not sure about?<div><br></div><div><br>Trevor<br><br>[1] <a href="https://eprint.iacr.org/2009/436.pdf">https://eprint.iacr.org/2009/436.pdf</a><br>[2] <a href="https://eprint.iacr.org/2016/461.pdf">https://eprint.iacr.org/2016/461.pdf</a><br>[3] <a href="https://web.eecs.umich.edu/~cpeikert/pubs/suite.pdf">https://web.eecs.umich.edu/~cpeikert/pubs/suite.pdf</a></div><div><br></div></div>