Integer multiplication with generalized Fermat primes

Size: px
Start display at page:

Download "Integer multiplication with generalized Fermat primes"

Transcription

1 Integer multiplication with generalized Fermat primes CARAMEL Team, LORIA, University of Lorraine Supervised by: Emmanuel Thomé and Jérémie Detrey Journées nationales du Calcul Formel 2015 (Cluny) November 4, 2015

2 Summary 1 Fast Fourier Transform Naive multiplication Multiplying integer using polynomials FFT Schönhage-Strassen Some remarks 2 Fürer Factorization of FFT A new ring and a new cut 3 Using generalized Fermat primes Number-theoretic transform A Fürer-like number theoretic transform Comparison of complexities Integer multiplication with generalized Fermat primes November 4, / 23

3 Fast Fourier Transform 1 Fast Fourier Transform Naive multiplication Multiplying integer using polynomials FFT Schönhage-Strassen Some remarks 2 Fürer Factorization of FFT A new ring and a new cut 3 Using generalized Fermat primes Number-theoretic transform A Fürer-like number theoretic transform Comparison of complexities Integer multiplication with generalized Fermat primes November 4, / 23

4 Fast Fourier Transform Naive multiplication How to multiply two numbers a = (a 0 a N ) and b = (b 0 b N ) where a and b are given in binary representation? Integer multiplication with generalized Fermat primes November 4, / 23

5 Fast Fourier Transform Naive multiplication How to multiply two numbers a = (a 0 a N ) and b = (b 0 b N ) where a and b are given in binary representation? First idea: Sum all a i b using 2-shift. This method has a O(N 2 ) bit complexity. Integer multiplication with generalized Fermat primes November 4, / 23

6 Fast Fourier Transform Naive multiplication How to multiply two numbers a = (a 0 a N ) and b = (b 0 b N ) where a and b are given in binary representation? First idea: Sum all a i b using 2-shift. This method has a O(N 2 ) bit complexity. People believed long enough it was the best complexity we could reach (Kolmogorov). Karatsuba proved that it was wrong... Integer multiplication with generalized Fermat primes November 4, / 23

7 Fast Fourier Transform Multiplying integer using polynomials The fastest known algorithm is based on the evaluation-interpolation paradigm. Input: 2 numbers a and b of N bits. We decompose the input into 2 polynomials A = i a ix i and B = i b ix i (deg A = deg B = n, a i = b i = N/(2n) = k, and a i = b i = 0 for i > n). A(2 k ) =a k a a 2n 1 2 (2n 1)k = a B(2 k ) =b k b b 2n 1 2 (2n 1)k = b Integer multiplication with generalized Fermat primes November 4, / 23

8 Fast Fourier Transform Multiplying integer using polynomials The fastest known algorithm is based on the evaluation-interpolation paradigm. Input: 2 numbers a and b of N bits. We decompose the input into 2 polynomials A = i a ix i and B = i b ix i (deg A = deg B = n, a i = b i = N/(2n) = k, and a i = b i = 0 for i > n). A(2 k ) =a k a a 2n 1 2 (2n 1)k = a B(2 k ) =b k b b 2n 1 2 (2n 1)k = b We work in some ring R in which we have a 2n-th principal root of unity ω. Integer multiplication with generalized Fermat primes November 4, / 23

9 Fast Fourier Transform Multiplying integer using polynomials The fastest known algorithm is based on the evaluation-interpolation paradigm. Input: 2 numbers a and b of N bits. We decompose the input into 2 polynomials A = i a ix i and B = i b ix i (deg A = deg B = n, a i = b i = N/(2n) = k, and a i = b i = 0 for i > n). A(2 k ) =a k a a 2n 1 2 (2n 1)k = a B(2 k ) =b k b b 2n 1 2 (2n 1)k = b We work in some ring R in which we have a 2n-th principal root of unity ω. We compute the A(ω i ) and B(ω i ). Integer multiplication with generalized Fermat primes November 4, / 23

10 Fast Fourier Transform Multiplying integer using polynomials The fastest known algorithm is based on the evaluation-interpolation paradigm. Input: 2 numbers a and b of N bits. We decompose the input into 2 polynomials A = i a ix i and B = i b ix i (deg A = deg B = n, a i = b i = N/(2n) = k, and a i = b i = 0 for i > n). A(2 k ) =a k a a 2n 1 2 (2n 1)k = a B(2 k ) =b k b b 2n 1 2 (2n 1)k = b We work in some ring R in which we have a 2n-th principal root of unity ω. We compute the A(ω i ) and B(ω i ). We recover A B from the points A(ω i ) B(ω i ) with Lagrange interpolation for a polynomial of degree 2n 1. Integer multiplication with generalized Fermat primes November 4, / 23

11 Fast Fourier Transform Multiplying integer using polynomials The fastest known algorithm is based on the evaluation-interpolation paradigm. Input: 2 numbers a and b of N bits. We decompose the input into 2 polynomials A = i a ix i and B = i b ix i (deg A = deg B = n, a i = b i = N/(2n) = k, and a i = b i = 0 for i > n). A(2 k ) =a k a a 2n 1 2 (2n 1)k = a B(2 k ) =b k b b 2n 1 2 (2n 1)k = b We work in some ring R in which we have a 2n-th principal root of unity ω. We compute the A(ω i ) and B(ω i ). We recover A B from the points A(ω i ) B(ω i ) with Lagrange interpolation for a polynomial of degree 2n 1. The DFT algorithm allows one to compute the A(ω i ) and B(ω i ). Integer multiplication with generalized Fermat primes November 4, / 23

12 Fast Fourier Transform Multiplying integer using polynomials [a 0,..., a 2n 1 ] [b 0,..., b 2n 1 ] DFT DFT [x 0,..., x 2n 1 ] [y 0,..., y 2n 1 ] Component Multiply [x 0 y 0,..., x 2n 1 y 2n 1 ] inverse DFT Integer multiplication with generalized Fermat primes November 4, / 23

13 Fast Fourier Transform FFT P is a polynomial of degree 2n 1 (n is a power of 2) and ω is a 2n-th principal root of unity in R (C or Z/pZ for example), which means that j [0,2n 1] ωij = 0 for i [1, 2n 1]. Integer multiplication with generalized Fermat primes November 4, / 23

14 Fast Fourier Transform FFT P is a polynomial of degree 2n 1 (n is a power of 2) and ω is a 2n-th principal root of unity in R (C or Z/pZ for example), which means that j [0,2n 1] ωij = 0 for i [1, 2n 1]. FFT(P, ω, 2n 1) if n = 1 then return P 0 + P 1 + X (P 0 P 1 ) end if P even (P 2i ) i P odd (P 2i+1 ) i Q even FFT(P even, ω 2, n 1) Q odd FFT(P odd, ω 2, n 1) Q Q even (X ) + Q odd (ωx ) + X n (Q odd (X ) Q even (ωx )) return Q Integer multiplication with generalized Fermat primes November 4, / 23

15 Fast Fourier Transform FFT P is a polynomial of degree 2n 1 (n is a power of 2) and ω is a 2n-th principal root of unity in R (C or Z/pZ for example), which means that j [0,2n 1] ωij = 0 for i [1, 2n 1]. FFT(P, ω, 2n 1) if n = 1 then return P 0 + P 1 + X (P 0 P 1 ) end if P even (P 2i ) i P odd (P 2i+1 ) i Q even FFT(P even, ω 2, n 1) Q odd FFT(P odd, ω 2, n 1) Q Q even (X ) + Q odd (ωx ) + X n (Q odd (X ) Q even (ωx )) return Q Complexity: O(n log n) operations in R, among which multiplications by some powers of ω, additions and subtractions. Integer multiplication with generalized Fermat primes November 4, / 23

16 Fast Fourier Transform FFT P 0 P 1 P 2 P 3 P 4 P 5 P 6 P 7 P 8 P 9 P 10 P 11 P 12 P 13 P 14 P 15 ω 0 ω 0 ω 0 ω 0 ω 4 ω 4 ω 4 ω 4 ω 0 ω 0 ω 2 ω 2 ω 4 ω 4 ω 6 ω 6 ω 0 ω 1 ω 2 ω 3 ω 4 ω 5 ω 6 ω 7 Q bitrev(0) Q bitrev(1) Q bitrev(2) Q bitrev(3) Q bitrev(4) Q bitrev(5) Q bitrev(6) Q bitrev(7) Q bitrev(8) Q bitrev(9) Q bitrev(10) Q bitrev(11) Q bitrev(12) Q bitrev(13) Q bitrev(14) Q bitrev(15) Integer multiplication with generalized Fermat primes November 4, / 23

17 Fast Fourier Transform Schönhage-Strassen 1 N: # bits of the integers that we multiply. 2 2n: degree of the polynomials A and B used to represent a and b. 3 k: # bits used to encode the coefficients of A and B: a = A(2 k ) and b = B(2 k ). Integer multiplication with generalized Fermat primes November 4, / 23

18 Fast Fourier Transform Schönhage-Strassen 1 N: # bits of the integers that we multiply. 2 2n: degree of the polynomials A and B used to represent a and b. 3 k: # bits used to encode the coefficients of A and B: a = A(2 k ) and b = B(2 k ). Examples: If R = C, then ω = exp(iπ/n). k = O(log N) is the best choice. Thus, the recursive calls are manipulating O(log N)-sized data during convolution step. Integer multiplication with generalized Fermat primes November 4, / 23

19 Fast Fourier Transform Schönhage-Strassen 1 N: # bits of the integers that we multiply. 2 2n: degree of the polynomials A and B used to represent a and b. 3 k: # bits used to encode the coefficients of A and B: a = A(2 k ) and b = B(2 k ). Examples: If R = C, then ω = exp(iπ/n). k = O(log N) is the best choice. Thus, the recursive calls are manipulating O(log N)-sized data during convolution step. If R = Z/(2 e + 1)Z, then, k e O( N) (smallest k possible). Then ω = 2 j with j = e/n. Multiplications by powers of ω are negacyclic permutations. Integer multiplication with generalized Fermat primes November 4, / 23

20 Fast Fourier Transform Schönhage-Strassen [a 0,..., a 2n 1 ] [b 0,..., b 2n 1 ] DFT DFT [x 0,..., x 2n 1 ] [y 0,..., y 2n 1 ] Component Multiply [x 0 y 0,..., x 2n 1 y 2n 1 ] inverse DFT Integer multiplication with generalized Fermat primes November 4, / 23

21 Fast Fourier Transform Schönhage-Strassen Modular Case [a 0,..., a 2n 1 ] [b 0,..., b 2n 1 ] DFT DFT Recursion [x 0,..., x 2n 1 ] [y 0,..., y 2n 1 ] Component Multiply [x 0 y 0,..., x 2n 1 y 2n 1 ] inverse DFT Integer multiplication with generalized Fermat primes November 4, / 23

22 Fast Fourier Transform Schönhage-Strassen Complex Case [a 0,..., a 2n 1 ] [b 0,..., b 2n 1 ] DFT > < DFT Recursion [x 0,..., x 2n 1 ] [y 0,..., y 2n 1 ] Component Multiply [x 0 y 0,..., x 2n 1 y 2n 1 ] inverse DFT Integer multiplication with generalized Fermat primes November 4, / 23

23 Fast Fourier Transform Some remarks C Z/(2 e + 1)Z Coefficients size? Coefficients size? O(log N) O( N) Expensive multiplications? Expensive multiplications? DFT, Convolution Convolution Integer multiplication with generalized Fermat primes November 4, / 23

24 Fast Fourier Transform Some remarks C Z/(2 e + 1)Z Coefficients size? Coefficients size? O(log N) O( N) Expensive multiplications? Expensive multiplications? DFT, Convolution Convolution Case Degree Mult. by a root Recursion Complexity C O(N/ log N) expensive O(log N) N log N log log N 2 O(log N) Z/(2 e + 1)Z O( N) cheap O( N) N log N log log N In C, computing an FFT in {1, 1, i, i} is quite easy. But less obvious for superior orders... Integer multiplication with generalized Fermat primes November 4, / 23

25 Fürer 1 Fast Fourier Transform Naive multiplication Multiplying integer using polynomials FFT Schönhage-Strassen Some remarks 2 Fürer Factorization of FFT A new ring and a new cut 3 Using generalized Fermat primes Number-theoretic transform A Fürer-like number theoretic transform Comparison of complexities Integer multiplication with generalized Fermat primes November 4, / 23

26 Fürer Factorization of FFT Here you can see the butterfly graph for 16-point transform. a 0 a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 a 10 a 11 a 12 a 13 a 14 a 15 Below, the matrix representation: a 0 a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 a 10 a 11 a 12 a 13 a 14 a 15 Integer multiplication with generalized Fermat primes November 4, / 23

27 Fürer Factorization of FFT We start by inner transforms. a 0 a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 a 10 a 11 a 12 a 13 a 14 a 15 Below, the matrix representation: a 0 a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 a 10 a 11 a 12 a 13 a 14 a 15 There are 4 4-points FFT. Integer multiplication with generalized Fermat primes November 4, / 23

28 Fürer Factorization of FFT Then the outer ones. a 0 a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 a 10 a 11 a 12 a 13 a 14 a 15 Below, the matrix representation: a 0 a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 a 10 a 11 a 12 a 13 a 14 a 15 There are 4 4-points FFT. Integer multiplication with generalized Fermat primes November 4, / 23

29 Fürer A new ring and a new cut We use a polynomial ring R of the form R = C[x]/(x P + 1) or R = Z[x]/(q c, x P + 1)Z There exists a 2n-th root of unity ρ such that ρ n/p = x (Lagrange interpolation) The computation of 2n-points FFT is factored into the computation of log 2P 2n times n/p 2P-points FFT P = Θ(log N) and coefficients of elements of R are stored on Θ(log N) bits Integer multiplication with generalized Fermat primes November 4, / 23

30 Fürer A new ring and a new cut We use a polynomial ring R of the form R = C[x]/(x P + 1) or R = Z[x]/(q c, x P + 1)Z There exists a 2n-th root of unity ρ such that ρ n/p = x (Lagrange interpolation) The computation of 2n-points FFT is factored into the computation of log 2P 2n times n/p 2P-points FFT P = Θ(log N) and coefficients of elements of R are stored on Θ(log N) bits Case Degree Mult. by a root Recursion Complexity C O(N/ log N) expensive O(log N) N log N log log N 2 O(log N) Z/(2 e + 1)Z O( N) cheap O( N) N log N log log N C[x]/(x P + 1) O(N/ log 2 N) it depends O(log 2 N) N log N 2 O(log N) Z[x]/(q c, x P + 1)Z O(N/ log 2 N) it depends O(log 2 N) N log N 2 O(log N) Integer multiplication with generalized Fermat primes November 4, / 23

31 Using generalized Fermat primes 1 Fast Fourier Transform Naive multiplication Multiplying integer using polynomials FFT Schönhage-Strassen Some remarks 2 Fürer Factorization of FFT A new ring and a new cut 3 Using generalized Fermat primes Number-theoretic transform A Fürer-like number theoretic transform Comparison of complexities Integer multiplication with generalized Fermat primes November 4, / 23

32 Using generalized Fermat primes Number-theoretic transform Let us multiply integers by associating to them 2 polynomials of degree 2n 1 for which the coefficients are embedded in a finite field R = Z/qZ. Integer multiplication with generalized Fermat primes November 4, / 23

33 Using generalized Fermat primes Number-theoretic transform Let us multiply integers by associating to them 2 polynomials of degree 2n 1 for which the coefficients are embedded in a finite field R = Z/qZ. The prime q must verify: 2n q 1. Thus, there exists a 2n-th principal root of unity. Integer multiplication with generalized Fermat primes November 4, / 23

34 Using generalized Fermat primes Number-theoretic transform Let us multiply integers by associating to them 2 polynomials of degree 2n 1 for which the coefficients are embedded in a finite field R = Z/qZ. The prime q must verify: 2n q 1. Thus, there exists a 2n-th principal root of unity. 1 N: # bits of the integers that we multiply. 2 2n: degree of the polynomials A and B used to represent a and b. 3 k: # bits used to encode the coefficients of A and B: a = A(2 k ) and b = B(2 k ); this number is given by roughly 1 2 log 2 q. Integer multiplication with generalized Fermat primes November 4, / 23

35 Using generalized Fermat primes Number-theoretic transform Let us multiply integers by associating to them 2 polynomials of degree 2n 1 for which the coefficients are embedded in a finite field R = Z/qZ. The prime q must verify: 2n q 1. Thus, there exists a 2n-th principal root of unity. 1 N: # bits of the integers that we multiply. 2 2n: degree of the polynomials A and B used to represent a and b. 3 k: # bits used to encode the coefficients of A and B: a = A(2 k ) and b = B(2 k ); this number is given by roughly 1 2 log 2 q. A choice of q such that k = O(log N) is optimal. Integer multiplication with generalized Fermat primes November 4, / 23

36 Using generalized Fermat primes A Fürer-like number theoretic transform q is chosen such that q = b P + 1. There exists b such that b < P (log P) 1+ɛ for any ɛ > 0. Thus, log 2 q P log P. Let ρ be a 2n-th root of unity in Z/qZ such that ρ n/p = b. Integer multiplication with generalized Fermat primes November 4, / 23

37 Using generalized Fermat primes A Fürer-like number theoretic transform q is chosen such that q = b P + 1. There exists b such that b < P (log P) 1+ɛ for any ɛ > 0. Thus, log 2 q P log P. Let ρ be a 2n-th root of unity in Z/qZ such that ρ n/p = b. Working in radix b is like working with "polynomials" of degree P whose coefficients are bounded by b. Integer multiplication with generalized Fermat primes November 4, / 23

38 Using generalized Fermat primes A Fürer-like number theoretic transform q is chosen such that q = b P + 1. There exists b such that b < P (log P) 1+ɛ for any ɛ > 0. Thus, log 2 q P log P. Let ρ be a 2n-th root of unity in Z/qZ such that ρ n/p = b. Working in radix b is like working with "polynomials" of degree P whose coefficients are bounded by b. Naive Way New way x x X (b) = x 0 + x 1 b + x 2 b 2 x P 1 b P 1 y y Y (b) = y 0 + y 1 b + y 2 b 2 y P 1 b P 1 x y z = x y and x y = z mod q Z = X Y mod (X P + 1) and x y = Z(b) Integer multiplication with generalized Fermat primes November 4, / 23

39 Using generalized Fermat primes Comparison of complexities Using Fürer s algorithm, we got: Case Degree Mult. by a root Recursion Complexity C O(N/ log N) expensive O(log N) N log N log log N 2 O(log N) Z/(2 e + 1)Z O( N) cheap O( N) N log N log log N C[x]/(x P + 1) O(N/ log 2 N) it depends O(log 2 N) N log N 2 O(log N) Z[x]/(q c, x P + 1)Z O(N/ log 2 N) it depends O(log 2 N) N log N 2 O(log N) Integer multiplication with generalized Fermat primes November 4, / 23

40 Using generalized Fermat primes Comparison of complexities Using Fürer s algorithm, we got: Case Degree Mult. by a root Recursion Complexity C O(N/ log N) expensive O(log N) N log N log log N 2 O(log N) Z/(2 e + 1)Z O( N) cheap O( N) N log N log log N C[x]/(x P + 1) O(N/ log 2 N) it depends O(log 2 N) N log N 2 O(log N) Z[x]/(q c, x P + 1)Z O(N/ log 2 N) it depends O(log 2 N) N log N 2 O(log N) Using the last trick, we get the following data: Case Degree Mult. by a root Recursion Complexity C O(N/ log N) expensive O(log N) N log N log log N 2 O(log N) Z/(2 e + 1)Z O( N) cheap O( N) N log N log log N C[x]/(x P + 1) O(N/ log 2 N) it depends O(log 2 N) N log N 2 O(log N) Z[x]/(q c, x P + 1)Z O(N/ log 2 N) it depends O(log 2 N) N log N 2 O(log N) Z/(b P + 1)Z O(N/(log N log log N)) it depends O(log N log log N) N log N 2 O(log N) Integer multiplication with generalized Fermat primes November 4, / 23

41 Conclusion Removing the polynomial layer improves the complexity of the algorithm. Integer multiplication with generalized Fermat primes November 4, / 23

42 Conclusion Removing the polynomial layer improves the complexity of the algorithm. With a careful complexity analysis, we get the following complexity estimate: N log N 4 log N (the same as the one obtained by Harvey, Lecerf and Van der Hoeven with Mersenne primes). Integer multiplication with generalized Fermat primes November 4, / 23

43 Conclusion Removing the polynomial layer improves the complexity of the algorithm. With a careful complexity analysis, we get the following complexity estimate: N log N 4 log N (the same as the one obtained by Harvey, Lecerf and Van der Hoeven with Mersenne primes). An efficient implementation has to be done. Integer multiplication with generalized Fermat primes November 4, / 23

44 Conclusion Removing the polynomial layer improves the complexity of the algorithm. With a careful complexity analysis, we get the following complexity estimate: N log N 4 log N (the same as the one obtained by Harvey, Lecerf and Van der Hoeven with Mersenne primes). An efficient implementation has to be done. Some limitations: efficient multiplication of two polynomials modulo X P + 1 (bilinear rank), strategy for choosing a good prime, an algorithm for the decompositions... Integer multiplication with generalized Fermat primes November 4, / 23

Integer multiplication and the truncated product problem

Integer multiplication and the truncated product problem Integer multiplication and the truncated product problem David Harvey Arithmetic Geometry, Number Theory, and Computation MIT, August 2018 University of New South Wales Political update from Australia

More information

Fast integer multiplication using generalized Fermat primes

Fast integer multiplication using generalized Fermat primes Fast integer multiplication using generalized Fermat primes Svyatoslav Covanov, Emmanuel Thomé To cite this version: Svyatoslav Covanov, Emmanuel Thomé. Fast integer multiplication using generalized Fermat

More information

Faster integer multiplication using short lattice vectors

Faster integer multiplication using short lattice vectors Faster integer multiplication using short lattice vectors David Harvey and Joris van der Hoeven ANTS XIII, University of Wisconsin, Madison, July 2018 University of New South Wales / CNRS, École Polytechnique

More information

Implementation of the DKSS Algorithm for Multiplication of Large Numbers

Implementation of the DKSS Algorithm for Multiplication of Large Numbers Implementation of the DKSS Algorithm for Multiplication of Large Numbers Christoph Lüders Universität Bonn The International Symposium on Symbolic and Algebraic Computation, July 6 9, 2015, Bath, United

More information

Even faster integer multiplication

Even faster integer multiplication Even faster integer multiplication DAVID HARVEY School of Mathematics and Statistics University of New South Wales Sydney NSW 2052 Australia Email: d.harvey@unsw.edu.au JORIS VAN DER HOEVEN a, GRÉGOIRE

More information

Implementing Fast Carryless Multiplication

Implementing Fast Carryless Multiplication Implementing Fast Carryless Multiplication Joris van der Hoeven, Robin Larrieu and Grégoire Lecerf CNRS & École polytechnique MACIS 2017 Nov. 15, Vienna, Austria van der Hoeven, Larrieu, Lecerf Implementing

More information

Fast and Small: Multiplying Polynomials without Extra Space

Fast and Small: Multiplying Polynomials without Extra Space Fast and Small: Multiplying Polynomials without Extra Space Daniel S. Roche Symbolic Computation Group School of Computer Science University of Waterloo CECM Day SFU, Vancouver, 24 July 2009 Preliminaries

More information

Fast Convolution; Strassen s Method

Fast Convolution; Strassen s Method Fast Convolution; Strassen s Method 1 Fast Convolution reduction to subquadratic time polynomial evaluation at complex roots of unity interpolation via evaluation at complex roots of unity 2 The Master

More information

Even faster integer multiplication

Even faster integer multiplication Even faster integer multiplication DAVID HARVEY School of Mathematics and Statistics University of New South Wales Sydney NSW 2052 Australia Email: d.harvey@unsw.edu.au JORIS VAN DER HOEVEN a, GRÉGOIRE

More information

PUTTING FÜRER ALGORITHM INTO PRACTICE WITH THE BPAS LIBRARY. (Thesis format: Monograph) Linxiao Wang. Graduate Program in Computer Science

PUTTING FÜRER ALGORITHM INTO PRACTICE WITH THE BPAS LIBRARY. (Thesis format: Monograph) Linxiao Wang. Graduate Program in Computer Science PUTTING FÜRER ALGORITHM INTO PRACTICE WITH THE BPAS LIBRARY. (Thesis format: Monograph) by Linxiao Wang Graduate Program in Computer Science A thesis submitted in partial fulfillment of the requirements

More information

Fast integer multiplication

Fast integer multiplication Fast integer multiplication David Harvey, Joris van der Hoeven, Grégoire Lecerf CNRS, École polytechnique Bordeaux, February 2, 2015 http://www.texmacs.org Fundamental complexities I(n): multiplication

More information

Fast algorithms for polynomials and matrices Part 2: polynomial multiplication

Fast algorithms for polynomials and matrices Part 2: polynomial multiplication Fast algorithms for polynomials and matrices Part 2: polynomial multiplication by Grégoire Lecerf Computer Science Laboratory & CNRS École polytechnique 91128 Palaiseau Cedex France 1 Notation In this

More information

Parallel Integer Polynomial Multiplication Changbo Chen, Svyatoslav Parallel Integer Covanov, Polynomial FarnamMultiplication

Parallel Integer Polynomial Multiplication Changbo Chen, Svyatoslav Parallel Integer Covanov, Polynomial FarnamMultiplication Parallel Integer Polynomial Multiplication Parallel Integer Polynomial Multiplication Changbo Chen 1 Svyatoslav Covanov 2,3 Farnam Mansouri 2 Marc Moreno Maza 2 Ning Xie 2 Yuzhen Xie 2 1 Chinese Academy

More information

CSE 548: Analysis of Algorithms. Lecture 4 ( Divide-and-Conquer Algorithms: Polynomial Multiplication )

CSE 548: Analysis of Algorithms. Lecture 4 ( Divide-and-Conquer Algorithms: Polynomial Multiplication ) CSE 548: Analysis of Algorithms Lecture 4 ( Divide-and-Conquer Algorithms: Polynomial Multiplication ) Rezaul A. Chowdhury Department of Computer Science SUNY Stony Brook Spring 2015 Coefficient Representation

More information

CPSC 518 Introduction to Computer Algebra Asymptotically Fast Integer Multiplication

CPSC 518 Introduction to Computer Algebra Asymptotically Fast Integer Multiplication CPSC 518 Introduction to Computer Algebra Asymptotically Fast Integer Multiplication 1 Introduction We have now seen that the Fast Fourier Transform can be applied to perform polynomial multiplication

More information

Fast Polynomials Multiplication Using FFT

Fast Polynomials Multiplication Using FFT Li Chen lichen.xd at gmail.com Xidian University January 17, 2014 Outline 1 Discrete Fourier Transform (DFT) 2 Discrete Convolution 3 Fast Fourier Transform (FFT) 4 umber Theoretic Transform (TT) 5 More

More information

Frequency Domain Finite Field Arithmetic for Elliptic Curve Cryptography

Frequency Domain Finite Field Arithmetic for Elliptic Curve Cryptography Frequency Domain Finite Field Arithmetic for Elliptic Curve Cryptography Selçuk Baktır, Berk Sunar {selcuk,sunar}@wpi.edu Department of Electrical & Computer Engineering Worcester Polytechnic Institute

More information

Elliptic Curves Spring 2013 Lecture #3 02/12/2013

Elliptic Curves Spring 2013 Lecture #3 02/12/2013 18.783 Elliptic Curves Spring 2013 Lecture #3 02/12/2013 3.1 Arithmetic in finite fields To make explicit computations with elliptic curves over finite fields, we need to know how to perform arithmetic

More information

3 Finite fields and integer arithmetic

3 Finite fields and integer arithmetic 18.783 Elliptic Curves Lecture #3 Spring 2017 02/15/2017 3 Finite fields and integer arithmetic In order to perform explicit computations with elliptic curves over finite fields, we first need to understand

More information

Output-sensitive algorithms for sumset and sparse polynomial multiplication

Output-sensitive algorithms for sumset and sparse polynomial multiplication Output-sensitive algorithms for sumset and sparse polynomial multiplication Andrew Arnold Cheriton School of Computer Science University of Waterloo Waterloo, Ontario, Canada Daniel S. Roche Computer Science

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design and Analysis LECTURE 14 Divide and Conquer Fast Fourier Transform Sofya Raskhodnikova 10/7/2016 S. Raskhodnikova; based on slides by K. Wayne. 5.6 Convolution and FFT Fast Fourier Transform:

More information

CPSC 518 Introduction to Computer Algebra Schönhage and Strassen s Algorithm for Integer Multiplication

CPSC 518 Introduction to Computer Algebra Schönhage and Strassen s Algorithm for Integer Multiplication CPSC 518 Introduction to Computer Algebra Schönhage and Strassen s Algorithm for Integer Multiplication March, 2006 1 Introduction We have now seen that the Fast Fourier Transform can be applied to perform

More information

Chapter 1 Divide and Conquer Polynomial Multiplication Algorithm Theory WS 2015/16 Fabian Kuhn

Chapter 1 Divide and Conquer Polynomial Multiplication Algorithm Theory WS 2015/16 Fabian Kuhn Chapter 1 Divide and Conquer Polynomial Multiplication Algorithm Theory WS 2015/16 Fabian Kuhn Formulation of the D&C principle Divide-and-conquer method for solving a problem instance of size n: 1. Divide

More information

CSCI Honor seminar in algorithms Homework 2 Solution

CSCI Honor seminar in algorithms Homework 2 Solution CSCI 493.55 Honor seminar in algorithms Homework 2 Solution Saad Mneimneh Visiting Professor Hunter College of CUNY Problem 1: Rabin-Karp string matching Consider a binary string s of length n and another

More information

Speedy Maths. David McQuillan

Speedy Maths. David McQuillan Speedy Maths David McQuillan Basic Arithmetic What one needs to be able to do Addition and Subtraction Multiplication and Division Comparison For a number of order 2 n n ~ 100 is general multi precision

More information

Faster arithmetic for number-theoretic transforms

Faster arithmetic for number-theoretic transforms University of New South Wales 7th October 2011, Macquarie University Plan for talk 1. Review number-theoretic transform (NTT) 2. Discuss typical butterfly algorithm 3. Improvements to butterfly algorithm

More information

Faster Integer Multiplication

Faster Integer Multiplication Faster Integer Multiplication Martin Fürer Department of Computer Science and Engineering Pennsylvania State University University Park, PA 16802 furer@cse.psu.edu ABSTRACT For more than 35 years, the

More information

The tangent FFT. D. J. Bernstein University of Illinois at Chicago

The tangent FFT. D. J. Bernstein University of Illinois at Chicago The tangent FFT D. J. Bernstein University of Illinois at Chicago Advertisement SPEED: Software Performance Enhancement for Encryption and Decryption A workshop on software speeds for secret-key cryptography

More information

RSA Implementation. Oregon State University

RSA Implementation. Oregon State University RSA Implementation Çetin Kaya Koç Oregon State University 1 Contents: Exponentiation heuristics Multiplication algorithms Computation of GCD and Inverse Chinese remainder algorithm Primality testing 2

More information

Three Ways to Test Irreducibility

Three Ways to Test Irreducibility Three Ways to Test Irreducibility Richard P. Brent Australian National University joint work with Paul Zimmermann INRIA, Nancy France 12 Feb 2009 Outline Polynomials over finite fields Irreducibility criteria

More information

Old and new algorithms for computing Bernoulli numbers

Old and new algorithms for computing Bernoulli numbers Old and new algorithms for computing Bernoulli numbers University of New South Wales 25th September 2012, University of Ballarat Bernoulli numbers Rational numbers B 0, B 1,... defined by: x e x 1 = n

More information

Lucas Lehmer primality test - Wikipedia, the free encyclopedia

Lucas Lehmer primality test - Wikipedia, the free encyclopedia Lucas Lehmer primality test From Wikipedia, the free encyclopedia In mathematics, the Lucas Lehmer test (LLT) is a primality test for Mersenne numbers. The test was originally developed by Edouard Lucas

More information

5.6 Convolution and FFT

5.6 Convolution and FFT 5.6 Convolution and FFT Fast Fourier Transform: Applications Applications. Optics, acoustics, quantum physics, telecommunications, control systems, signal processing, speech recognition, data compression,

More information

Even faster integer multiplication

Even faster integer multiplication Even faster integer multiplication David Harvey School of Mathematics and Statistics University of New South Wales Sydney NSW 2052 Australia Email: d.harvey@unsw.edu.au Joris van der Hoeven a, Grégoire

More information

CS 4424 Matrix multiplication

CS 4424 Matrix multiplication CS 4424 Matrix multiplication 1 Reminder: matrix multiplication Matrix-matrix product. Starting from a 1,1 a 1,n A =.. and B = a n,1 a n,n b 1,1 b 1,n.., b n,1 b n,n we get AB by multiplying A by all columns

More information

Literature Review: Adaptive Polynomial Multiplication

Literature Review: Adaptive Polynomial Multiplication Literature Review: Adaptive Polynomial Multiplication Daniel S. Roche November 27, 2007 While output-sensitive algorithms have gained a fair amount of popularity in the computer algebra community, adaptive

More information

Implementation of the DKSS Algorithm for Multiplication of Large Numbers

Implementation of the DKSS Algorithm for Multiplication of Large Numbers Implementation of the DKSS Algorithm for Multiplication of Large Numbers Christoph Lüders Universität Bonn Institut für Informatik Bonn, Germany chris@cfos.de ABSTRACT The Schönhage-Strassen algorithm

More information

Three Ways to Test Irreducibility

Three Ways to Test Irreducibility Outline Three Ways to Test Irreducibility Richard P. Brent Australian National University joint work with Paul Zimmermann INRIA, Nancy France 8 Dec 2008 Polynomials over finite fields Irreducibility criteria

More information

Faster polynomial multiplication over nite elds

Faster polynomial multiplication over nite elds Faster polynomial multiplication over nite elds David Harvey School of Mathematics and Statistics University of New South Wales Sydney NSW 2052 Australia Email: d.harvey@unsw.edu.au Joris van der Hoeven

More information

Scientific Computing: An Introductory Survey

Scientific Computing: An Introductory Survey Scientific Computing: An Introductory Survey Chapter 12 Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign Copyright c 2002. Reproduction permitted for noncommercial,

More information

DIVIDE AND CONQUER II

DIVIDE AND CONQUER II DIVIDE AND CONQUER II master theorem integer multiplication matrix multiplication convolution and FFT Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley http://www.cs.princeton.edu/~wayne/kleinberg-tardos

More information

arxiv: v1 [cs.ds] 28 Jan 2010

arxiv: v1 [cs.ds] 28 Jan 2010 An in-place truncated Fourier transform and applications to polynomial multiplication arxiv:1001.5272v1 [cs.ds] 28 Jan 2010 ABSTRACT David Harvey Courant Institute of Mathematical Sciences New York University

More information

Efficient Modular Arithmetic in Adapted Modular Number System using Lagrange Representation

Efficient Modular Arithmetic in Adapted Modular Number System using Lagrange Representation Efficient Modular Arithmetic in Adapted Modular Number System using Lagrange Representation Christophe Negre 1, Thomas Plantard 2 1 Team DALI, University of Perpignan, France. 2 Centre for Information

More information

CS/COE 1501 cs.pitt.edu/~bill/1501/ Integer Multiplication

CS/COE 1501 cs.pitt.edu/~bill/1501/ Integer Multiplication CS/COE 1501 cs.pitt.edu/~bill/1501/ Integer Multiplication Integer multiplication Say we have 5 baskets with 8 apples in each How do we determine how many apples we have? Count them all? That would take

More information

Space- and Time-Efficient Polynomial Multiplication

Space- and Time-Efficient Polynomial Multiplication Space- and Time-Efficient Polynomial Multiplication Daniel S. Roche Symbolic Computation Group School of Computer Science University of Waterloo ISSAC 2009 Seoul, Korea 30 July 2009 Univariate Polynomial

More information

Divide and Conquer algorithms

Divide and Conquer algorithms Divide and Conquer algorithms Another general method for constructing algorithms is given by the Divide and Conquer strategy. We assume that we have a problem with input that can be split into parts in

More information

Fast Polynomial Multiplication

Fast Polynomial Multiplication Fast Polynomial Multiplication Marc Moreno Maza CS 9652, October 4, 2017 Plan Primitive roots of unity The discrete Fourier transform Convolution of polynomials The fast Fourier transform Fast convolution

More information

How to Multiply. 5.5 Integer Multiplication. Complex Multiplication. Integer Arithmetic. Complex multiplication. (a + bi) (c + di) = x + yi.

How to Multiply. 5.5 Integer Multiplication. Complex Multiplication. Integer Arithmetic. Complex multiplication. (a + bi) (c + di) = x + yi. How to ultiply Slides by Kevin Wayne. Copyright 5 Pearson-Addison Wesley. All rights reserved. integers, matrices, and polynomials Complex ultiplication Complex multiplication. a + bi) c + di) = x + yi.

More information

Multiplying huge integers using Fourier transforms

Multiplying huge integers using Fourier transforms Fourier transforms October 25, 2007 820348901038490238478324 1739423249728934932894??? integers occurs in many fields of Computational Science: Cryptography Number theory... Traditional approaches to

More information

CSE 421 Algorithms. T(n) = at(n/b) + n c. Closest Pair Problem. Divide and Conquer Algorithms. What you really need to know about recurrences

CSE 421 Algorithms. T(n) = at(n/b) + n c. Closest Pair Problem. Divide and Conquer Algorithms. What you really need to know about recurrences CSE 421 Algorithms Richard Anderson Lecture 13 Divide and Conquer What you really need to know about recurrences Work per level changes geometrically with the level Geometrically increasing (x > 1) The

More information

The New Largest Known Prime is 2 p 1 With p = Who Cares? Sam Wagstaff Computer Sciences and Mathematics.

The New Largest Known Prime is 2 p 1 With p = Who Cares? Sam Wagstaff Computer Sciences and Mathematics. The New Largest Known Prime is 2 p 1 With p = 74207281. Who Cares? Sam Wagstaff Computer Sciences and Mathematics November 10, 2016 Earlier in 2016, Cooper, Woltman, Kurowski, Blosser and GIMPS found this

More information

Computer Vision, Convolutions, Complexity and Algebraic Geometry

Computer Vision, Convolutions, Complexity and Algebraic Geometry Computer Vision, Convolutions, Complexity and Algebraic Geometry D. V. Chudnovsky, G.V. Chudnovsky IMAS Polytechnic Institute of NYU 6 MetroTech Center Brooklyn, NY 11201 December 6, 2012 Fast Multiplication:

More information

Integer multiplication in time O(n log n)

Integer multiplication in time O(n log n) Integer multiplication in time O(n log n) David Harvey, Joris Van Der Hoeven To cite this version: David Harvey, Joris Van Der Hoeven. Integer multiplication in time O(n log n). 2019. HAL

More information

Computing rank-width exactly

Computing rank-width exactly Computing rank-width exactly Sang-il Oum Department of Mathematical Sciences KAIST 335 Gwahangno Yuseong-gu Daejeon 305-701 South Korea September 9, 2008 Abstract We prove that the rank-width of an n-vertex

More information

Efficient modular arithmetic in Adapted Modular Number System using Lagrange representation

Efficient modular arithmetic in Adapted Modular Number System using Lagrange representation Efficient modular arithmetic in Adapted Modular Number System using Lagrange representation Christophe Negre 1 and Thomas Plantard 2 1 Team DALI, University of Perpignan, France. 2 Centre for Information

More information

CSE 421. Dynamic Programming Shortest Paths with Negative Weights Yin Tat Lee

CSE 421. Dynamic Programming Shortest Paths with Negative Weights Yin Tat Lee CSE 421 Dynamic Programming Shortest Paths with Negative Weights Yin Tat Lee 1 Shortest Paths with Neg Edge Weights Given a weighted directed graph G = V, E and a source vertex s, where the weight of edge

More information

arxiv: v3 [cs.sc] 19 Sep 2008

arxiv: v3 [cs.sc] 19 Sep 2008 Fast Integer Multiplication Using Modular Arithmetic arxiv:0801.1416v3 [cs.sc] 19 Sep 2008 Anindya De, Piyush P Kurur, Chandan Saha Dept. of Computer Science and Engineering Indian Institute of Technology,

More information

Algorithms and data structures

Algorithms and data structures Algorithms and data structures Amin Coja-Oghlan LFCS Complex numbers Roots of polynomials A polynomial of degree d is a function of the form p(x) = d a i x i with a d 0. i=0 There are at most d numbers

More information

Fast, Parallel Algorithm for Multiplying Polynomials with Integer Coefficients

Fast, Parallel Algorithm for Multiplying Polynomials with Integer Coefficients , July 4-6, 01, London, UK Fast, Parallel Algorithm for Multiplying Polynomials with Integer Coefficients Andrzej Chmielowiec Abstract This paper aims to develop and analyze an effective parallel algorithm

More information

Great Theoretical Ideas in Computer Science

Great Theoretical Ideas in Computer Science 15-251 Great Theoretical Ideas in Computer Science Polynomials, Lagrange, and Error-correction Lecture 23 (November 10, 2009) P(X) = X 3 X 2 + + X 1 + Definition: Recall: Fields A field F is a set together

More information

Speeding up characteristic 2: I. Linear maps II. The Å(Ò) game III. Batching IV. Normal bases. D. J. Bernstein University of Illinois at Chicago

Speeding up characteristic 2: I. Linear maps II. The Å(Ò) game III. Batching IV. Normal bases. D. J. Bernstein University of Illinois at Chicago Speeding up characteristic 2: I. Linear maps II. The Å(Ò) game III. Batching IV. Normal bases D. J. Bernstein University of Illinois at Chicago NSF ITR 0716498 Part I. Linear maps Consider computing 0

More information

FFT: Fast Polynomial Multiplications

FFT: Fast Polynomial Multiplications FFT: Fast Polynomial Multiplications Jie Wang University of Massachusetts Lowell Department of Computer Science J. Wang (UMass Lowell) FFT: Fast Polynomial Multiplications 1 / 20 Overview So far we have

More information

Complexity of computation in Finite Fields

Complexity of computation in Finite Fields Complexity of computation in Finite Fields Sergey B. Gashkov, Igor S. Sergeev Аннотация Review of some works about the complexity of implementation of arithmetic operations in finite fields by boolean

More information

Exact Arithmetic on a Computer

Exact Arithmetic on a Computer Exact Arithmetic on a Computer Symbolic Computation and Computer Algebra William J. Turner Department of Mathematics & Computer Science Wabash College Crawfordsville, IN 47933 Tuesday 21 September 2010

More information

Chapter 5 Divide and Conquer

Chapter 5 Divide and Conquer CMPT 705: Design and Analysis of Algorithms Spring 008 Chapter 5 Divide and Conquer Lecturer: Binay Bhattacharya Scribe: Chris Nell 5.1 Introduction Given a problem P with input size n, P (n), we define

More information

feb abhi shelat Matrix, FFT

feb abhi shelat Matrix, FFT L7 feb 11 2016 abhi shelat Matrix, FFT userid: = Using the standard method, how many multiplications does it take to multiply two NxN matrices? cos( /4) = cos( /2) = sin( /4) = sin( /2) = Mergesort Karatsuba

More information

Subquadratic Space Complexity Multiplication over Binary Fields with Dickson Polynomial Representation

Subquadratic Space Complexity Multiplication over Binary Fields with Dickson Polynomial Representation Subquadratic Space Complexity Multiplication over Binary Fields with Dickson Polynomial Representation M A Hasan and C Negre Abstract We study Dickson bases for binary field representation Such representation

More information

PRIMES is in P. Manindra Agrawal. NUS Singapore / IIT Kanpur

PRIMES is in P. Manindra Agrawal. NUS Singapore / IIT Kanpur PRIMES is in P Manindra Agrawal NUS Singapore / IIT Kanpur The Problem Given number n, test if it is prime efficiently. Efficiently = in time a polynomial in number of digits = (log n) c for some constant

More information

Fast Integer Multiplication Using Modular Arithmetic

Fast Integer Multiplication Using Modular Arithmetic Fast Integer Multiplication Using Modular Arithmetic Anindya De Computer Science Division University of California at Berkeley Berkeley, CA 94720, USA anindya@eecs.berkeley.edu Chandan Saha Dept. of Computer

More information

Parallel Numerical Algorithms

Parallel Numerical Algorithms Parallel Numerical Algorithms Chapter 13 Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign CS 554 / CSE 512 Michael T. Heath Parallel Numerical Algorithms

More information

PRIMALITY TESTING. Professor : Mr. Mohammad Amin Shokrollahi Assistant : Mahdi Cheraghchi. By TAHIRI JOUTI Kamal

PRIMALITY TESTING. Professor : Mr. Mohammad Amin Shokrollahi Assistant : Mahdi Cheraghchi. By TAHIRI JOUTI Kamal PRIMALITY TESTING Professor : Mr. Mohammad Amin Shokrollahi Assistant : Mahdi Cheraghchi By TAHIRI JOUTI Kamal TABLE OF CONTENTS I- FUNDAMENTALS FROM NOMBER THEORY FOR RANDOMIZED ALGORITHMS:.page 4 1)

More information

Parallelism in Computer Arithmetic: A Historical Perspective

Parallelism in Computer Arithmetic: A Historical Perspective Parallelism in Computer Arithmetic: A Historical Perspective 21s 2s 199s 198s 197s 196s 195s Behrooz Parhami Aug. 218 Parallelism in Computer Arithmetic Slide 1 University of California, Santa Barbara

More information

Large Integer Multiplication on Hypercubes. Barry S. Fagin Thayer School of Engineering Dartmouth College Hanover, NH

Large Integer Multiplication on Hypercubes. Barry S. Fagin Thayer School of Engineering Dartmouth College Hanover, NH Large Integer Multiplication on Hypercubes Barry S. Fagin Thayer School of Engineering Dartmouth College Hanover, NH 03755 barry.fagin@dartmouth.edu Large Integer Multiplication 1 B. Fagin ABSTRACT Previous

More information

Continuing discussion of CRC s, especially looking at two-bit errors

Continuing discussion of CRC s, especially looking at two-bit errors Continuing discussion of CRC s, especially looking at two-bit errors The definition of primitive binary polynomials Brute force checking for primitivity A theorem giving a better test for primitivity Fast

More information

ECEN 5022 Cryptography

ECEN 5022 Cryptography Elementary Algebra and Number Theory University of Colorado Spring 2008 Divisibility, Primes Definition. N denotes the set {1, 2, 3,...} of natural numbers and Z denotes the set of integers {..., 2, 1,

More information

Arithmétique et Cryptographie Asymétrique

Arithmétique et Cryptographie Asymétrique Arithmétique et Cryptographie Asymétrique Laurent Imbert CNRS, LIRMM, Université Montpellier 2 Journée d inauguration groupe Sécurité 23 mars 2010 This talk is about public-key cryptography Why did mathematicians

More information

Introduction to Algorithms

Introduction to Algorithms Lecture 1 Introduction to Algorithms 1.1 Overview The purpose of this lecture is to give a brief overview of the topic of Algorithms and the kind of thinking it involves: why we focus on the subjects that

More information

Chapter 7 Randomization Algorithm Theory WS 2017/18 Fabian Kuhn

Chapter 7 Randomization Algorithm Theory WS 2017/18 Fabian Kuhn Chapter 7 Randomization Algorithm Theory WS 2017/18 Fabian Kuhn Randomization Randomized Algorithm: An algorithm that uses (or can use) random coin flips in order to make decisions We will see: randomization

More information

Between Sparse and Dense Arithmetic

Between Sparse and Dense Arithmetic Between Sparse and Dense Arithmetic Daniel S. Roche Computer Science Department United States Naval Academy NARC Seminar November 28, 2012 The Problem People want to compute with really big numbers and

More information

Fast reversion of formal power series

Fast reversion of formal power series Fast reversion of formal power series Fredrik Johansson LFANT, INRIA Bordeaux RAIM, 2016-06-29, Banyuls-sur-mer 1 / 30 Reversion of power series F = exp(x) 1 = x + x 2 2! + x 3 3! + x 4 G = log(1 + x)

More information

Applied Cryptography and Computer Security CSE 664 Spring 2018

Applied Cryptography and Computer Security CSE 664 Spring 2018 Applied Cryptography and Computer Security Lecture 12: Introduction to Number Theory II Department of Computer Science and Engineering University at Buffalo 1 Lecture Outline This time we ll finish the

More information

How to find good starting tensors for matrix multiplication

How to find good starting tensors for matrix multiplication How to find good starting tensors for matrix multiplication Markus Bläser Saarland University Matrix multiplication z,... z,n..... z n,... z n,n = x,... x,n..... x n,... x n,n y,... y,n..... y n,... y

More information

Optimal Eta Pairing on Supersingular Genus-2 Binary Hyperelliptic Curves

Optimal Eta Pairing on Supersingular Genus-2 Binary Hyperelliptic Curves CT-RSA 2012 February 29th, 2012 Optimal Eta Pairing on Supersingular Genus-2 Binary Hyperelliptic Curves Joint work with: Nicolas Estibals CARAMEL project-team, LORIA, Université de Lorraine / CNRS / INRIA,

More information

Lagrange s polynomial

Lagrange s polynomial Lagrange s polynomial Nguyen Trung Tuan November 16, 2016 Abstract In this article, I will use Lagrange polynomial to solve some problems from Mathematical Olympiads. Contents 1 Lagrange s interpolation

More information

Divide and Conquer: Polynomial Multiplication Version of October 1 / 7, 24201

Divide and Conquer: Polynomial Multiplication Version of October 1 / 7, 24201 Divide and Conquer: Polynomial Multiplication Version of October 7, 2014 Divide and Conquer: Polynomial Multiplication Version of October 1 / 7, 24201 Outline Outline: Introduction The polynomial multiplication

More information

Mid-term Exam Answers and Final Exam Study Guide CIS 675 Summer 2010

Mid-term Exam Answers and Final Exam Study Guide CIS 675 Summer 2010 Mid-term Exam Answers and Final Exam Study Guide CIS 675 Summer 2010 Midterm Problem 1: Recall that for two functions g : N N + and h : N N +, h = Θ(g) iff for some positive integer N and positive real

More information

Number theoretic algorithms for cryptographic applications

Number theoretic algorithms for cryptographic applications Number theoretic algorithms for cryptographic applications Sandeep Sen 1 March 16, 2009 1 Department of Computer Science and Engineering, IIT Delhi, New Delhi 110016, India. E-mail:ssen@cse.iitd.ernet.in

More information

Design and Analysis of Algorithms

Design and Analysis of Algorithms CSE 101, Winter 2018 Design and Analysis of Algorithms Lecture 4: Divide and Conquer (I) Class URL: http://vlsicad.ucsd.edu/courses/cse101-w18/ Divide and Conquer ( DQ ) First paradigm or framework DQ(S)

More information

Algebraic Structures Exam File Fall 2013 Exam #1

Algebraic Structures Exam File Fall 2013 Exam #1 Algebraic Structures Exam File Fall 2013 Exam #1 1.) Find all four solutions to the equation x 4 + 16 = 0. Give your answers as complex numbers in standard form, a + bi. 2.) Do the following. a.) Write

More information

Chinese Remainder Theorem

Chinese Remainder Theorem Chinese Remainder Theorem Theorem Let R be a Euclidean domain with m 1, m 2,..., m k R. If gcd(m i, m j ) = 1 for 1 i < j k then m = m 1 m 2 m k = lcm(m 1, m 2,..., m k ) and R/m = R/m 1 R/m 2 R/m k ;

More information

Lecture 8: Number theory

Lecture 8: Number theory KTH - Royal Institute of Technology NADA, course: 2D1458 Problem solving and programming under pressure Autumn 2005 for Fredrik Niemelä Authors: Johnne Adermark and Jenny Melander, 9th Nov 2005 Lecture

More information

Input Decidable Language -- Program Halts on all Input Encoding of Input -- Natural Numbers Encoded in Binary or Decimal, Not Unary

Input Decidable Language -- Program Halts on all Input Encoding of Input -- Natural Numbers Encoded in Binary or Decimal, Not Unary Complexity Analysis Complexity Theory Input Decidable Language -- Program Halts on all Input Encoding of Input -- Natural Numbers Encoded in Binary or Decimal, Not Unary Output TRUE or FALSE Time and Space

More information

Fundamentals of the DFT (fft) Algorithms

Fundamentals of the DFT (fft) Algorithms Fundamentals of the DFT (fft) Algorithms D. Sundararajan November 6, 9 Contents 1 The PM DIF DFT Algorithm 1.1 Half-wave symmetry of periodic waveforms.............. 1. The DFT definition and the half-wave

More information

Fall 2011, EE123 Digital Signal Processing

Fall 2011, EE123 Digital Signal Processing Lecture 6 Miki Lustig, UCB September 11, 2012 Miki Lustig, UCB DFT and Sampling the DTFT X (e jω ) = e j4ω sin2 (5ω/2) sin 2 (ω/2) 5 x[n] 25 X(e jω ) 4 20 3 15 2 1 0 10 5 1 0 5 10 15 n 0 0 2 4 6 ω 5 reconstructed

More information

Lecture 6: Introducing Complexity

Lecture 6: Introducing Complexity COMP26120: Algorithms and Imperative Programming Lecture 6: Introducing Complexity Ian Pratt-Hartmann Room KB2.38: email: ipratt@cs.man.ac.uk 2015 16 You need this book: Make sure you use the up-to-date

More information

Discrete Mathematics U. Waterloo ECE 103, Spring 2010 Ashwin Nayak May 17, 2010 Recursion

Discrete Mathematics U. Waterloo ECE 103, Spring 2010 Ashwin Nayak May 17, 2010 Recursion Discrete Mathematics U. Waterloo ECE 103, Spring 2010 Ashwin Nayak May 17, 2010 Recursion During the past week, we learnt about inductive reasoning, in which we broke down a problem of size n, into one

More information

COMP424 Computer Security

COMP424 Computer Security COMP424 Computer Security Prof. Wiegley jeffw@csun.edu Rivest, Shamir & Adelman (RSA) Implementation 1 Relatively prime Prime: n, is prime if its only two factors are 1 and n. (and n 1). Relatively prime:

More information

Reductions, Recursion and Divide and Conquer

Reductions, Recursion and Divide and Conquer Chapter 5 Reductions, Recursion and Divide and Conquer CS 473: Fundamental Algorithms, Fall 2011 September 13, 2011 5.1 Reductions and Recursion 5.1.0.1 Reduction Reducing problem A to problem B: (A) Algorithm

More information

Basic elements of number theory

Basic elements of number theory Cryptography Basic elements of number theory Marius Zimand By default all the variables, such as a, b, k, etc., denote integer numbers. Divisibility a 0 divides b if b = a k for some integer k. Notation

More information

Basic elements of number theory

Basic elements of number theory Cryptography Basic elements of number theory Marius Zimand 1 Divisibility, prime numbers By default all the variables, such as a, b, k, etc., denote integer numbers. Divisibility a 0 divides b if b = a

More information