encryption

Topics related to encryption:

Getting started with encryption

This section provides an overview of what encryption is, and why a developer might want to use it.

It should also mention any large subjects within encryption, and link out to the related topics. Since the Documentation for encryption is new, you may need to create initial versions of those related topics.

Caesar cipher

Text-to-text encryption

The general algorithm is:

Encrypt:

Decrypt (reverse BE and TE from Encrypt):

  • Transform InputText to InputBytes via encoding BE.
  • Decrypt InputBytes to OutputBytes
  • Transform OutputBytes to OutputText via TE.

The most common mistake is to choose a "text encoding" instead of a "binary encoding" for BE, which is a problem if any encrypted byte (or any IV byte) is outside the range 0x20-0x7E (for UTF-8 or ASCII). Since the "safe range" is less than half of the byte space the chances of a text encoding being successful are vanishingly small.

  • If post-encryption string contains a 0x00 then C/C++ programs will likely misinterpret that as the end of the string.
  • If a console-based program sees 0x08 it may erase the previous character (and the control code), making the InputText value to Decrypt have the wrong value (and the wrong length).