Changes

Np1sec

15,431 bytes added, 9 years ago
Ximin and Trevor comments applied
An unauthenticated exchange of the OTR version identifier can pose a threat to authenticity as shown in [BM]: the adversary can force clients to downgrade to an older, (potentially insecure) version of the protocol. They also note the Diffie-Hellman key exchange failure in delivering authentication in the presence of an active adversary. Furthermore, they show that the early publication of MAC keys for the purpose of forgeability can easily enable the active adversary to forge messages during the conversation (instead of the intended forgeability after the conversation has ended). Finally, they argue that in an environment where the adversary is controlling the whole network, she can effectively disarm the protocol of its forgeability property.
Various attempts have been made to construct an efficient multiparty (known as group) authenticated key exchange protocol. OTR authors proposed a generalisation of two-party OTR to a multiparty use-case in [GUVGC09]. However, they did not specify the cryptographic primitives, neither did they give a formal definition of the adversaries nor the proof of the algorithm’s security (reduction). Although a more robust key exchange is proposed, some primary performance analysis of the implementation of the key agreement protocol has been shown to be impractically slow, especially on mobile devices [Gun13a][Git11]. [LVH13] proposes GOTR as an alternative to [GUVGC09] with goal of improving some of the security and practical properties of [GUVGC09]. Most notable change in GOTR compared to the original mpOTR proposal in [GUVGC09] is the use of p2p private channels to send message digest to establish transcript consistency and implicitly message origin authenticity between users. GOTR strives to imporve on repundibility and forgibility of the [GUVGC09]. It has been claimed that GOTR is to provide online repundibility (deniability against online judge), per message forgibility and and forging the entire transcript by a single party (the third seems possible by [GUVGC09] as long as a deniable AKE is being used). The notation of online repundibilty relies on the judge controling up to '''N-2''' parties while the two remaining "honest" parties are allowed to collude. This is an rather unusual notion for both repundibility and honesty. [LVH13] also proposes an involved contributory BD based key agreement scheme, which disregard room consistancy and turn GOTR into a broadcast scheme (c.f. Appendix B).
=III. Design rationale =
In modelling the chat session, in terms of the adversarial models and protocol specifications, the notation of [ACMP10] is followed. This notation is common to other publication on group key exchange such as [GBNM11], and is adherred to for consistency.
<span>'''Definition IIIV.1 Multi-party chat session'''</span>'': Let <math>\mathcal{U} = \{U_1,...,U_m\}</math> be the set of possible participants. A multi-party chat session is an ordered pair <math>S := (\mathcal{S}, sid)</math> in which <math>\mathcal{S} \subset \mathcal{U}</math> and <math>sid</math> is the unique session id. Without loss of generality we assume <math>\mathcal{S} = \{U_1,...,U_n\}</math> and we interchangeably refer to party <math>U_i</math> by index ''i''. Furthermore, it is assumed that party <math>U_i</math> is presented and identified verifiably by a long-term persistence key pair <math>(LPK_{U_i}, LSK_{U_i})</math>.''
<span>'''Definition IIIV.2 sub session'''</span> After session ''S'' is established, A subset of participants <math>\mathcal{T}\subset \mathcal{S}</math> might want to start a session in which parties in <math>\mathcal{T}\backslash\mathcal{S}</math> are excluded (for example when those parties leave the chatroom). In such a setting we say <math>T := (\mathcal{T}, sid^T)</math> is a subsession of ''S''. When there is no need to specify the subsession of choice, we use <math>spid</math> to refer to <math>sid^T</math>.
<span>'''Definition IIIV.3''' ''An'' '''authenticated group key exchange (AGKE)'''</span> ''is Algorithm <math>\Pi</math> which each honest party will execute in order to communicate (by means of sending, receiving or computing) a cryptographic secret - namely a key - among the other parties of a session. By <math>\Pi^S_i</math> (or <math>\Pi_i</math> when the underlying session is understood) we are referring to an instance of <math>\Pi</math> which the party <math>U_i</math> executes to achieve the collective goal. Further more we define'':
* <span>'''Session id as seen by <math>U_i</math>'''</span>'': Session id <math>sid</math> will be derived during the execution of the protocol. The session id is computed by <math>\Pi^S_i</math> (the instance of the protocol run by <math>U_i</math> for session ''S'') and is indicated by <math>sid^S_i</math>, or <math>sid_i</math> when there is no concern of confusion''
* <span>'''Participant list'''</span>'': <math>plist^S_i</math> is the list of participants which <math>U_i</math> believes are participating in the chat session ''S''.''When there is no ambiguity in the underlying session, we simply use <math>plist_i</math> notation.* <span>'''key id'' is the serial number given to the P2P keys generated during the process of key exchange, is computed as <math>Hash(U_i|y_i|U_j|y_j)</math>.* <span>'''Ephemeral key list'''</span>'': <math>klist^S_i</math> is the list of ephemeral public key <math>y_j = g^{x_j}</math>'s of all participants which <math>U_i</math> believes they are using in the chat session ''S''.'' When there is no ambiguity in the underlying session, we simply use <math>klist_i</math> notation instead. We use the notaion of <math>plist_i|klist_i<\math> to represent ordered concatenation of <math>U_i|y_i</math> pairs as in <math>U_1|y_1|\dots|U_n|y_n</math>. The order is assumed to be computable by all participants (lexicographically ordered using long term public key of participants, for example).
* <span>'''Session key of <math>\Pi^S_j</math> as seen by <math>U_i</math>'''</span>'': <math>sk^S_i</math> (or <math>sk_i</math>) is the session key of session ''S'' as computed by <math>\Pi_i</math>. It represents the cryptographic secret computed by AGKE, it can be a set of secrets. The essential defining factor is that it should become common knowledge for the session participants at the end of AGKE execution. Similarly we define <math>subk_i</math> to represent the subsession key''
* <span>'''Accepted state'''</span>'': A party enters the accepted state if it has computed <math>sk^S_i</math> and has detected no errors in the protocol.''
===Authenticated Key Exchange Adversary===
====Adversarial power====
 
The following set of functions model the AKE adversarial threats. The adversary for the authenticated key exchange can mount an attack through a sequence of call to the functions, outlined below. The limitation on the order and condition of calling these functions is defined per adversary. We will re-use these definitions to demonstrate similar routes for other adversaries considered by the threat models in later sections.
== '''VII.1 Design of Deniable Authenticated Signature Key Exchange'''==
We have chosen our deniable signature key exchange protocol following the conclusions in [Gun13b] - by identifying a secure key exchange protocol that satisfies our needs. We then apply the triple Diffie-Hellman authenticated exchange to grant it properties of deniability[Ma13]. Subsequently, one can apply the same approach presented in [Gun13b] to communicate ephemeral signature keys during the key establishment process. However, for efficiency, we use the same ephemeral Diffie-Hellman private and public values used to deniably authenticate users and generate secret shares to produce ephemeral signatures.
For the choice of the base authenticated key exchange protocol, we suggest a variant based on [ACMP10]. The rationale for the choice is laid out as follows:
<!--* [BVS05] has existed for years and its various security aspects have been investigated by several researchers including [GBNM11] and [BCGNP08] which gives [BVS05] an advantage over newer algorithms.!-->
* [ACMP10] only needs one round of key re-agreement in the case of a participant leaving the chat, while [BVS05] enforces re-computation of Diffie-Hellman ephemeral keys and hence needs a minimum of two rounds plus overhead of re-authenticating the new ephemeral keys. This can significantly improve the efficiency of casual chat sessions where participants frequently enter and exit the chat.
* Although the Schnorr based algorithm suggested in [BVS05] satisfies a more comprehensible deniable model, Triple triple Diffie-Hellman authenticated key exchange only needs two rounds of communication and can be done alongside the key agreement steps, while the Schnorr based algorithm of [BVS05] needs four rounds.
* Although key exchange algorithms based on the standard model are considered theoretically more secure than those based on the random oracle model, there has been no proposal for a 2-round protocol in the standard model that promises forward secrecy. Therefore, due to the importance of usability and efficiency in our approach, we opted to for a ROM based protocol such as described by [BVS05] and [ACMP10].
However, if the adversary is controlling the network structure, denial or delay of service is always possible. The consistency of the transcript (i.e. all participants see the same transcript in the same order) relies on the means of transport guaranteeing reliable delivery, with a single order, to every participant. In other words, we are verifying the ''reception'' of the message by the intended ''recipients''.
 
By assuring transcript consistency, we also preventing <math>U_i</math> from sending different messages to <math>U_j</math>, <math>U_k</math> while they believe they are seeing the same conversation. In absence of transcript consistency, when a central server is managing the chatroom, this attack requires <math>U_i</math> to conspire with server, which is permeable in ''(n+1)sec'' threat model in accordance with the definition of transcript consistency in [GUVGC09].
The protocol offered in this document examines the transcript for such consistency. In the case that the underlying transport fails to provide this level of consistency, clearly the consistency test will fail. In this sense, failure of consistency does not distinguish between malicious activities or the absence of a reliable transport.
==VIII.1 Schematic view of the key exchange==
Although computing The protocol computes a unified session key for all participant is possibleparticipants. This imposes, in particular, the protocol will compute ''n'' different keys each being used to decrypt the text received from the corresponding participant. In other words, Participant necessity that all <math>U_iplist_i</math> uses key <math>sk_{i' is identical for all participants. However,i}</math> to encrypt data. Formally we consider a tuple as consistent view is part of <math>sk^S_i := ''(sk^S_{i,n+1})sec'' security model,sk^S_{i,2},...,sk^S_{i,n})</math> as a session key. This measure has been taken to facilitate the transition to a broadcast use-case where it does not impose extra limitation on the protocol does not promise same <math>plist</math> for all participants and therefore, it is conceptually impossible to compute a unique key. For more information please see [[#Participatory_vs_individually_independent_computation_of_group_keys|Appendix B: Participatory vs individually independent computation of group keys]].
For simplicity, group operation is written multiplicatively (even though it is actually an elliptic curve point operation traditionally represented by addition).
For simplicity, group operation is written multiplicatively (even though it is actually an elliptic curve points operation and traditionally represented by addition). Whenever our design deviates from [ACMP10], it is marked in {{Font color|black|yellow|yellow}}. We have abstracted out the steps mentioned in [ACMP10] as an independent primitive in {{Font color|black|pink|pink}}:
'''Algorithm 1'''
{| border="1" cellspacing="0" cellpadding="5" align="center"
!align="center"|Round
!align="center"|Step
!align="right"|Description
!align="center"|Type
|-
|align="center"|1
|align="center"|1
|align="right"|Generate ephemeral DH private key
|align="center"|Computation
|-
|align="center"|
|align="center"|2
|align="right"|Generate DH key for BD, Triple DH and Signature
|align="center"|Computation
|-
|align="center"|
|align="center"|3
|align="right"|Broadcast User identity and the DH key
|align="center"|Broadcast
|-
|align="center"|2
|align="center"|4
|align="right"|Compute Session Id
|align="center"|Receive
|-''(n+1)sec''
|align="center"|
|align="center"|5
|align="right"|Generate Triple Diffie-Hellman P2P keys
|align="center"|Computation
|-
|align="center"|
|align="center"|6
|align="right" |Generate key confirmations
|align="center"|{{Font color|black|yellow|<math>kc_i \leftarrow (H(k_{i,1}, U_1),\dots,H(k_{i,n}, U_n))</math>}}
|align="center"|BroadcastComputation
|-
|align="center"|
|align="center"|7
|align="right"|Generate secret shares
|align="center"|Computation
|-
|align="center"|
|align="center"|8
|align="right" |Encrypt shares
|align="center"|Computation
|-
|align="center"|
|align="center"|9
|align="right"|Sign identity, shares
|align="center"|Computation
|-
|align="center"|
|align="center"|10
|align="right"|Broadcast encrypted shares and confirmation
|align="center"|Broadcast
|-
|align="center"|-
|align="center"|11
|align="right"|Check validity of key confirmation
|align="center"|Receive
|-
|align="center"|
|align="center"|12
|align="right"|Check signatures
|align="center"|Computation
|-
|align="center"|
|align="center"|13
|align="right"|Check Session Ids
|align="center"|Computation
|-
|align="center"|
|align="center"|14
|align="right"| Generate session key
|align="center"|{{Font color|black|pink|<math>sk_{i,j} \leftarrow H(GroupDec(k_{i,j}, z_j \; \forall j),sid_i, U_j) \; \forall j \neq i</math>}}
|align="center"|Computation
|}
 
===Triple Diffie-Hellman authentication===
''(n+1)sec'' uses a varient of Triple Diffie-Hellman (TDH) protocol also employed in Textsecure protocol [Mo13] to carry on mutual deniable authentication as well as peer-to-peer secret key exchange. It can be seen as a variation of [SoKi00] key exchange, however, unlike SoKi00], as it does not multiply all three DH secrets and therefore is not suspticble to attacks mentioned in [BoMa10].
 
By using TDH secret both in p2p key as well as in key confirmation step, (n+1)sec both implicitly and explicitly authenticate the peers.
 
In Algorithm 1, TDH and the original group key exchange from [ACMP10] has been combined to provide a deniable authenticated group key exchange. Here, we single out TDH Algorithm 1.1 for better presentation of the protocol for the reader.
 
'''Algorithm 1.1''' Triple Diffie-Hellman between <math>U_i</math> and <math>U_j</math>
 
{| border="1" cellspacing="0" cellpadding="5" align="center"
!align="center"|Step
!align="right"|Description
!align="center"|Pseudo-code
!align="center"|Type
|-
|align="center"| Round 1
|align="center"|1
|align="right"|Generate ephemeral DH private key
|align="center"|<math> x_i \leftarrow [0, order(g)]</math>
|align="center"|Computation
|-
|align="center"|
|align="center"|2
|align="right" | Generate ephemeral DH public key
|align="center"|<math>y_i \leftarrow g^{x_i}</math>
|align="center"|Computation
|-
|align="center"|
|align="center"|3
|align="right" | Broadcast User identity and the DH key
|align="center"|<math>(U_i, y_i)</math>
|align="center"|Broadcast
|-
|align="center"| Round 2
|align="center"|4
|align="right" |Receive other party id and ephemeral DH public key
|align="center"|<math>(U_j|y_j)</math>
|align="center"|Receive
|-''(n+1)sec''
|align="center"|
|align="center"|5
|align="right"|Generate Triple Diffie-Hellman P2P keys
|align="center"|<math>k_{i,j} \leftarrow H({y_j}^{LSK_{U_i}},LPK_{U_j}^{x_i},y_j^{x_i}) \; \forall j \neq i</math>}}
|align="center"|Computation
|-
|align="center"|
|align="center"|6
|align="right" |Send key confirmation to other party
|align="center"|<math>kc_i \leftarrow H(k_{i,j}, U_j)</math>
|align="center"|Broadcast
|-
|align="center"| -
|align="center"|7
|align="right"|Receive and Check validity of key confirmation
|align="center"|<math>kc_j \stackrel{?}{=} H(k_{i,j}, U_i)</math>
|align="center"|Receive
|}
To this end each member <math>U_i</math> compute <math>z_i := GroupEnc(k_{i,j} for j \in \{1,...,n\}, z'_i)</math> and broadcast <math>z_i</math> on <math>\mathcal{C}</math>. Later on when <math>U_i</math> receives all <math>z_j</math>. It recovers all secrets <math>z'_i</math> by computing <math>GroupDec(k_{i,j} for j \in \{1,...,n\}, z'_i)</math>.
===(n+1)nsec key exchange vs original Flexible Group Key Exchange of [ACMP10]===
Although in higher level view of (n+1)nsec we generalized the process of key exchange using ''GroupEnc''/''GroupDec'' abstraction, at lower level our choice of primitive for this functions make the group key computation processes of ''(n+1)sec'' and the original key exchange algorithm the same. Hence, the steps marked pink in Algorithm 1, only differ in from [ACMP10] but not in result.
|-
|align="right"| Generate session key
|align="center"|<math>sk_{i,j} \leftarrow H(GroupDec(k_{i,j}, z_j \; \forall j),sid_i, U_j) \; \forall j \neq i</math>
|align="center"|Computation
|-
Consistency aspects of ''(n+1)sec'', both for the room view (''plist'') and for the transcript, are reached through group agreement. However, there are times when group agreement may be hard or impossible to reach either due to latency in a single participant's connection or due to a single participant broadcasting incorrect confirmation data (such as wrong ''plist'', ''sid'', key share, etc).
We offer an extension to the ''(n+1)sec'' protocol to tackle this problem during the joining process. When a new participant joins the room, they send their DH key shares to the other participants. The other participants send their ephemeral key in return. They then send their key confirmation and key share. If this extension is to be considered, as soon as each user receives a key confirmation from another user, who is not currently part of the session, ''(n+1)sec'' displays a message highlighting the fact that although the user is not part of the session part of the conversation (from users' who confirmed the new user's identity) is being shared with them (through P2P encryption using the key derived from DH Key). The protocol, however, does not honour their input in the consistency check until a new session including the new user is set up. Each client can decide whether to disable this option.
The user remains in the list of those not part of the current session, but receives the session messages until a new session is set up. Similarly, when a user receives a message from a user who is not part of the session, ''(n+1)sec'' will decrypt the message and display it with a disclaimer that the user is not yet part of the session and that some participants may not receive the same message.
In this This is less secure model, in which a room is a forwardly secure authenticated communication channel while a session is a subset of the room, which additionally offers a consistent view of the room and consistent messages among participants.The detail of the process is depicted in Secthoin VIII.5
===VIII.4 Leave===
meta message contains a message has the following format
meta_onlyflag, ustate_1, ..., ustate_n, current_load
If meta_only flag is true then User message is ignored and client is informed not display anything
Note that we send the entry in the chain indexed by <math>parent(m)</math> rather than <math>m</math>. This is because a hash may only be calculated once the subject is actually received back from the server (i.e. gets a sequence number). This differs from some other concepts of "message ID" that may be calculated locally.
 
====(n+1)sec P2P Message Structure====
 
Every (n+1)sec message sent after establishment of a session has the following format:
 
np1sec:3Base64EnocodedMessage:3
 
The Base64EncodedMessage is decoded as:
 
keyid, Encrypted part of the message
 
Encrypted message can be decrypted by the session key and has the following structure
 
Signed message, Signature corresponding to the signed message
 
Signed Message consists of following parts
 
keyid, sender ID, User message, naunce
 
The "Key ID" and the "sender ID" are prepended in part to address concerns of [Da02]. The nuance is a random 128 bit value, appended to prevent any possibility of replay or brute force attack.
 
User message is the plain text typed by user and handled to (n+1)sec by the chat client.
====Send====
|align="center"|<math>(sid_i, e)</math>
|align="center"|Broadcast
|-
|align="right"|Encrypt
|align="center"|<math>e \leftarrow Enc_{k_{sid}}(m)</math>
|align="center"|Computation
|-
|align="right"|Reset Heartbeat timeout timer
|align="right"| Decrypt message
|align="center"|<math> sid_{rec}, sender_id, m, s, h, parent\_id, \sender_seq_num, sigma \leftarrow Dec_k(m) </math>
|align="center"|Computation
|-
|align="right"| Check signature
|align="center"|<math> Verify_{sender_id}(m,\sigma) </math>
|align="center"|Computation
|-
|align="right"| Compute message sequence number
|align="center"|<math> seqnum(m) \leftarrow ComputeSeqNum(m) </math>
|align="center"|Computation
|-
|align="right"| Verify session id and transcript consistency and sender sequence number, issue a warning in case of failure
|align="center"|<math> sid_i \stackrel{?}{=} sid_{rec} \; \textrm{and} \; h \stackrel{?}{=} H(H(parent(m)), H(TranscriptChain^S_i[parent(m)-1])) \textrm{and} sender_seq_num \stackrel{?}{>} last_own_seq_nums[sender_id] </math>
|align="center"|Computation
|-
|align="right"| Update TranscriptChain if possible
|align="center"|<math> TranscriptChain^S_i[seqnum(m)] = (H(m), H(TranscriptChain^S_i[seqnum(m)-1])) </math>
|align="center"|Computation
|-
|align="right"| Update sender sequence number record
|align="center"|<math>last_own_seq_nums[sender_id] \leftarrow sender_seq_num </math>
|align="center"|Computation
|-
|align="right"| Update sender's ephemeral key or share secret
|align="center"|<math>y_j \leftarrow s \; \textrm { or } \; z_{j} \leftarrow s</math>
|align="center"|Computation
|-
|align="right"| If all users' share are received, generate session key
|align="center"|<math>sk_{i} \leftarrow H(GroupDec(k_{i,j}, z_j \; \forall j),sid_i, U_j) \; \forall j \neq i</math>
|align="center"|Computation
|-
|align="right"| Update ack timeout timer
|align="center"|<math>AxeAckTimeoutTimer(parent(m),sender_i)</math>
|align="center"|Computation
|-
|align="right"| Update rekey timeout timer
|align="center"|<math>ResetRekeyTimeOut(sender_i)</math>
|align="center"|Computation
|-
|align="right"| If the message has content set up ACK timer
|align="center"|<math>meta_only \stackrel{?}= True</math> then <math>SetACKTimer(m)</math>
|align="center"|Computation
|-
|align="right"| return m
|align="center"|If <math>meta_only \stackrel{?}{=} return ''m''
|align="center"|
|}
 
==== Out of Session Send and Receive ====
Due to nature of the key exchange algorithm, (n+1)sec support confidential P2P communication. This in particular enables the user to share the conversation with joining user(s) who confirmed their identity to the user but have not established a session yet. It is worth mentioning that every session keeps a ''list future sessions to transition to'' this is equivalent to the list of ''confirmed but yet to join users''. If the extension discussed in section VIII.3 is enabled it will make use of this list to implement the following changes:
* When a user send a message ''Extended Send'' is invoked instead, it sends the message to the session using ''Send'' but also to the prospective participants, using ''P2P Send''.
* When a message is received, ''Extended Receive'' is called which check if the user has the correct key to decrypt the message. If the message is encrypted by session key and user has the session key then it calls the normal receive. If the message is encrypted by a p2p key that the user share, it calls ''P2P Receive''. Otherwise, it simply ignores the message.
 
'''Algorithm 9.1 Extended Send'''
 
{| border="1" cellspacing="0" cellpadding="5" align="center"
!align="right"|Description
!align="center"|Pseudo-code
!align="center"|Type
|-
|align="right" | If we are part of a session id in the room call ''Send''
|align="center"|<math> Send </math>
|align="center"| Broadcast
|-
|align="right"| For all confirmed users not in session call ''P2P Send''
|align="center"|<math> P2P Send </math>
|align="center"|Broadcast
|}
 
'''Algorithm 9.2 Extended Receive'''
 
{| border="1" cellspacing="0" cellpadding="5" align="center"
!align="right"|Description
!align="center"|Pseudo-code
!align="center"|Type
|-
|align="right" | If ''m'' has session id call ''Receive''
|align="center"|<math> if m.sid Call Receive </math>
|align="center"| Computation
|-
|align="right"| If ''m'' has key id, call ''P2P Receive''
|align="center"|<math> P2P Send </math>
|align="center"|Computation
|}
 
'''Algorithm 9.3 P2P Send'''
 
{| border="1" cellspacing="0" cellpadding="5" align="center"
!align="right"|Description
!align="center"|Pseudo-code
!align="center"|Type
|-
|align="right" | Prepend key id and sender id
|align="center"|<math> m \leftarrow (key_id, U_i, m) </math>
|align="center"|Computation
|-
|align="right" |Generate a random nuance and append to the message
|align="center"|<math> m \leftarrow (m, rand(128bit)) </math>
|align="center"|Computation
|-
|align="right"| Sign the message and append the signature
|align="center"|<math> m \leftarrow (m, Sign_{x_i}(m))</math>
|align="center"|Computation
|-
|align="right"|Encrypt
|align="center"|<math>e \leftarrow Enc_{k_{key_id}}(m)</math>
|align="center"|Computation
|-
|align="right"| Broadcast the message
|align="center"|<math>(key_id, e)</math>
|align="center"|Broadcast
|}
 
'''Algorithm 9.4 P2P Receive'''
 
{| border="1" cellspacing="0" cellpadding="5" align="center"
!align="right"|Description
!align="center"|Pseudo-code
!align="center"|Type
|-
|align="right"| Decrypt message
|align="center"|<math> key_{id}, sender_id, m, sigma \leftarrow Dec_{k_{key_id}}(m) </math>
|align="center"|Computation
|-
|-
|align="right"| If all users' share are received, generate session key
|align="center"|<math>sk_{i,j} \leftarrow H(GroupDec(k_{i,j}, z_j \; \forall j),sid_i, U_j) \; \forall j \neq i</math>
|align="center"|Computation
|-
* When ''<math>\Pi^S_i</math>'' reaches mutual consistency for p may leave or otherwise (if received hashes and their owns are non-matching) shows a warning.
** <math>\Pi^S_i</math> won't have a chance to reach consistency for the messages receives after ''p''
 
===VIII.7.x In-session Forward Secrecy===
To ensure that the forward secrecy in long living chat session ''(n+1)sec'', provide session key update through the session. Each message sent to the session by each participant contains meta data described in Section XX. Prior to sending any message, ''(n+1)sec'' instance, determines the content of meta data, and piggy back that to the message according to the following algorithm:
 
'''Algorithm 10.1 Compute meta data'''
 
{| border="1" cellspacing="0" cellpadding="5" align="center"
!align="right"|Description
!align="center"|Pseudo-code
!align="center"|Type
|-
|align="right"| <math> Initiate meta data with current state of knowledge of new ephemeral keys and secret shares </math>
|align="center"|<math> meta_data \leftarrow ustate_i[j] \forall 1 \ge j \ge n</math>
|align="center"|Computation
|-
|align="right"| <math>Include the new ephemeral key if participant U_j has not receive it </math>
|align="center"|<math> if <math>ustate_i[j] \stackrel{?}{=} 0</math> meta_data \leftarrow <math>y_{i_{new}}</math>
|align="center"|Computation
|-
|align="right"| if participants has sent their ephemeral keys compute the shared secret
|align="center"|<math>if <math>ustate_{j}[i] \stackrel{?}{=} 1 \forall 1 \ge j \ge n</math> add <math> meta_data \leftarrow (meta_data, GroupEnc(k_{i_j} for j \in \{1,\dots,n\}, z'))</math>
|align="center"|Computation
|-
|align="right"| Return meta data
|align="center"|return meta_data
|align="center"|Computation
|}
===VIII.7 Heartbeat and Timeout ===
==== Drop inactive users, queue a new session request ====
'''Algorithm 10.XX'''
{| border="1" cellspacing="0" cellpadding="5" align="center"
==IX.2 Message Origin Authentication ==
ED25519 has been chosen as the signature primitive due to its efficiency and more secure implementability over other elliptic-curve digital signature algorithms.[Be11]
==IX.3 Message Encryption ==
We are using AES-256 in counter mode Galois/Counter Mode (GCM) with a shared group key for message encryption, as suggested we are following the suggestion by the original OTR protocolof using counter mode. However, unlike OTR, <math>(n+1)sec</math> does not support per message forgibility (although the whole transcript is forgible), it is not prohibitive to use the same key for encryption and authentication. The added authentication, spares p2p send and receive routines from using digital signature. With GCM mode, the authenticated encryption is generically secure by the result (and assumptions) of [Kr00].
==IX.4 GroupEnc and GroupDec Functions ==
[*Sys14] Whisper Systems. 2014. “TextSecure ProtocolV2.” Accessed March 2. https://github.com/WhisperSystems/TextSecure/wiki/ProtocolV2.
 
[KiSo00] ,"bookSection","2000","Song, Boyeon; Kim, Kwangjo","Two-Pass Authenticated Key Agreement Protocol with Key Confirmation","Progress in Cryptology —INDOCRYPT 2000","978-3-540-41452-0","","","http://dx.doi.org/10.1007/3-540-44495-5_21","","2000","2014-12-01 14:46:16","2014-12-01 14:46:16","","237-249","","","1977","","","","Lecture Notes in Computer Science","","","","Springer Berlin Heidelberg","","English","","","","","","","","","","","","","Roy, Bimal; Okamoto, Eiji","","","","","","","","","","","","","","","",
 
[Mo13],"blogPost","","Marlinspike, Moxie","Simplifying OTR deniability","Open Wispersystems","","","","https://whispersystems.org/blog/simplifying-otr-deniability/"
 
[Kr00],"book","2001","Krawczyk, Hugo","The order of encryption and authentication for protecting communications (Or: how secure is SSL?)","","","","","","","2001","2014-11-28 18:16:08","2014-11-28 18:16:08","","","","","","","","","","","","","","","","","","","","","","Published: Cryptology ePrint Archive, Report 2001/045 http://eprint.iacr.org/
 
[Da02],"2002","Davis, Don","Defective Sign & Encrypt in S/MIME, PKCS#7, MOSS, PEM, PGP, and XML.","USENIX Annual Technical Conference, General Track","1-880446-09-X","","","http://dblp.uni-trier.de/db/conf/usenix/usenix2001g.html#Davis01","","2002-09-022001","2014-11-20 17:27:11","2014-11-20 17:27:11","","65-78","","","","","","","","","","","USENIX","","","","","","","","","","","","","dblp","","Park, Yoonho","","
 
 
[Be11],"conferencePaper","2011","Bernstein, Daniel J.; Duif, Niels; Lange, Tanja; Schwabe, Peter; Yang, Bo-Yin","High-Speed High-Security Signatures.","CHES","978-3-642-23950-2","","","http://dblp.uni-trier.de/db/conf/ches/ches2011.html#BernsteinDLSY11","","2011","2014-11-20 17:27:10","2014-11-20 17:27:10","","124-142","","","6917","","","","Lecture Notes in Computer Science","","","","Springer","","","","","","","","","","","","","dblp","","Preneel, Bart; Takagi, Tsuyoshi","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","
 
[BoMa10],"book","2010","Boyd, Colin; Mathuria, Anish","Protocols for Authentication and Key Establishment","","3642077161, 9783642077166","","","","","2010","2014-12-01 14:55:55","2014-12-01 14:55:55","","","","","","","","","","","","","Springer Publishing Company, Incorporated","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","1st","","","","","","","","","","","","","","","","","","","","","","","","","",""
 
[Git11] https://github.com/hellais/cryptocat
</HarvardReferences>
We say a group key scheme (as defined in [[#V._Chat_Session_Model|Section V]]) is correct if all accepted instances of <math>\Pi^S_i</math> end up with the same participant lists <math>plist_i</math> and compute the same session id.
By contrast, a broadcast scheme refers to a scheme in which each participant is broadcasting a message to a set of participants of their choice from a set of potential participants. Each participant will have its own different <math>plist_i</math> which is able to broadcast as well. See GOTR by [LVH13] For an example of such scheme where each participant chooses there own circle of audiances. <!--In such protocol we define <math>plist_{union} := \cup{i \in {interested participants}} plist_i</math>.-->
Therefore, in the context of a chat room, broadcasting scheme participants do not have the same view of the room and consequently we cannot compute a unified session id <math>sid</math> based on the list of the participants (as opposed to the group key scheme). In a group key scheme, it is the name of the chat room plus a set of ephemeral keys and the set of ephemeral public keys which uniquely identifies the session. There are advantages and disadvantages to each of these schemes, which we enumerate here:
Based on the above differences, we selected a group key scheme for the proposed protocol. This is primarily because room consistency is one of the main security properties desired. However, when it is critical, the sub-protocol described by [[#Sending_and_receiving_messages_ while_joining_is_in_progress|Section VIII.2 Sending and receiving messages while joining is in progress]] allows for communication with users while they are waiting for the join procedure to complete.
===Participatory vs individually independent computation of group keyskey(s)===
Most AKGE offer some degree of contributiveness in computing the group secret. This roughly means that (at least in the absence of an insider) the group secret is derived using contribution from all members of the group. There has been criticism of the importance of this property such as in [Da14]. In this section we consider briefly the arguments for each side and describe the rational for our choice.
[[Category: np1sec]]