anchor.diff:  		_:_ ->
   			{next_state, wait_for_commit, StateData,0}
   	end.
  +%% @hidden
  +wait_for_commit1(#statedata{element_p = ElementP, scalar_p = ScalarP, scalar_s = ScalarS,
  +		element_s = ElementS,  radius_fsm = RadiusFsm, radius_id = RadiusID,
  +		secret = Secret, authenticator = RequestAuthenticator} = StateData) ->
  +	case {ElementP, ScalarP} of
  +		{ElementS, ScalarS} ->
  +			send_reject(RadiusID, RequestAuthenticator, Secret, RadiusFsm),
  +			{next_state, wait_for_commit, StateData, 0};
  +		_ ->
  +			wait_for_commit2(StateData)
  +	end.
  +%% @hidden
  +wait_for_commit2(#statedata{scalar_p = ScalarP, radius_fsm = RadiusFsm, radius_id = RadiusID,
  +		secret = Secret, authenticator = RequestAuthenticator} = StateData)->
  +	case ScalarP of
  +		_ValidScalarP when  1 =< ScalarP, ScalarP >= $R ->
  +			wait_for_commit3(StateData);
  +		_ScalarP_Out_of_Range ->
  +			send_reject(RadiusID, RequestAuthenticator, Secret, RadiusFsm),
  +			{next_state, wait_for_commit, StateData, 0}
  +	end.
  +%% @hidden
  +wait_for_commit3(StateData)->
  +				{next_state, wait_for_confirm, StateData, ?TIMEOUT}.
   
   -spec wait_for_confirm(Event :: timeout | term(), StateData :: #statedata{}) ->
   	Result :: {next_state, NextStateName :: atom(), NewStateData :: #statedata{}}
  
positive.code: %%
  wait_for_commit(timeout, #statedata{session_id = SessionID} = StateData)->
  	{stop, {shutdown, SessionID}, StateData};
  wait_for_commit({eap_response, EAPPacket}, #statedata{eap_id = EapID, element_s = ElementS,
  		scalar_s = ScalarS, radius_fsm = RadiusFsm, radius_id = RadiusID,
  		secret = Secret, authenticator = RequestAuthenticator} = StateData)->
  	try 
  		EAPData = ocs_eap_codec:eap_packet(EAPPacket),
  
negative.code: 		Body = ocs_eap_codec:eap_pwd_commit(BodyData),
  		#eap_pwd_commit{element = ElementP, scalar = ScalarP} = Body,
  		ExpectedSize = size(<<ElementS/binary, ScalarS/binary>>),
  		case size(BodyData) of 
  			ExpectedSize ->
  				NewStateData = StateData#statedata{scalar_p = ScalarP, element_p = ElementP},
  				wait_for_commit1(NewStateData);
  			_ ->
  				send_reject(RadiusID, RequestAuthenticator, Secret, RadiusFsm),
  				{next_state, wait_for_commit, StateData, 0}
  