What are the two basic functions (methods) used in classical encryption algorithms?