anchor.diff:  		hash(Ssh, "C", 128)},
       <<K:16/binary>> = KD,
       {ok, Ssh#ssh{decrypt_keys = K, decrypt_ctx = IV,
  -		 decrypt_block_size = 16}}.
  +		 decrypt_block_size = 16}};
  +decrypt_init(#ssh{decrypt = 'aes128-ctr', role = client} = Ssh) ->
  +	IV = hash(Ssh, "B", 128),
  +    <<K:16/binary>> = hash(Ssh, "D", 128),
  +    State = crypto:stream_init(aes_ctr, K, IV),
  +    {ok, Ssh#ssh{decrypt_keys = K,
  +		 decrypt_block_size = 16,
  +                 decrypt_ctx = State}};
  +decrypt_init(#ssh{decrypt = 'aes128-ctr', role = server} = Ssh) ->
  +	IV = hash(Ssh, "A", 128),
  +    <<K:16/binary>> = hash(Ssh, "C", 128),
  +    State = crypto:stream_init(aes_ctr, K, IV),
  +    {ok, Ssh#ssh{decrypt_keys = K,
  +		 decrypt_block_size = 16,
  +                 decrypt_ctx = State}}.
   
     
   decrypt_final(Ssh) ->
  
positive.code:     <<K:16/binary>> = hash(Ssh, "D", 128),
      {ok, Ssh#ssh{encrypt_keys = K,
  		 encrypt_block_size = 16,
                   encrypt_ctx = IV}}.
  
  encrypt_final(Ssh) ->
      {ok, Ssh#ssh{encrypt = none, 
  
negative.code:             encrypt_ctx = IV0} = Ssh, Data) ->
      Enc = crypto:block_encrypt(aes_cbc128, K,IV0,Data),
      IV = crypto:next_iv(aes_cbc, Enc),
      {Ssh#ssh{encrypt_ctx = IV}, Enc};
  encrypt(#ssh{encrypt = 'aes128-ctr',
              encrypt_ctx = State0} = Ssh, Data) ->
      {State, Enc} = crypto:stream_encrypt(State0,Data),
      {Ssh#ssh{encrypt_ctx = State}, Enc}.
    
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  