110 likes | 229 Views
Cryptography Algorithms. Symmetric and Asymmetric Cryptography Algorithms Data Stream Ciphers Block Ciphers. Key sequence. Key sequence. Plaintext. Ciphertext. Plaintext. Data Stream Ciphers. Principle of a synchronous data-stream cipher. P K K = P 0 = P
E N D
Cryptography Algorithms • Symmetric and Asymmetric Cryptography Algorithms • Data Stream Ciphers • Block Ciphers Digital Kommunikationselektroink TNE027 Lecture 6 (Cryptography)
Key sequence Key sequence Plaintext Ciphertext Plaintext Data Stream Ciphers Principle of a synchronous data-stream cipher P K K = P 0 = P where is the XOR function. Digital Kommunikationselektroink TNE027 Lecture 6 (Cryptography)
Pseudorandom Number Generator • Pseudorandom Number Generators (PRNGs) are needed to generate a Key Sequence. • Linear Feedback Shift Registers (LFSRs) are used as PRNGs. • An LFSR with a length l can generate an maximal sequence length of 2l– 1. Such a maximal sequence is called an m-sequence. • Polynomials are used to define LFSRs. • LFSRs with primitive polynomials can generate m-sequences. Digital Kommunikationselektroink TNE027 Lecture 6 (Cryptography)
LFSR configurations • Fibonacci configuration • Sequential updating See Figure 7.21(a). • Galois configuration • Parallel updating See Figure 7.21(b). Digital Kommunikationselektroink TNE027 Lecture 6 (Cryptography)
Criteria for optimal pseudorandom sequences • The number of 1s and 0s in a cycle differs by no more than one. • Runs of length k (e.g., 111… sequence, 000… sequence) have a total fractional part of all runs 1/2k . • The autocorrelation function C() is constant for [1, n – 1]. Digital Kommunikationselektroink TNE027 Lecture 6 (Cryptography)
Clocking LFSR n times • If n random bits are used at once, it is not a good idea to use just the lowest n bits of an LFSR since this will lead to weak random properties. • LFSRs can be shifted n bits at one clock cycle to generate n new random bits. See Example 7.13, page 328. Digital Kommunikationselektroink TNE027 Lecture 6 (Cryptography)
Combining LFSRs • An additional gain in performance in cryptographic security can be achieved if several LFSRs are combined into one key generator. • Linear and nonlinear combinations are possible. • Nonlinear combinations with thresholds perform best. See pages 331- 333. Digital Kommunikationselektroink TNE027 Lecture 6 (Cryptography)
Block Ciphers • Data Encryption Standard (DES) is typically used in a block cipher. • The DES is a publicly known cryptographic algorithm that converts plaintext to ciphertext using a 56-bit key. • The same algorithm is used with the same key to convert ciphertext back to plaintext, a process called decryption. Digital Kommunikationselektroink TNE027 Lecture 6 (Cryptography)
The DES consists of 16 "rounds" of operations that mix the data and key together in a prescribed manner using the fundamental operations of permutation and substitution. • The goal is to completely scramble the data and key so that every bit of the ciphertext depends on every bit of the data plus every bit of the key (a 56-bit quantity for DES). See Fig. 7.27, page 334. Digital Kommunikationselektroink TNE027 Lecture 6 (Cryptography)
Block cipher used as stream cipher • DES in Output Feedback (OFB) mode can be used as a data-stream cipher. • An initial value (initial vector) is loaded into Textregister instead of plaintext. See Fig. 7.28, page 335. Digital Kommunikationselektroink TNE027 Lecture 6 (Cryptography)