encrypt algorithm on the way