|
|
|
|
|
|
The purpose of this page is to serve as a common support to existing or upcoming security mechanisms
published on this site.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The following figure (derived from "Network and Internet Security" by W. Stallings)
illustrates the main types of attacks. It does not show another important type of attack that do not
involve any opponent: message non-repudiation, which uniquely implies the sender and the receiver.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
In secret-key cryptography, also referred to as symmetric cryptography, the same key is used
for both encryption and decryption.
|
|
|
|
|
|
|
|
|
| - |
Secret-key cryptography is much faster than public-key cryptography and is used for ensuring the confidentiality
of large payloads.
|
|
| - |
A stream cipher is a type of symmetric-key encryption algorithm that transforms
a plaintext data stream into ciphertext data, one bit at a time.
|
|
| - |
A block cipher is a type of symmetric-key encryption algorithm that transforms a fixed-length block
of plaintext data into a block of ciphertext data of the same length.
For many block ciphers, the block size is 64 bits.
In CBC (Cipher Block Chaining) mode, each plaintext block is XORed with the previous ciphertext block and
then encrypted. An IV (initialization vector) is used as a "seed" for the process.
|
|
| - |
Secret-keys must be frequently changed and typically are distributed by using public-key cryptography.
|
|
| - |
Examples of algorithms:
|
|
|
| DES | Data Encryption Standard |
| 3DES | triple-DES |
| IDEA | International Data Encryption Algorithm |
| AES | Advanced Encryption Standard |
|
|
|
|
|
|
|
|
|
|
|
|
|
In public-key cryptography, also referred to as asymmetric cryptography:
|
|
| - |
Encryption is performed with one key and decryption is performed with the other key.
|
|
| - |
It is computationally easy for each party to generate a pair of keys:
the public key and the private key.
|
|
| - |
It is computationally infeasible for an opponent to determine the private key,
knowing the public key and the cryptographic algorithm.
|
|
| - |
Primary uses of public-key cryptography are encryption and digital signature.
The sender uses either the receiver public key (for privacy) or his/her private key (for digital signature) or both.
|
|
| - |
Some algorithms such as RSA (Rivest-Shamir-Adlemman) can be used for both encryption and digital signature, whereas other
algorithms, such as DSA (Digital Signature Algorithm) can only be used for digital signature.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A Hash function produces a fixed-size string from a variable-size message:
h = H(m) where m is the message, h is the hash value -- or message digest -- and H is the hash function.
Hash functions used in Cryptography must have the following properties:
|
|
| - |
Easy to compute
|
|
| - |
One-way: it is computationally infeasible to find the message x from the hash value H(x)
|
|
| - |
Collision-free: it is computationally infeasible to have two messages x and y such that H(x) = H(y)
|
|
|
|
Most hash functions are based on the iteration of a compression function that transforms a fixed-size block
(typically 512 bits) into a shorter block of 16 or 20 bytes (128 or 160 bits). The message is initially padded so its length
is a multiple of the block size. The final result is the message digest.
|
|
|
|
Hash functions in common use are: MD5, SHA-1 and RIPEMD-160.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A Message Authentication Code (MAC) is a short piece of information that is the output of
an authentication scheme based on a variable-length message and a secret key. This MAC (or Tag)
is used for proving the integrity and authenticity of the message.
Unlike digital signatures, MAC does not provide the property of non-repudiation.
MAC algorithms can be based on hash functions (HMAC) or block ciphers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HMAC [RFC2104]
can be used in combination with any iterated cryptographic hash
function. Such hash functions include
SHA-1 [RFC 3174],
MD5 [RFC 1321] and RIPEMD-128/160.
These different realizations of HMAC are denoted by HMAC-SHA1,
HMAC-MD5, HMAC-RIPEMD.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|