When you think of “cryptography,” what do you think of? Most probably one of the following two. One is called a “cryptogram,” in which a secret message is conveyed only to the intended recipient by adding a secret meaning to the sentence that is different from the meaning of the words, as in the case of “Climb Mt. Niitaka (Niitaka yama nobore) 1208” (*1) used during WWII. The other is called a “password,” which is said to have been used by the Ninja to confirm who the other party is by replying to the word “Mountain” with a previously agreed upon counterpart, “River”.
In general, we tend to think of cryptography as a way of secretly conveying messages between parties, but cryptography can be used not only to keep information secret, but also to authenticate the identity of the other party, as in the case of “password” (*2).
*1 “Climb Mt. Niitaka (Niitaka yama nobore) 1208”
This sentence had a secret meaning in the Japanese Navy of the time: “After midnight on December 8, we will enter a state of combat. Each unit should act as planned”.
In the broadest sense, a password is a cipher for authentication purposes, but it does not have enough functionality to be called a cipher in academic terms. However, in the academic sense, they do not function as ciphers, because they leak secret information to the authenticating party. For example, if you are asked the word “Mountain” and you answer “River”, the correct answer “River” will be given to the other party. If the person who asked for “Mountain” is not your friend, they will know that the correct answer to “Mountain” is “River”.
Modern cryptography for authentication purposes, for example, uses the mathematical magic of “zero-knowledge protocol” to prove one’s identity to the other party without divulging the secret to the other party. Simply put, when you use a bank ATM, you can convince the ATM that “I know my PIN” without directly entering it. Sounds like magic, right?