cipher-decipher text main algorythm