# What kind of encryption function is also used for decryption?

Is there a name for the particular type of encryption algorithm or function which is the same algorithm or function used for decryption?

This is a vocabulary question, because I'm largely unfamiliar with the terminology of encryption. Expressed mathematically, if $f(x)$ is an encryption algorithm that encrypts $x$, and $f(f(x))=x$, is there a name for this particular type of encryption? An example would be a cipher that converts $A$ to $Z$, $B$ to $Y$, $C$ to $X$, ..., $X$ to $C$, $Y$ to $B$, $Z$ to $A$.

• I've seen (and used) the term 'self-inverse' for this... – poncho May 11 '17 at 14:56
• – SEJPM May 11 '17 at 15:20

poncho and SEJPM more or less answered your question in the comments: If $f(f(m)) = m$, then the function can be revered to as a "self-inverse", or more formally, the function is said to be an "involution".
$c := E(m) = keystream \oplus m\\m := D(c) = E(c) = keystream \oplus c = keystream \oplus keystream \oplus m$