Cryptography Overview
36 RSA BSAFE Crypto-C Developers Guide
Cryptography Overview

Symmetric-Key Cryptography

In symmetric-key cryptography, as Figure 3-1 shows, the encrypting key is the same as
the decrypting key. Using any other key to decrypt will produce incorrect results.
Symmetric-key cryptography is also sometimes called secret-key cryptography,
because the key used to both encrypt and decrypt must be kept secret.

Ciphers

There are two categories of symmetric encryption algorithms, block ciphers and stream
ciphers. As the name implies, a block cipher processes data in blocks. A stream cipher,
on the other hand, processes a unit of data at a time, where a unit is generally a bit or
byte. This allows a stream cipher to take in a variable length stream of data, encrypt it,
and output a stream of ciphertext the same length as the input. Crypto-C offers the
following block ciphers: DES, Triple DES, DESX, the RC2 cipher, the RC5, the RC6
cipher, and theAES cipher. Crypto-C offers the following stream cipher: the RC4
cipher.
Figure 3-1 Symmetric-Key Encryption and Decryption
Encryption Operation
Original
Message
Encryption
Algorithm
Encrypted
Message
Encrypted
Message
Decryption
Algorithm
Decrypted
Message
Decryption Operation
Key
Key
Key Data