Protecting mobile agents from external replay attacks