input cipher and convert to new cipher based on substitution file