anchor.diff:          let hash_size = get_hash_size conn_state.sparams.mac_algorithm in
           let mac_start = (length data_no_pad) - hash_size in
           correct (split data_no_pad mac_start)
  -
  -let verify_mac conn ct compr givenmac =
  -    let mac_alg = conn.sparams.mac_algorithm in
  -    if mac_alg = MA_null then
  -        if equalBytes givenmac empty_bstr then
  -            correct ()
  -        else
  -            Error (MAC, CheckFailed)
  -    else
  -        let version = conn.protocol_version in
  -        let mac_key = conn.mk in
  -        let bseq_num = bytes_of_seq conn.seq_num in
  -        let bct = bytes_of_contentType ct in
  -        let bver = bytes_of_protocolVersionType version in
  -        match version with
  -        | ProtocolVersionType.SSL_3p0 ->
  -            let mmsg = compute_mac_ssl_blob bseq_num bct compr in
  -            match mac_alg with
  -            | MA_md5 ->
  -                keyedHashVerify md5 ssl_pad1_md5 ssl_pad2_md5 mac_key mmsg givenmac
  -            | MA_sha1 ->
  -                keyedHashVerify sha1 ssl_pad1_sha1 ssl_pad2_sha1 mac_key mmsg givenmac
  -            | _ -> Error (MAC, Unsupported)
  -        | v when v = ProtocolVersionType.TLS_1p0 || v = ProtocolVersionType.TLS_1p1 || v = ProtocolVersionType.TLS_1p2 ->
  -            let data = compute_mac_tls_blob bseq_num bct bver compr in
  -            match mac_alg with
  -            | MA_md5 -> hmacmd5Verify mac_key data givenmac
  -            | MA_sha1 -> hmacsha1Verify mac_key data givenmac
  -            | _ -> Error (MAC, Unsupported)
  -        | ProtocolVersionType.SSL_2p0 -> Error (MAC, Unsupported)
  -        | _ -> unexpectedError "[verify_mac] only to be invoked after a version has been negotiated"
    
   let recv conn =
       let net = conn.net_conn in
  
positive.code:   mk: Crypto.key;
    seq_num: int; (* uint64 actually *)
    sparams: SecurityParameters; 
  }
  
  type sendState = ConnectionState
  type recvState = ConnectionState
  type fragment = bytes
  type ccs_data = {
      ccs_info: SessionInfo;
      ccs_pv: ProtocolVersionType;
      ccs_comp: Compression;
      ccs_sparams: SecurityParameters;
      ccs_mkey: Crypto.key;
      ccs_ciphstate: CipherState}
  
  type preds = FragmentSend of ConnectionState * ContentType * bytes
  
  
negative.code:     | CT_stream -> encrypt_stream conn_state data
      | CT_block -> encrypt_block conn_state data
  
   
  let generatePacket ct ver data =
    let l = length data in 
    let bct = bytes_of_contentType ct in
  