a portal for promoting standardization knowledge

 
  IETF map Home
# SIP RFC3261's Example  
# SIP Protocol Structure
# SIP Dialogs & Routing
# SIP Service Examples
 01.Call Hold
 02.Consultation Hold
 03.Music On Hold
 04.Transfer: Unattended
 05.Transfer: Attended
 06.Transfer: Instant Messaging
 07.Call Forwarding Unconditional
 08.Call Forwarding Busy
 09.Call Forwarding No Answer
 10.3-Way Conf: 3rd Party Added
 11.3-Way Conf: 3rd Party Joins
 12.Find-Me
 13.Incoming Call Screening
 14.Outgoing Call Screening
 15.Call Park
 16.Call Pickup
 17.Automatic Redial
 18.Click to Dial
# ABNF Grammars
  - SIP Messages & URIs
  - SIP Headers
  - SIP Private Headers
  - SDP
  - URI Generic Syntax
  - ABNF Notation & Rules
# Cryptography Basics

Cryptography Basics

Top # Attacks on Services # Secret-Key Cryptography # Public-Key Cryptography # Hash Functions
  # Message Authentication Codes # Digital Signatures # Diffie-Hellman Key Agreement

Attacks on Services

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.

Top # Attacks on Services # Secret-Key Cryptography # Public-Key Cryptography # Hash Functions
  # Message Authentication Codes # Digital Signatures # Diffie-Hellman Key Agreement

Secret-Key Cryptography

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:
DESData Encryption Standard
3DEStriple-DES
IDEAInternational Data Encryption Algorithm
AESAdvanced Encryption Standard
Top # Attacks on Services # Secret-Key Cryptography # Public-Key Cryptography # Hash Functions
  # Message Authentication Codes # Digital Signatures # Diffie-Hellman Key Agreement

Public-Key Cryptography

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.
Up   Example #1:
Alice message's privacy using Bob's public key
  Example #2:
Bob message's privacy using Alice's public key
  Example #3:
Alice's message signature, using her private key
  Example #4:
Authentication and Confidentiality
 
1. Alice message's privacy using Bob's public key

Up   Example #1:
Alice message's privacy using Bob's public key
  Example #2:
Bob message's privacy using Alice's public key
  Example #3:
Alice's message signature, using her private key
  Example #4:
Authentication and Confidentiality
 
2. Bob message's privacy using Alice's public key

Up   Example #1:
Alice message's privacy using Bob's public key
  Example #2:
Bob message's privacy using Alice's public key
  Example #3:
Alice's message signature, using her private key
  Example #4:
Authentication and Confidentiality
 
3. Alice's message signature, using her private key

Up   Example #1:
Alice message's privacy using Bob's public key
  Example #2:
Bob message's privacy using Alice's public key
  Example #3:
Alice's message signature, using her private key
  Example #4:
Authentication and Confidentiality
 
4. Authentication and Confidentiality

Top # Attacks on Services # Secret-Key Cryptography # Public-Key Cryptography # Hash Functions
  # Message Authentication Codes # Digital Signatures # Diffie-Hellman Key Agreement

Hash Functions

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.
Top # Attacks on Services # Secret-Key Cryptography # Public-Key Cryptography # Hash Functions
  # Message Authentication Codes # Digital Signatures # Diffie-Hellman Key Agreement

Message Authentication Codes (MAC)

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.

Up   ## HMAC: Keyed-Hashing for Message Authentication  
HMAC: Keyed-Hashing for Message Authentication
HMAC [RFC 2104] 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.

Top # Attacks on Services # Secret-Key Cryptography # Public-Key Cryptography # Hash Functions
  # Message Authentication Codes # Digital Signatures # Diffie-Hellman Key Agreement

Digital Signatures

Top # Attacks on Services # Secret-Key Cryptography # Public-Key Cryptography # Hash Functions
  # Message Authentication Codes # Digital Signatures # Diffie-Hellman Key Agreement

Diffie-Hellman Key Agreement

Up   ## Secret Key Calculation   ## Man-in-the-Middle Attack  
Secret Key Calculation

Up   ## Secret Key Calculation   ## Man-in-the-Middle Attack  
Man-in-the-Middle Attack

Last update: July 29, 2010 
© 2005-2011 Joël Repiquet, All Rights Reserved.