<div dir="ltr"><div class="gmail_default"><div class="gmail_default">I am just putting together a little protocol to perform a key exchange over some DH like protocol and spit out an opaque identifier which will typically be a ticket of some sort.</div><div class="gmail_default"><br></div><div class="gmail_default">[Oh yes, I am considering going down the tickets with embedded public keys route, it solves a lot of server side issues maybe]</div><div class="gmail_default"><br></div><div class="gmail_default">So, I don't actually have the usual opaque nonces in my code, I am doing the signal trick of a multi-way handshake using one time use keys as nonces. So my question is, should I be calling them a nonce or is that going too far and going to confuse folk.</div><div class="gmail_default"><br></div><div class="gmail_default">This is a presentation layer (i.e. HTTP) exchange which has the primary purpose of authenticating the client to the server and establishing a shared secret that will be used in future communications and binding it to an opaque identifier which is typically a ticket.</div><div class="gmail_default"><br></div><div class="gmail_default">So the client knows a, b, and in the initial connection sends:</div><div class="gmail_default"><br></div><div class="gmail_default">{ClientCredential, ClientCredential} being e^a, e^b<br></div><div class="gmail_default"><br></div><div class="gmail_default">The service knows x, y, replies with </div><div class="gmail_default"><br></div><div class="gmail_default">{ServerCredential?, ServerNonce} being e^x, e^y<br></div><div class="gmail_default"><br></div><div class="gmail_default">The agreed key is either e^aby or e^abxy and the usual key derivation is used to establish the session key to be used on subsequent communications. </div><div class="gmail_default"><br></div><div class="gmail_default">The response and all future messages are authenticated according to the requirements specified in <Choice>. If encryption is specified, this is used for all messages following the response (because the client has to be able to read the response to decrypt it).</div><div class="gmail_default"><br></div><div class="gmail_default">Authenticating at the message layer in this way achieves the following</div><div class="gmail_default"><br></div><div class="gmail_default">1) Determines that the message was sent by the client.</div><div class="gmail_default">2) Since each transaction MUST have separate authentication, frames transactions to defeat script injection attacks.</div><div class="gmail_default">3) Enables but does not provide defense against replay attack.</div><div class="gmail_default"><br></div><div class="gmail_default"><br></div><div class="gmail_default">The protocol schema is shown below, assume that Algorithms contains something sensible. Right now I am only supporting AES-CBC and HMAC-SHA2-512 (truncated) because that is what my libraries support.</div><div class="gmail_default"><br></div><div class="gmail_default"><br></div><div class="gmail_default">    Transaction Admin Exchange ExchangeRequest ExchangeResponse</div><div class="gmail_default"><span style="white-space:pre">            </span>Description</div><div class="gmail_default"><span style="white-space:pre">                   </span>|Perform Key Exchange to establish shared key bound to a ticket. </div><div class="gmail_default"><br></div><div class="gmail_default"><br></div><div class="gmail_default"><span style="white-space:pre">  </span>Message ExchangeRequest</div><div class="gmail_default"><span style="white-space:pre">               </span>External Goedel.Protocol.Request</div><div class="gmail_default"><span style="white-space:pre">              </span>Description</div><div class="gmail_default"><span style="white-space:pre">                   </span>|Initiate the key exchange request.</div><div class="gmail_default"><span style="white-space:pre">           </span>Struct Key ClientCredential</div><div class="gmail_default"><span style="white-space:pre">                   </span>Description</div><div class="gmail_default"><span style="white-space:pre">                           </span>|The client credential (required)</div><div class="gmail_default"><span style="white-space:pre">             </span>Struct Key ClientCredential</div><div class="gmail_default"><span style="white-space:pre">                   </span>Description</div><div class="gmail_default"><span style="white-space:pre">                           </span>|Additional key added into the exchange to serve as a nonce. (required)</div><div class="gmail_default"><div class="gmail_default"><span style="white-space:pre">            </span>Struct Algorithms Offer</div><div class="gmail_default"><span style="white-space:pre">                       </span>Description</div><div class="gmail_default"><span style="white-space:pre">                           </span>|Set of algorithms offered by the client</div></div><div class="gmail_default"><br></div><div class="gmail_default"><span style="white-space:pre"> </span>Message ExchangeResponse</div><div class="gmail_default"><span style="white-space:pre">              </span>External Goedel.Protocol.Response<span style="white-space:pre">    </span></div><div class="gmail_default"><span style="white-space:pre">              </span>Description</div><div class="gmail_default"><span style="white-space:pre">                   </span>|Returns the server parameters.</div><div class="gmail_default"><span style="white-space:pre">               </span>Binary Ticket</div><div class="gmail_default"><span style="white-space:pre">                 </span>Description</div><div class="gmail_default"><span style="white-space:pre">                           </span>|Opaque session identifier.</div><div class="gmail_default"><span style="white-space:pre">           </span>Struct Key ServerCredential</div><div class="gmail_default"><span style="white-space:pre">                   </span>Description</div><div class="gmail_default"><span style="white-space:pre">                           </span>|Optional server credential</div><div class="gmail_default"><span style="white-space:pre">           </span>Struct Key ServerNonce</div><div class="gmail_default"><span style="white-space:pre">                        </span>Description</div><div class="gmail_default"><span style="white-space:pre">                           </span>|Additional key added into the exchange to serve as a nonce (required).</div><div class="gmail_default"><div class="gmail_default"><span style="white-space:pre">            </span>Struct Algorithms Choice<br></div></div><div class="gmail_default"><div class="gmail_default"><span style="white-space:pre">                     </span>Description</div><div class="gmail_default"><span style="white-space:pre">                           </span>|Set of algorithms chosen by the service</div></div></div></div>