rewrite crypto