anchor.diff:  open TLSInfo
   open Bytes
   
  +// AP: new: keep here and do not duplicate
   type lengths = int list (* a list of desired ciphertext lengths *)
   
   val estimateLengths: SessionInfo -> int -> lengths
   
  +// AP: new: as we see, AppData and "other (public) fragments" were already duplicated here. Just move them
  +//     to the appropriate places, and remove silly cast functions
  +
   (* Secret App Data *)
   type appdata
  +// AP: new: the following function could be in the AppPlain module (the plain module for the Application)
   val appdata: SessionInfo -> lengths -> bytes -> appdata
   val empty_appdata: SessionInfo -> appdata
   val is_empty_appdata: appdata -> bool
  
positive.code: 
  val split_mac: KeyInfo -> int -> plain -> (bool * (fragment * mac))
  
  (* Only for MACOnlyCipherSuites *)
  val fragment_mac_to_cipher: KeyInfo -> int -> fragment -> mac -> bytes
  val cipher_to_fragment_mac: KeyInfo -> int -> bytes -> (fragment * mac)
  
negative.code: (* Exctract the *first* fragment from the *beginning* of appdata *)
  val app_fragment: SessionInfo -> lengths -> appdata ->  ((int * fragment) * (lengths * appdata))
  
  // AP: new: move the following to the AppPlain module
  (* Only used by appdata module, to return the received concrete bytes to the application *)
  val get_bytes: appdata -> bytes 
  
  // AP: new: they should disappear, and get embedded into the representation in each subprotocol
  (* Fragmentation and de-fragmentation functions used by non-appdata protocols, that only exchange public data *)
  val pub_fragment: SessionInfo -> bytes -> ((int * fragment) * bytes) 
  (* Note that n is *not* the length of the plaintext, it is the length of the target ciphertext *)
  val pub_fragment_to_bytes: SessionInfo -> int -> fragment -> bytes
  
  // AP: new: this can stay here (and we rename this module).
  //     I'd prefer not to create one plain module for each crypto module,
  //     as this would bloat the number of modules, and, if we remove the things above, is
  //     not too much for a single file.
  type mac
  
  type mac_plain
  