Organizations

a portal for promoting internet and telecom
standardization knowledge

IETF topics > Security
  RFC index search site map about tech-invite home
# IETF   # 3GPP   # ETSI
# Alliances, Fora, & other SDOs
Standardization work
# IETF WGs: RFCs & Drafts  
# IAB # IRTF
# 3GPP series   # ETSI committees
IETF topics
# SIP   # Security  
# Presence, IM & XCAP
# Conferencing   # Media Control  
# EAP   # Mobility Management  
3GPP topics
# Network Architecture   # GPRS  
# IMS   # Security Architecture  
# AKA   # GAA/GBA   # LI  
# GAN   # MBMS   # I-WLAN   # EPS  
# PCC   # Charging  
# HSS & Subscriber Data   # GUP  
# LCS   # Presence   # PoC  
# SIP-I   # ISC   # ICS  
ETSI topics
# TISPAN NGN  
Other topics
# M2M   # RFID   # NFC  
# Network Simulation
#public access
#private access (full or partial)
# public access so far, but very likely private access with next version
# Cryptography Basics  
# SSL/TLS Sequence Charts  
# PKI Certificate Examples  
# PKI Certificate & CRL Profile  
# CMS Examples  
# CMS's ASN.1 Definitions  

Cryptography Basics

The purpose of this page is to serve as a common support to existing or upcoming security mechanisms published on this site.
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 [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.

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: November 20, 2009 
© 2005-2010 Joël Repiquet, All Rights Reserved.