1. Trang chủ
  2. » Công Nghệ Thông Tin

Lecture Data security and encryption - Chapter 11: Basic concepts in number theory and finite fields

52 34 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 52
Dung lượng 433,25 KB

Nội dung

This chapter presents the following content: Number theory, divisibility & GCD, modular arithmetic with integers, Euclid’s algorithm for GCD & inverse, the AES selection process, the details of Rijndael – the AES cipher, looked at the steps in each round out of four AES stages.

Data Security and Encryption (CSE348) Lecture # 11 Review – The AES selection process – The details of Rijndael – the AES cipher – Looked at the steps in each round – Out of four AES stages, last two are discussed • MixColumns • AddRoundKey – The key expansion – Implementation aspects Chapter Basic Concepts in Number Theory and Finite Fields The next morning at daybreak, Star flew indoors, seemingly keen for a lesson I said, "Tap eight." She did a brilliant exhibition, first tapping it in 4, 4, then giving me a hasty glance and doing it in 2, 2, 2, 2, before coming for her nut It is astonishing that Star learned to count up to with no difficulty, and of her own accord discovered that each number could be given with various different divisions, this leaving no doubt that she was consciously thinking each number In fact, she did mental arithmetic, although unable, like humans, to name the numbers But she learned to recognize their spoken names almost immediately and was able to remember the sounds of the names Star is unique as a wild bird, who of her own free will pursued the science of numbers with keen interest and astonishing intelligence — Living with Birds, Len Howard Introduction • Finite fields have become increasingly important in cryptography • A number of cryptographic algorithms rely heavily on properties of finite fields • Notably the Advanced Encryption Standard (AES) and elliptic curve cryptography Introduction • The main purpose of this chapter is to provide the reader with sufficient background on the concepts • of finite fields to be able to understand the design of AES • and other cryptographic algorithms that use finite fields • some basic concepts from number theory that include divisibility, the Euclidian algorithm, and modular arithmetic Introduction • will now introduce finite fields • of increasing importance in cryptography – AES, Elliptic Curve, IDEA, Public Key • concern operations on “numbers” – where what constitutes a “number” and the type of operations varies considerably • start with basic number theory concepts Divisors • say a non-zero number b divides a if for some m have a=mb (a,b,m all integers) • that is b divides into a with no remainder • denote this b|a • and say that b is a divisor of a • eg all of 1,2,3,4,6,8,12,24 divide9 24 • eg 13 | 182; –5 | 30; 17 | 289; –3 | 33; 17 | Properties of Divisibility • • • • If a|1, then a = ±1 If a|b and b|a, then a = ±b Any b /= divides If a | b and b | c, then a | c – e.g 11 | 66 and 66 | 198 x 11 | 198 • If b|g and b|h, then b|(mg + nh) for arbitrary integers m and n e.g b = 7; g = 14; h = 63; m = 3; n = hence 7|14 and 7|63 10 Modular Arithmetic Properties 38 Modular Arithmetic Properties • If we perform modular arithmetic within Zn, the properties shown in Table 4.3 hold for integers in Zn • We show in the next section that this implies that Zn is a commutative ring with a multiplicative identity element • That unlike ordinary arithmetic, the following statement is true only with the attached condition: 39 Modular Arithmetic Properties • if (a x b) = (a x c) (mod n) then b = c (mod n) if a is relatively prime to n • In general, an integer has a multiplicative inverse in Zn if that integer is relatively prime to n • Table 4.2 c in the text shows that the integers 1, 3, 5, and have a multiplicative inverse in Z8 • but 2, 4, and not 40 Euclidean Algorithm • An algorithm credited to Euclid for easily finding the greatest common divisor of two integers • This algorithm has significance subsequently in this chapter • The Euclidean algorithm is an efficient way to find the GCD(a,b) • and is derived from the observation that if a & b have a common factor d (ie a=m.d & b=n.d) 41 Euclidean Algorithm • Then d is also a factor in any difference between them, vis: a-p.b = (m.d)-p.(n.d) = d.(m-p.n) • Euclid's Algorithm keeps computing successive differences until it vanishes, at which point the greatest common divisor has been reached • Some pseudo-code from the text for this algorithm is shown 42 Euclidean Algorithm • an efficient way to find the GCD(a,b) • uses theorem that: – GCD(a,b) = GCD(b, a mod b) • Euclidean Algorithm to compute GCD(a,b) is: Euclid(a,b) if (b=0) then return a; else return Euclid(b, a mod b); 43 Extended Euclidean Algorithm • An extension to the Euclidean algorithm • That will be important for later computations in the area of finite fields and in encryption algorithms such as RSA • For given integers a and b, the extended Euclidean algorithm not only calculate the greatest common divisor d • but also two additional integers x and y that satisfy the following equation: ax + by = d = gcd(a, b) 44 Extended Euclidean Algorithm • It should be clear that x and y will have opposite signs • Can extend the Euclidean algorithm to determine x, y, d, given a and b • We again go through the sequence of divisions indicated in Equation Set (4.3) • and we assume that at each step i, we can find integers x and y that satisfy r = ax + by 45 Extended Euclidean Algorithm • In each row, we calculate a new remainder r , based on the remainders of the previous two rows • We know from the original Euclidean algorithm that the process ends with a remainder of zero • and that the greatest common divisor of a and b is d = gcd(a, b) = r n • But we also have determined that d = r n = axn + byn 46 Extended Euclidean Algorithm • calculates not only GCD but x & y: ax + by = d = gcd(a, b) • useful for later crypto computations • follow sequence of divisions for GCD but assume at each step i, can find x &y: r = ax + by • at end find GCD value and also x & y • if GCD(a,b)=1 these values are inverses 47 Finding Inverses • An important problem is to find multiplicative inverses in such finite fields • Can show that such inverses always exist, & can extend the Euclidean algorithm to find them as shown • See text for discussion as to why this works 48 Finding Inverses EXTENDED EUCLID(m, b) (A1, A2, A3)=(1, 0, m); (B1, B2, B3)=(0, 1, b) if B3 = return A3 = gcd(m, b); no inverse if B3 = return B3 = gcd(m, b); B2 = b–1 mod m Q = A3 div B3 (T1, T2, T3)=(A1 – Q B1, A2 – Q B2, A3 – Q B3) (A1, A2, A3)=(B1, B2, B3) (B1, B2, B3)=(T1, T2, T3) goto 49 Inverse of 550 in GF(1759) • Example showing how to find the inverse of 550 in GF(1759), adapted from Stallings Table 4.4 • In this example, let us use a = 1759 and b = 550 and solve for 1759x + 550y = gcd(1759, 550) • The results are shown in Table 4.4 • Thus, we have 1759 x (–111) + 550 x 355 = –195249 + 195250 = 50 Inverse of 550 in GF(1759) 51 Summary – Number Theory – divisibility & GCD – modular arithmetic with integers – Euclid’s algorithm for GCD & Inverse 52 ... science of numbers with keen interest and astonishing intelligence — Living with Birds, Len Howard Introduction • Finite fields have become increasingly important in cryptography • A number of... on the concepts • of finite fields to be able to understand the design of AES • and other cryptographic algorithms that use finite fields • some basic concepts from number theory that include... The key expansion – Implementation aspects Chapter Basic Concepts in Number Theory and Finite Fields The next morning at daybreak, Star flew indoors, seemingly keen for a lesson I said, "Tap eight."

Ngày đăng: 20/09/2020, 13:59

TỪ KHÓA LIÊN QUAN