Symmetric encryption principles

本文介绍了对称加密的基本原则,包括安全依赖于密钥而非算法的事实,以及好的算法在安全性和效率之间的平衡。文中详细探讨了流密码RC4的设计及其弱点,并深入讲解了块密码的概念、Feistel网络结构及具体实现如DES、3DES与AES的特点。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Symmetric encryption principles


Security depends on the secrecy of the key, not thealgorithm
A good algorithm is a good trade-off between security and efficiency

Stream ciphers


Stream ciphers: RC4

 Designed by Ron Rivest, 1987
 Variable key size, byte-oriented operation
 Used in SSL, WEP, WPA etc.
 Efficient to implement in software, relatively

for i =0 to 255 do
S[i] = i;
T[i] = K[i mod keylen];
/* Initial Permutation of S */
j= 0;
for i= 0 to 255 do
j =(j + S[i] + T[i]) mod 256;
Swap (S[i], S[j]);
/* Stream Generation */
i, j = 0;
while (true)
i = (i + 1) mod 256;
j = (j + S[i]) mod 256;
Swap (S[i], S[j]);
t = (S[i] + S[j]) mod 256;
k = S[t];
 Weaknesses:
1. Bias in initial output: Pr[ 2nd byte = 0 ] = 2/256
2. Prob. of (0,0) is 1/2562 + 1/2563

Block ciphers

overview

 A block cipher processes the plaintext input in fixed sized blocks and produces a block of ciphertext of equal size for each plaintext block

 Components:
◦ Block size
◦ Key size
◦ Number of rounds
◦ Subkey generation algorithm
◦ Round function

feistel network


general structure used by symmetric block ciphers
 All rounds have the same structure
 Decryption process is exactly the inverse of encryption. (Why?)
LD1=RD0=LE16=RE15
RD1=RE16 XOR Fk16(LE16)
      =(LE15  XOR  Fk16(RE15)) XOR Fk16(LE16)
      =(LE15  XOR  Fk16(RE15)) XOR Fk16(RE15)
      = LE15
 LEi= REi-1
   REi= LEi-1 XOR F(REi-1)

DES

 A 16 round feistel network
 It is a “block’’ cipher with key length 56 bits.
 It was designed by IBM in 1976 for the National Bureau of Standards (NBS), with approval from the National Security Agency (NSA).
 It had been used as a standard for encryption until 2000.
 A new encryption standard was adopted in 2000, as a replacement of DES.
 The same 56-bit cipher key is used for both encryption and
decryption
 The origin 56-bit key is expanded into 16 48-bit round keys
 DES takes 64-bit plaintext and creates a 64-bit ciphertext
 Initial permutation and final permutation

 Rounds:
◦ F, the function
 Expansion
 Key
 S-box


3DES

 The analysis of security property of DES is out of the scope of this course,
 1997: DES broken by exhaustive search
 3DES was incorporated as part of the Data Encryption Standard in 1999 with the publication of FIPS 46-3

AES

 A replacement for DES was needed because DES is subject to exhaustive key search attacks.
 US NIST issued call for ciphers in 1997
 15 candidates accepted in Jun 98
 5 were shortlisted in Aug-99
 Rijndael was selected as the AES in Oct-2000
 Issued as FIPS PUB 197 standard in Nov-2001
 A private key symmetric block cipher
 128-bit plaintext block, 128/192/256-bit keys
 Stronger & faster than “Triple-DES”
 Active life of 20-30 years
 Efficient in both software and hardware implementations
 Simple in design
 Suitable for smart cards (memory requirement)
 An initial round-key addition
 9/11/13 rounds, corresponds to, 128/192/156 bit keys
 A final round, similar to other round, but without mixed column operations

 Round Function : ByteSub
 Multiplicative inverse in GF(28) is used













评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值