anchor.diff:     (* by convention, the parameters are named si, cv, cr', sr', ms, log *)
      | ServerWritingCCS     of SessionInfo * StatefulAEAD.writer * bytes (* outgoing after CCS; this and next state shared only for full HS *)
      | ServerWritingFinished
  -   | ServerWritingCCSRes  of SessionInfo * crand * srand * masterSecret * log
  -   | ClientCCSResume      of SessionInfo * crand * srand * masterSecret * log  
  -   | ClientFinishedResume of SessionInfo * masterSecret * log 
  +   | ServerWritingCCSRes  of SessionInfo * masterSecret * srand * bytes (* ougoing after CCS *) * log
  +   | ClientCCSResume      of SessionInfo * masterSecret * crand * srand * StatefulAEAD.reader * log (* St-AEAD.reader is redundant, but kept here for efficiency *)
  +   | ClientFinishedResume of SessionInfo * masterSecret * crand * srand * log 
      | ServerIdle   
      (* the ProtocolVersion is the highest TLS version proposed by the client *)
   
  
positive.code:     | sid ->
          SessionDB.insert sDB sinfo.sessionID (sinfo, ms, role)
  
  let goToIdle state =
      let init_sessionInfo = null_sessionInfo state.poptions.minVer in
      match state.pstate with
  
negative.code:    | ServerHelloDoneRSA    of SessionInfo * log
     | ServerHelloDoneDH     of SessionInfo * log
     | ServerHelloDoneDHE    of SessionInfo * (* DHE.sk * *) bytes * log
     | ClientWritingCCS      of SessionInfo * StatefulAEAD.reader * bytes (* outgoing after CCS *)
     | ClientWritingFinished of SessionInfo
     | ServerCCS             of SessionInfo * masterSecret * log
     | ServerCCSResume       of SessionInfo * masterSecret * log
     | ServerFinished        of SessionInfo * masterSecret * log
  