Download "user manual"
Transcript
CONTENTS 3 Contents 1 Introduction 2 Files in the Library 2.1 Header files in the directory “include” . . . . . 2.2 Source files in the “src” directory . . . . . . . 2.3 Library tools files in the “tools” directory . . . 2.4 The unit tester in the “test” directory . . . . . . 2.5 Example programs in the “examples” directory 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Compilation 4 Some Tools and Examples to Get You Started 4.1 Three Simple Command Line Tools: gf mult, gf div and gf add 4.2 Quick Starting Example #1: Simple multiplication and division . 4.3 Quick Starting Example #2: Multiplying a region by a constant . 4.4 Quick Starting Example #3: Using w = 64 . . . . . . . . . . . 4.5 Quick Starting Example #4: Using w = 128 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 6 7 7 8 8 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 8 9 10 11 11 5 Important Information on Alignment when Multiplying Regions 6 The Defaults 6.1 Changing the Defaults . . . . . . . . . . . . . . . . . . . . . . . 6.1.1 Changing the Components of a Galois Field with create gf 6.1.2 Changing the Polynomial . . . . . . . . . . . . . . . . . . 6.1.3 Changing the Multiplication Technique . . . . . . . . . . 6.1.4 Changing the Division Technique . . . . . . . . . . . . . 6.1.5 Changing the Region Technique . . . . . . . . . . . . . . 6.2 Determining Supported Techniques with gf methods . . . . . . . 6.3 Testing with gf unit, gf time, and time tool.sh . . . . . . . . . . 6.3.1 time tool.sh . . . . . . . . . . . . . . . . . . . . . . . . 6.3.2 An example of gf methods and time tool.sh . . . . . . . 6.4 Calling gf init hard() . . . . . . . . . . . . . . . . . . . . . . . . 6.5 gf size() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . from argv() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 14 15 16 17 19 19 20 21 22 23 24 26 Further Information on Options and Algorithms 7.1 Inlining Single Multiplication and Division for Speed . . . . . 7.2 Using different techniques for single and region multiplication 7.3 General w . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4 Arguments to “SPLIT” . . . . . . . . . . . . . . . . . . . . . 7.5 Arguments to “GROUP” . . . . . . . . . . . . . . . . . . . . 7.6 Considerations with “COMPOSITE” . . . . . . . . . . . . . 7.7 “CARRY FREE” and the Primitive Polynomial . . . . . . . 7.8 More on Primitive Polynomials . . . . . . . . . . . . . . . . . 7.8.1 Primitive Polynomials that are not Primitive . . . . . . 7.8.2 Default Polynomials for Composite Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 26 27 28 28 29 30 31 31 31 32 7 12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .