adding explicit isorelax require and refactoring enciphering state
machine