In military terminology, a countersign  is a sign, word, or any other signal previously agreed upon and required to be exchanged between a sentry or guard and anybody approaching his or her post. The term usually encompasses both the sign given by the approaching party as well as the sentry's reply. However, in some armies, the countersign is strictly the reply of the sentry to the password given by the person approaching.  A well-known sign/countersign used by the Allied forces on D-Day during World War II: the challenge/sign was "flash", the password "thunder", and the countersign (to challenge the person giving the first code word) "Welcome". Some armies will select passwords or challenges that are difficult to pronounce by the enemy force speaking a different language to avoid the enemy force from approaching or infiltrating their positions unidentified.

In computer networks
A similar technique is becoming common in computer networking, particularly for banking web sites. For example, (as in Bank of America's "SiteKey" system), a user might enter his or her user-ID, but withhold the corresponding password until the server replied to the user-ID with a previously agreed-upon  phrase and/or image. So long as the connection is secure, and the user can choose from a wide range of phrases and/or images in the set-up process, they can be confident that they are signing on to the legitimate site, rather than to a spoofed one.

In literature
The opening lines of William Shakespeare's play Hamlet are between soldiers on duty are viewed as representing a crude sign, where the line "Long live the King!" was a sign between soldiers:

Bernardo. Who's there?
Francisco. Nay, answer me. Stand and unfold yourself.
Bernardo. Long live the King!
Francisco. Bernardo?
Bernardo. He.

See also
 Challenge–response authentication
 Shibboleth

References

Military terminology