There are two basic ways to encrypt information:

  • Symmetric Encryption
  • Asymmetric Encryption

Symmetric encryption

Symmetric encryption is the oldest and best-known technique. A secret key, which can be a number, a word, or just a string of random letters, is applied to the text of a message to change the content in a particular way. This might be as simple as shifting each letter by a number of places in the alphabet. As long as both sender and recipient know the secret key, they can encrypt and decrypt all messages that use this key.


Asymmetric Encryption

The problem with secret keys is exchanging them over the Internet or a large network while preventing them from falling into the wrong hands. Anyone who knows the secret key can decrypt the message. One answer is asymmetric encryption, in which there are two related keys. A key pair. A public key is made freely available to anyone who might want to send you a message. A second, private key is kept secret, so that only you know it.


Digital Certificates

To use asymmetric encryption, there must be a way for people to discover other public keys. The typical technique is to use digital certificates (also known simply as certificates). A certificate is a package of information that identifies a user or a server, and contains information such as the organization name, the organization that issued the certificate, the user's e-mail address and country, and the user's public key.

When a server and client require a secure encrypted communication, they send a query over the network to the other party, which sends back a copy of the certificate. The other party's public key can be extracted from the certificate. A certificate can also be used to uniquely identify the holder.


Block Ciphers and Stream Ciphers

The two most common types of encryption algorithm used in modern cryptography are the block and stream ciphers. The block cipher uses a deterministic algorithm that conducts operations on fixed-length groupings of bits, or blocks. By using a transformation specified by a symmetric key, a block cipher is able to encrypt bulk data, and is one of the basic components of many cryptographic protocols in use today. A stream cipher, on the other hand, takes plaintext characters or digits and combines them with a pseudo random cipher digit stream, or key stream.


Block Cipher

Block Ciphers include two paired algorithms today. One of the algorithms is used for decryption (D), and one for encryption (E). Each of the algorithms is able to accept two inputs for operations: 1 – A key size consisting of (K) bits, Each of these inputs will then produce an output block of the size of “N.” Similarly, the associated decryption algorithm in block ciphers is defined to consist of the inverse of the encryption function. Formally described by the equation, D = E-1.
Block Cipher Algorithms


Stream Cipher

Stream Ciphers make use of a symmetric key that uses plaintext combined with a pseudorandom cipher digit stream also known as a keystream. Stream ciphers will encrypt plaintext digitse “one at a time” along with the corresponding figure of the keystream. The resulting output will provide the corresponding output of the ciphertext stream. Another name for the stream cipher is the state cipher since every digit is dependent on the current state of the cipher. Typically a digit will be a bit and the combination operation will use the XOR operation.

Pseudorandom keystreams are normally created from a random seed value that uses digital shift registers. The seed value will also function as the key for decrypting the cipher stream. Unlike block ciphers, stream ciphers represent a different approach to encrypting and decrypting information. In order to avoid being cracked, stream ciphers should not use the same seed twice or else and adversary may be able to crack the code.