Chapter 4. Design of Block Ciphers, Hash Functions, and MAC

Block Cipher

DES

DES stand for Data Encryption Standard.

Spectral properties of S-Box:

  • Hadamard transform: $$\displaystyle f(w) = \sum_{x \in F_2^n} (-1)^{f(x) + xw}$$
  • Avalanche transform: $$\displaystyle A(w) = \sum_{x \in F_2^n} (-1)^{f(x) + f(x + w)}$$

Triple-DES: $$C = E_{K_3} (D_{K_2} (E_{K_1}(M)))$$ or $$C = D_{K_3} (E_{K_2} (D_{K_1}(M)))$$

Encryption Modes:

  1. Electronic Codebook (ECB) Mode => Security risks.
  2. Cipher Block Chaining (CBC) Mode.

Montgomery Ladder

A compute algorithm that resist side-chanel attack.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
function f(g, k):
	// g=>number, k=>(k[t-1], ..., k[0])_2
	R0, R1 = 1, g
	for j in range(t)[::-1]:
		if k[j] == 0:
			R1 = R0*R1, R0 = R0*R0
		else if k[j] == 1:
			R0 = R0*R1, R1 = R0*R0
		else:
			assert False
	return R0

AES

Stream Cipher & Block Cipher

Block Cipher: more computationally costly.

Stream Cipher: More desired randomness properties.

Hash Functions

Why Hash?

  • Save Storage
  • Efficient
  • Additional information for integrity check

Hash Standards:

  • MD5, Rivest
  • SHA-1
  • SHA-2
  • SHA-3 Kecchak

SHA-1

IBC(Identity-Based Cryptography)

Extract:

The public key $$Q_i \in \mathbb{G}_1^*$$ of node i with identity $$ID_i$$ is as $$Q_i = H_1(ID_i)$$, where ID is an arbitrarily long binary string. The KGC derive

Encryption & Decryption:

Encryption:

  • When a user is transmitting a message m to user i confidentially, he encrypts m using user i’s public key and the system parameter in the following way: $$Encrypte(m) \rightarrow C$$

  • When C is computed by:

    1. Randomly choose $$\sigma \in {0, 1}^*$$, and compute $$r =$$