anchor.diff:  
   % api
   -export([start_link/0]).
  +
   -export([decrypt/2, encrypt/2, get_key/1, set_keys/2]).
   
   -record(s,
  
positive.code: get_dh_keys(#s{their_id = T, our_id = O} = State, OO, T)
      when OO == O - 1 ->
      {ok, State#s.previous_dh, State#s.y};
  % TODO: about the follwoing 2 cases: 
  %       i'm not sure if the protocoll even allows to reach a
  %       state where these keys might be requested...
  %       but since we have them...
  get_dh_keys(#s{their_id = T, our_id = O} = State, O, TT)
      when (TT == T - 1) and State#s.previous_y /=
  	   undefined ->
      {ok, State#s.dh, State#s.previous_y};
  get_dh_keys(#s{their_id = T, our_id = O} = State, OO,
  	    TT)
      when (TT == T - 1) and (State#s.previous_y /= undefined)
  	   and (OO == O - 1) ->
      {ok, State#s.previous_dh, State#s.previous_y};
  get_dh_keys(_, _, _) -> error.
  
  
negative.code: 					  <<Ctr:64>>, otr_tlv:encode({M, TLV})),
      DM = #otr_msg_data{flags = Flags, sender_keyid = OId,
  		       enc_data = EncD, recipient_keyid = TId,
  		       ctr_init = <<Ctr:64>>, dhy = element(2, State#s.dh)},
      Mac = otr_crypto:sha1HMAC(Dmk#dmk.tx_mac,
  			      otr_message:encode_data_for_hmac(DM)),
      {reply,
  