How Ciphers Work

Discussion in 'Engineering Concepts' started by pradeep, Aug 21, 2005.

  1. pradeep

    pradeep Team Leader

    Apr 4, 2005
    Likes Received:
    Trophy Points:
    Kolkata, India
    Home Page:
    So, what is a cipher anyway? A cipher is an algorithm or set of algorithms that systematically convert a sender's intended message text to what appears to be meaningless text, which can be converted back to the sender's original message only by authorized recipients. The following terms and definitions will help you understand ciphering and deciphering in general and the code behind them.

    The term plaintext refers the sender's original message. The meaning in plaintext is what the sender wants to convey to the recipient(s).

    The term ciphertext refers to plaintext whose appearance has been encrypted, or algorithmically changed. Ciphertext becomes plaintext once it has been decrypted.

    Many ciphers use one or more keys. A key is string of text or bits used to encrypt or decrypt data. RSA Data Security, Inc. ( ), a leading encryption technology firm, states that a key determines the mapping of the plaintext to the ciphertext. A key could be just about anything, such as the word "cleveland," the phrase "winners never quit, quitters never win," the binary number 10011011, or even some wild string, such as %_-.;,(<<*&^.

    Ciphers in which both the sender and the recipient use the same key to encrypt and decrypt the message are said to be part of a symmetric-key cryptosystem. Ciphers in which data is encrypted and decrypted with a pair of keys--one freely distributed to the public, the other known only to the recipient--are said to be part of a public-key cryptosystem. Ciphers in this application employ an asymmetric-key cryptosystem.

    There are hundreds of documented ciphers. Some date back thousands of years, devised by great leaders or scientists of the past; others date back to only last week, devised by some geeky teenager who experienced epiphany after setting a personal high score on Tomb Raider. Whatever the source, ciphers fall into three general categories: concealment, transposition, and substitution.

    Concealment ciphers include the plaintext within the ciphertext. It is up to the recipient to know which letters or symbols to exclude from the ciphertext in order to yield the plaintext. Here is an example of a concealment cipher:


    Remove all the numbers, and you'll have i like chocolate. How about this one?

    Larry even appears very excited. No one worries.

    The first letter from each word reveals the message leave now. Both are easy, indeed, but many people have crafted more ingenious ways of concealing the messages. By the way, this type of cipher doesn't even need ciphertext, such as that in the above examples. Consider the invisible drying ink that kids use to send secret messages. In a more extreme example, a man named Histiaeus, during 5th century B.C., shaved the head of a trusted slave, then tattooed the message onto his bald head. When the slave's hair grew back, Histiaeus sent the slave to the message's intended recipient, Aristagoros, who shaved the slave's head and read the message instructing him to revolt.

    Transposition ciphers also retain the characters of the plaintext within the ciphertext. Ciphertext is created simply by changing the order of the existing plaintext characters. Try this one:

    uo yn os dn ep ed yx al ag eh tf oy te fa se ht

    Bunch those letters together, then reverse their order. You'll get the message "the safety of the galaxy depends on you."

    Substitution ciphers replace each character of plaintext with another character or symbol. Consider this:


    If you substitute each number with the associated letter of the alphabet, you'll reveal the phrase "I only think in numbers." (For example, "I" is the 9th letter of the alphabet, "o" is the 15th, etc.) Substitution ciphers can utilize just about any character set for encryption and decryption. Both ciphers in this application are substitution ciphers.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice