Finite Field Arithmetic and Its Application in Cryptography

Total Page:16

File Type:pdf, Size:1020Kb

Finite Field Arithmetic and Its Application in Cryptography UCLA UCLA Electronic Theses and Dissertations Title Finite Field Arithmetic and its Application in Cryptography Permalink https://escholarship.org/uc/item/7gj7w5mz Author Ansari, Bijan Publication Date 2012 Peer reviewed|Thesis/dissertation eScholarship.org Powered by the California Digital Library University of California University of California Los Angeles Finite Field Arithmetic and its Application in Cryptography A dissertation submitted in partial satisfaction of the requirements for the degree Doctor of Philosophy in Electrical Engineering by Bijan Ansari 2012 c Copyright by Bijan Ansari 2012 Abstract of the Dissertation Finite Field Arithmetic and its Application in Cryptography by Bijan Ansari Doctor of Philosophy in Electrical Engineering University of California, Los Angeles, 2012 Professor Frank Chang, Co-chair Professor Ingrid Verbauwhede, Co-chair The groundbreaking idea of public key cryptography and the rapid expansion of the internet in the 80s opened a new research area for finite field arithmetic. The large size of fields in cryptography demands new algorithms for efficient arithmetic and new metrics for estimat- ing finite field operation performance. The area, power, and timing constraints on hand-held and embedded devices necessitate accurate models to achieve expected goals. Additionally, cryptosystems need to protect their secrets and hide their internal operation states against side-channel attacks. Fault-injection attacks or random errors reduce the security of a cryp- tosystem and can help a cryptanalyst to extract a system’s secrets. This dissertation covers various aspects of finite field arithmetic to provide predictable, efficient, and secure elements for cryptography. We provide architecture for an elliptic curve processor (ECP), which is essentially a finite field processor. We also provide finite field multipliers over polynomial and optimal normal bases for pipeline and parallel architectures. To further analyze the behavior of finite field multipliers, we formalize timing, area, and energy consumption over binary extension fields. To ensure robustness of the multiplication operation, we provide concurrent error detection (CED) schemes for polynomial and normal base multipliers and provide the probability of error detection. ii The dissertation of Bijan Ansari is approved. Babak Daneshrad Dejan Markovc Milos Ercegovac Ingrid Verbauwhede, Committee Co-chair Frank Chang, Committee Co-chair University of California, Los Angeles 2012 iii To my homeland heroes who defended their country during the 1980-1988 war, ... and to the victims of the Iranian Green movement. iv Table of Contents 1 Introduction ...................................... 1 2 High Performance Architecture of Elliptic Curve Scalar Multiplication . 6 2.1 Introduction.................................... 6 2.2 Review of the Montgomery Scalar Multiplication . 10 2.3 Architecture for Scalar Multiplication . 13 2.4 Implementation .................................. 20 2.5 Conclusion..................................... 35 3 Concurrent Error Detection for Finite Field Multiplication ........ 37 3.1 Introduction.................................... 37 3.2 Parity Definition and its properties . 41 3.3 Error Detection in Sequential multipliers . 45 3.4 Error Detection in Parallel Polynomial Basis Multiplication . 52 3.5 Error Detection in Digit Serial Multipliers over Extension Fields . ... 63 3.6 ErrorModelandCoverage . .. .. 65 3.7 Conclusion..................................... 69 4 Concurrent Error Detection for Type II Optimal Normal Basis Multipliers 71 4.1 Introduction.................................... 71 4.2 Normal Basis Multiplication using Polynomials . 72 4.3 ConcurrentErrorDetection . 77 4.4 Conclusion..................................... 89 v 5 FO4-based Models for Area, Delay and Energy of Polynomial Multiplica- tion over Binary Fields ................................. 90 5.1 Introduction.................................... 90 5.2 Analysis of Polynomial Multiplication . 92 5.3 The Karatsuba-Ofman Multiplication Algorithm . 104 5.4 FutureWork.................................... 107 5.5 Conclusion..................................... 108 6 Efficiency Metrics for Elliptic Curve Crypto-Processors .......... 111 6.1 Introduction.................................... 111 6.2 EnergyConsumptioninECPs . .. .. 113 6.3 NormalizedEnergy ................................ 114 6.4 ComparisonofECPs ............................... 119 6.5 Conclusion..................................... 122 7 Conclusion and Future Work ........................... 123 References ......................................... 125 vi List of Figures 2.1 Parallel execution of multiplication and addition/squaring in one iteration . 16 2.2 Parallel with no idle cycle in the middle of the iteration . 17 2.3 Parallel with no idle cycle in entire scalar multiplication loop . 18 2.4 ImplementedArchitecture . 22 2.5 Pseudo-pipelined finite field multiplier . 25 2.6 Timing of scalar multiplication with no idle cycle in entire loop . 28 2.7 FPGA synthesis for various finite fields GF (2m)................ 30 2.8 FPGA synthesis for various w/m for GF (2163)................. 30 2.9 Swappingmechanism............................... 34 3.1 Error detection model for sequential multiplication over GF (qm)....... 47 3.2 HED for finite field multiplication. The dash-dot line indicates the critical pathfortheerrorsignal. ............................. 54 3.3 Implementationresults .............................. 58 3.4 CED for digit serial finite field multiplication . 65 4.1 A polynomial multiplier with bi-residue parity protection and j +k parity bits (PPM). ...................................... 78 4.2 Parallel ONB-II multiplier with CED . 81 4.3 Parallel ONB-II with CED, using a single polynomial multiplier. 85 5.1 Functional diagram of the polynomial multiplication over F2[x], where critical pathishighlighted. ................................ 93 5.2 Gates in the critical path of 16 4, 128 32 and 256 64 bit multipliers, × × × produced by the Synopsys Design Compiler synthesis tool. ... 96 vii 5.3 Buffers driving NAND gates in a polynomial multiplier. The last buffers can drive3NANDgates. ............................... 98 5.4 Gate delay of 26 synthesized multipliers compared with delay equations (5.8), (5.2)and(5.3)................................... 99 5.5 Areaevaluation .................................. 101 5.6 XOR tree and the switching probability at each node . 102 5.7 Energy consumption for one polynomial multiplication: Comparing Synopsys powerreportwiththeestimated energyin(5.12). 104 Energy F 5.8 Predicted Area for Polynomial Multiplication over 2[x] ........... 105 5.9 Gate delay for multiplication using KOA . 107 5.10 Conventional polynomial multiplication delay versus KOA delay for m ∈ 8, 16, 32, 64, 128 ................................. 108 { } 5.11 Equalizing delay path in in parallel polynomial multiplier . 109 viii List of Tables 2.1 Typical Number of Clock Cycles of Basic Finite Field Operations . .. 9 2.2 Performance with Various Enhancement Methods Assuming That m/w = 4, ⌈ ⌉ A = S =3ClockCycles ............................. 21 2.3 k versusCriticalPaths .............................. 24 2.4 State Diagram of the Pseudo-pipelined Finite Field Multiplier . 26 2.5 Synthesis, Place and Route Results for Virtex4:XC4VLX200 Using Two Dif- ferentSynthesizers ................................ 29 2.6 FPGA Synthesis for Various Finite Fields GF (2m)............... 29 2.7 m versus Slices over GF (2163)forVirtex2:XC2V2000 . 30 ⌈ w ⌉ 2.8 Performance of the Scalar Multipliers . 33 3.1 Delay and area for the HED over GF (2m) ................... 55 3.2 FPGA implementation results for HED v.s. LUM over GF (2163) ...... 62 3.3 Delay and area overhead comparison over GF (2163) .............. 64 4.1 Delay and gate count for modules in Fig. 4.1 and 4.2 . 80 4.2 Various ONB II multipliers with concurrent error detection . ..... 88 4.3 FPGA implementation over GF (2173) using KOA for g(x)= xk +1 ..... 89 5.1 Estimates of Normalized Input and Intrinsics Capacitance of LogicGates . 96 6.1 Technology Scaling (S =0.7) .......................... 115 6.2 Power/EnergyconsumptionofECPs . 118 ix Acknowledgments I would like to thank my committee members and my supervisor. I would also like to thank Deeona Columbia, Office of Student Affairs Manager, for her support. x Vita 2004 M.S. (Electrical Engineering), University of Windsor, Canada. 2004–2006 Research Assistance, Centre for Applied Cryptographic Research, Univer- sity of Waterloo, Canada. 2008–present Qualcomm Inc. San Diego, CA Publications Bijan Ansari and Ingrid Verbauwhede. , “FO4-based Models for Area, Delay and Energy of Polynomial Multiplication over Binary Fields.” , In IEEE Workshop on Signal Processing Systems: Design and Implementation, pp. 420–425, 2010. Bijan Ansari and Ingrid Verbauwhede. , “A Hybrid Scheme for Concurrent Error Detection of Multiplication over Finite Fields.” , In Proceedings of the 2010 IEEE 25th Inter- national Symposium on Defect and Fault Tolerance in VLSI Systems, DFT ’10, pp. 399–407, Washington, DC, USA, 2010. IEEE Computer Society. Bijan Ansari and Ingrid Verbauwhede. , “A new Parallel Scheme for Type II ONB Multi- plication with Concurrent Error Detection” ,under submission Bijan Ansari and Ingrid Verbauwhede. , “Comments On “On Concurrent Detection of Errors in Polynomial Basis Multiplication”” ,under submission Bijan Ansari and Ingrid Verbauwhede. , “Concurrent Error Detection for Polynomial Basis Multipliers over GF (qm)” ,under submission
Recommended publications
  • Frequency Domain Finite Field Arithmetic for Elliptic Curve Cryptography
    Frequency Domain Finite Field Arithmetic for Elliptic Curve Cryptography by Sel»cukBakt³r A Dissertation Submitted to the Faculty of the Worcester Polytechnic Institute in partial ful¯llment of the requirements for the Degree of Doctor of Philosophy in Electrical and Computer Engineering by April, 2008 Approved: Dr. Berk Sunar Dr. Stanley Selkow Dissertation Advisor Dissertation Committee ECE Department Computer Science Department Dr. Kaveh Pahlavan Dr. Fred J. Looft Dissertation Committee Department Head ECE Department ECE Department °c Copyright by Sel»cukBakt³r All rights reserved. April, 2008 i To my family; to my parents Ay»seand Mehmet Bakt³r, to my sisters Elif and Zeynep, and to my brothers Selim and O¸guz ii Abstract E±cient implementation of the number theoretic transform (NTT), also known as the discrete Fourier transform (DFT) over a ¯nite ¯eld, has been studied actively for decades and found many applications in digital signal processing. In 1971 SchÄonhageand Strassen proposed an NTT based asymptotically fast multiplication method with the asymptotic complexity O(m log m log log m) for multiplication of m-bit integers or (m ¡ 1)st degree polynomials. SchÄonhageand Strassen's algorithm was known to be the asymptotically fastest multipli- cation algorithm until FÄurerimproved upon it in 2007. However, unfortunately, both al- gorithms bear signi¯cant overhead due to the conversions between the time and frequency domains which makes them impractical for small operands, e.g. less than 1000 bits in length as used in many applications. With this work we investigate for the ¯rst time the practical application of the NTT, which found applications in digital signal processing, to ¯nite ¯eld multiplication with an emphasis on elliptic curve cryptography (ECC).
    [Show full text]
  • Acceleration of Finite Field Arithmetic with an Application to Reverse Engineering Genetic Networks
    ACCELERATION OF FINITE FIELD ARITHMETIC WITH AN APPLICATION TO REVERSE ENGINEERING GENETIC NETWORKS by Edgar Ferrer Moreno A thesis submitted in partial fulfillment of the requirements for the degree of DOCTOR OF PHILOSOPHY in COMPUTING AND INFORMATION SCIENCES AND ENGINEERING UNIVERSITY OF PUERTO RICO MAYAGÜEZ CAMPUS 2008 Approved by: ________________________________ __________________ Omar Colón, PhD Date Member, Graduate Committee ________________________________ __________________ Oscar Moreno, PhD Date Member, Graduate Committee ________________________________ __________________ Nayda Santiago, PhD Date Member, Graduate Committee ________________________________ __________________ Dorothy Bollman, PhD Date President, Graduate Committee ________________________________ __________________ Edusmildo Orozco, PhD Date Representative of Graduate Studies ________________________________ __________________ Néstor Rodríguez, PhD Date Chairperson of the Department Abstract Finite field arithmetic plays an important role in a wide range of applications. This research is originally motivated by an application of computational biology where genetic networks are modeled by means of finite fields. Nonetheless, this work has application in various research fields including digital signal processing, error correct- ing codes, Reed-Solomon encoders/decoders, elliptic curve cryptosystems, or compu- tational and algorithmic aspects of commutative algebra. We present a set of efficient algorithms for finite field arithmetic over GF (2m), which are implemented
    [Show full text]
  • Study of Extended Euclidean and Itoh-Tsujii Algorithms in GF(2 M)
    Study of Extended Euclidean and Itoh-Tsujii Algorithms in GF (2m) using polynomial bases by Fan Zhou B.Eng., Zhejiang University, 2013 A Report Submitted in Partial Fulfillment of the Requirements for the Degree of MASTER OF ENGINEERING in the Department of Electrical and Computer Engineering c Fan Zhou, 2018 University of Victoria All rights reserved. This report may not be reproduced in whole or in part, by photocopying or other means, without the permission of the author. ii Study of Extended Euclidean and Itoh-Tsujii Algorithms in GF (2m) using polynomial bases by Fan Zhou B.Eng., Zhejiang University, 2013 Supervisory Committee Dr. Fayez Gebali, Supervisor (Department of Electrical and Computer Engineering) Dr. Watheq El-Kharashi, Departmental Member (Department of Electrical and Computer Engineering) iii ABSTRACT Finite field arithmetic is important for the field of information security. The inversion operation consumes most of the time and resources among all finite field arithmetic operations. In this report, two main classes of algorithms for inversion are studied. The first class of inverters is Extended Euclidean based inverters. Extended Euclidean Algorithm is an extension of Euclidean algorithm that computes the greatest common divisor. The other class of inverters is based on Fermat's little theorem. This class of inverters is also called multiplicative based inverters, because, in these algorithms, the inversion is performed by a sequence of multiplication and squaring. This report represents a literature review of inversion algorithm and implements a multiplicative based inverter and an Extended Euclidean based inverter in MATLAB. The experi- mental results show that inverters based on Extended Euclidean Algorithm are more efficient than inverters based on Fermat's little theorem.
    [Show full text]
  • 3 Finite Field Arithmetic
    18.783 Elliptic Curves Spring 2021 Lecture #3 02/24/2021 3 Finite field arithmetic In order to perform explicit computations with elliptic curves over finite fields, we first need to understand how to compute in finite fields. In many of the applications we will consider, the finite fields involved will be quite large, so it is important to understand the computational complexity of finite field operations. This is a huge topic, one to which an entire course could be devoted, but we will spend just one or two lectures on this topic, with the goal of understanding the most commonly used algorithms and analyzing their asymptotic complexity. This will force us to omit many details, but references to the relevant literature will be provided for those who want to learn more. Our first step is to fix an explicit representation of finite field elements. This might seem like a technical detail, but it is actually quite crucial; questions of computational complexity are meaningless otherwise. Example 3.1. By Theorem 3.12 below, the multiplicative group of a finite field Fq is cyclic. One way to represent the nonzero elements of a finite field is as explicit powers of a fixed generator, in which case it is enough to know the exponent, an integer in [0; q − 1]. With this representation multiplication and division are easy, solving the discrete logarithm problem is trivial, but addition is costly (not even polynomial time). We will instead choose a representation that makes addition (and subtraction) very easy, multiplication slightly harder but still easy, division slightly harder than multiplication but still easy (all these operations take quasi-linear time).
    [Show full text]
  • Finite Field Arithmetic (Galois Field)
    ASS.PROF.DR Thamer Information Theory 4th Class in Communication Finite Field Arithmetic (Galois field) Introduction: A finite field is also often known as a Galois field, after the French mathematician Pierre Galois. A Galois field in which the elements can take q different values is referred to as GF(q). The formal properties of a finite field are: (a) There are two defined operations, namely addition and multiplication. (b) The result of adding or multiplying two elements from the field is always an element in the field. (c) One element of the field is the element zero, such that a + 0 = a for any element a in the field. (d) One element of the field is unity, such that a • 1 = a for any element a in the field. (e) For every element a in the field, there is an additive inverse element -a, such that a + ( - a) = 0. This allows the operation of subtraction to be defined as addition of the inverse. (f) For every non-zero element b in the field there is a multiplicative inverse element b-1 such that b b-1= 1. This allows the operation of division to be defined as multiplication by the inverse. (g) The associative [a + (b + c) = (a + b) + c, a • (b • c) = [(a • b) • c], commutative [a + b = b + a, a • b = b • a], and distributive [a • (b + c) = a • b + a • c] laws apply. 1 ASS.PROF.DR Thamer Information Theory 4th Class in Communication These properties cannot be satisfied for all possible field sizes. They can, however, be satisfied if the field size is any prime number or any integer power of a prime.
    [Show full text]
  • 3 Arithmetic in Finite Fields
    18.783 Elliptic Curves Spring 2015 Lecture #3 02/10/2015 3 Arithmetic in finite fields In order to perform explicit computations with elliptic curves over finite fields, we first need to understand how to do arithmetic in finite fields. In many of the applications we will consider, the finite fields involved will be quite large, so it is important to understand the computational complexity of finite field operations. This is a huge topic, one to which an entire course could be devoted, but we will spend just one week on finite field arithmetic (this lecture and the next), with the goal of understanding the most commonly used algorithms and analyzing their asymptotic complexity. This will force us to omit many details. The first step is to fix an explicit representation of finite field elements. This might seem like a technical detail, but it is actually crucial; questions of computational complexity are meaningless otherwise. Example 3.1. As we will prove shortly, the multiplicative group of a finite field is cyclic. So one way to represent nonzero elements of a finite field is as powers of a fixed generator. With this representation multiplication and division are easy, and solving the discrete logarithm problem is essentially trivial. But addition is hard. We will instead choose a representation that makes addition and subtraction very easy, multiplication slightly harder but still easy, and division slightly harder still, but still easy (all quasi-linear time). But solving the discrete logarithm problem will be very difficult (no polynomial-time algorithm known). For they sake of brevity, we will focus primarily on finite fields of large characteristic, and prime fields in particular, although the algorithms we describe will work in any finite field of odd characteristic.
    [Show full text]
  • Computation in Finite Fields
    Computation in finite fields John Kerl Arizona State University and Lockheed Martin Corporation April, 2004 Abstract Elementary techniques for computation in finite fields are presented, at a level appropriate for an engi- neering, computer science or mathematical audience. Second, elementary Galois theory for finite fields is presented at a level appropriate for undergraduate or beginning graduate students in mathematics. For the latter, illustrative properties of a novel logarithmic root chart are developed. Third, linear feedback shift registers are presented in a manner which connects mathematical theory and engineering practice. Fourth, some techniques for software implementation are outlined: using a computer algebra system for the general case, and in C for the p = 2 case. This paper is an elaboration on lecture notes for a talk given to the Arizona State University Math Department's Graduate Student Seminar Series in fall of 2003. Some software-related updates were made January 2013. Contents Contents i 1 Introduction 1 1.1 Purpose . 1 1.2 Context . 1 1.3 Scope . 1 1.4 Audience . 2 1.5 Rings and fields; notation . 3 I Arithmetic 4 2 The field Fp 5 2.1 Elements of Fp ............................................ 5 2.2 Arithmetic in Fp ........................................... 6 2.3 First reciprocation method in Fp .................................. 6 2.4 Second reciprocation method in Fp ................................. 6 2.5 Third reciprocation method in Fp .................................. 7 2.6 Repeated-squaring algorithm for exponentiation . 7 2.7 Fourth reciprocation method in Fp; logarithms . 8 3 The field Fpn 10 3.1 Field characteristic and prime subfield . 10 3.2 Existence of Fpn ........................................... 10 3.3 Computation in Fp[x] .......................................
    [Show full text]
  • Fast Multiplication in Finite Fields GF(2N )
    Fast Multiplication in Finite Fields GF(2N ) Joseph H. Silverman Mathematics Department, Brown University, Providence, RI 02912 USA NTRU Cryptosystems, Inc., 3 Leicester Way, Pawtucket, RI 02860 USA [email protected], [email protected], http://www.ntru.com Abstract. A method is described for performing computations in a fi- N nite field GF(2 ) by embedding it in a larger ring Rp where the multipli- cation operation is a convolution product and the squaring operation is a rearrangement of bits. Multiplication in Rp has complexity N + 1, which is approximately twice as efficient as optimal normal basis multiplica- tion (ONB) or Montgomery multiplication in GF(2N ), while squaring has approximately the same efficiency as ONB. Inversion and solution of quadratic equations can also be performed at least as fast as previous methods. Introduction The use of finite fields in public key cryptography has blossomed in recent years. Many methods of key exchange, encryption, signing and authentication use field operations in either prime fields GF(p) or in fields GF(2N ) whose order is a power of 2. The latter fields are especially pleasant for computer implementation because their internal structure mirrors the binary structure of a computer. For this reason there has been considerable research devoted to making the basic field operations in GF(2N ) (especially squaring, multiplication, and inver- sion) efficient. Innovations include: • use of optimal normal bases [15]; • use of standard bases with coefficients in a subfield GF(2r) [26]; • construction of special elements α ∈ GF(2N ) such that powers αe can be computed very rapidly [5,6,8]; • an analogue of Montgomery multiplication [14] for the fields GF(2N ) [13].
    [Show full text]
  • Implementation of Finite Field Arithmetic Operations for Large Prime and Binary Fields Using Java Biginteger C Lass
    Published by : International Journal of Engineering Research & Technology (IJERT) http://www.ijert.org ISSN: 2278-0181 Vol. 6 Issue 08, August - 2017 Implementation of Finite Field Arithmetic Operations for Large Prime and Binary Fields using java BigInteger C lass Ni Ni Hla Tun Myat Aung University of Computer Studies, Yangon University of Computer Studies, Yangon Myanmar Myanmar Abstract—Many cryptographic protocols are based on the II. INTRODUCTION TO FINITE FIELDS difficulty of factoring large composite integers or a related problem. Therefore, we implement the finite field arithmetic A finite field is a field containing a finite number of operations for large prime and binary fields by using java elements. Fields are abstractions of familiar number systems BigInteger class to study our research under large integers for (such as the rational numbers Q, the real numbers R, and the public key cryptosystems and elliptic curve. complex numbers C) and their essential properties. They consist of a set F together with two operations, addition Keywords — Finite Field Arithmetic; Prime Field; Binary Field, (denoted by +) and multiplication (denoted by ·), that satisfy Large Integer the usual arithmetic properties: I. INTRODUCTION (F,+) is an abelian group with (additive) identity denoted The origins and history of finite fields can be traced back by 0. to the 17th and 18th centuries, but there, these fields played (F\{0}, ·) is an abelian group with (multiplicative) identity only a minor role in the mathematics of the day. In more denoted by 1. recent times, however, finite fields have assumed a much more The distributive law holds: (a+b) · c = (a · c) + (b · c) for fundamental role and in fact are of rapidly increasing all a, b, c ∈ F.
    [Show full text]
  • On the Circuit Complexity of Composite Galois Field Transformations∗
    Electronic Colloquium on Computational Complexity, Report No. 93 (2012) On the Circuit Complexity of Composite Galois Field Transformations∗ Charanjit S. Jutla Vijay Kumar† Atri Rudra‡ IBM T.J. Watson Research Center Groupon Inc. University of Buffalo, SUNY Abstract We study the circuit complexity of linear transformations between Galois fields GF(2mn) and their isomorphic composite fields GF((2m)n). For such a transformation, we show a lower bound of Ω(mn) on the number of gates required in any circuit consisting of constant-fan-in XOR gates, except for a class of transformations between representations of such fields which are nicely characterized. The exceptions show that the polynomials representing the fields must be of a regular form, which may be of independent interest. We characterize a family of transformations which can be implemented as cross-wires (permutations), without using any gates, which is very useful in designing hardware implementations – and through bit-slicing, software implementations – of computations based on Galois Field arithmetic. We also show that our lower bound is tight, by demonstrating a class of transformations which only require a linear number of gates. 1 Introduction Galois Field Arithmetic finds wide use in engineering applications such as error-correcting codes [4, 14], cryptography [26], switching theory [2] and digital signal processing [3, 15]. However the bulk of the applications have been in cryptography and coding theory. Galois fields have been used extensively in public key cryptography, including elliptic curve cryptography [12][17], as well as in symmetric key cryptography The best example of the latter is perhaps the AES algorithm Rijndael [28].
    [Show full text]
  • Applications of Finite Fields
    CDM Applications of Finite Fields Klaus Sutner Carnegie Mellon University 42-ffield-apps 2017/12/15 23:16 Warning 2 This lecture contains a number of \dirty tricks," rather than the supremely elegant and deeply rooted mathematical ideas that you have become accustomed to in this class. Think of it as the engineering approach: it's an opportunistic hack, but, boy, does it ever work well. 1 Implementing Finite Fields Discrete Logarithms Advanced Encryption Standard What To Implement 4 In order to implement a finite field we need a data structure to represent field elements and operations on this data structure to perform addition multiplication reciprocals, division exponentiation Subtraction is essentially the same as addition and requires no special attention. But, anything to do with multiplication is by no means trivial. In fact, there is an annual international conference that is dedicated to the implementation of finite fields. WAIFI Conference 5 Theory of finite field arithmetic: • Bases (canonical, normal, dual, weakly dual, triangular ...) • Polynomial factorization, irreducible polynomials • Primitive elements • Prime fields, binary fields, extension fields, composite fields, tower fields ... • Elliptic and Hyperelliptic curves Hardware/Software implementation of finite field arithmetic: • Optimal arithmetic modules • Design and implementation of finite field arithmetic processors • Design and implementation of arithmetic algorithms • Pseudorandom number generators • Hardware/Software Co-design • IP (Intellectual Property) components • Field programmable and reconfigurable systems Applications: • Cryptography • Communication systems • Error correcting codes • Quantum computing Classes of Implementations 6 Our characterization of finite fields as quotients of polynomial rings provides a general method of implementation, and even a reasonably efficient one. Still, it is a good idea to organize things into several categories, with different algorithmic answers.
    [Show full text]
  • Computing Multiplicative Inverses in Finite Fields by Long Division
    sciendo Journal of ELECTRICAL ENGINEERING, VOL 69 (2018), NO5, 400–402 COMMUNICATIONS Computing multiplicative inverses in finite fields by long division ∗ Otokar Groˇsek, Tom´aˇsFabˇsiˇc We study a method of computing multiplicative inverses in finite fields using long division. In the case of fields of a prime order p, we construct one fixed integer d(p) with the property that for any nonzero field element a, we can compute its inverse by dividing d(p) by a and by reducing the result modulo p. We show how to construct the smallest d(p) with this property. We demonstrate that a similar approach works in finite fields of a non-prime order, as well. However, we demonstrate that the studied method (in both cases) has worse asymptotic complexity than the extended Euclidean algorithm. K e y w o r d s: finite fields, multiplicative inverses 1 Introduction Thus to find an inverse mod p requires one long division and one reduction mod p. Computing a multiplicative inverse in a finite field is a This approach, although very laborious, has an in- common operation used in cryptography. For instance, it teresting history [4–6]. J. Waring in Meditationes alge- is a key operation in the cryptographic standard AES [1]. braicae, Cambridge, 1770, p. 218, first published the the- After M. Repka studied the McEliece cryptosystem orem that p|1 + (p − 1)! ascribing it to Sir John Wilson in [2], he set the question (in personal communication, (1714–93). J. L. Lagrange was the first to publish a proof 2017) if would be possible to find multiplicative inverses also with the converse in Nouv.
    [Show full text]