update cipher