Appendix A. Code and tools

 

This appendix tells you where to find the GNU Multiple Precision Arithmetic Library and how to compile it on a Linux system. I’ll describe how to install the PARI/gp interactive tool and library from the source. The compilation from the source of the library KangarooTwelve is also covered.

A.1 GNU Multiple Precision Arithmetic Library

The whole point of elliptic curve cryptography is to use numbers that are too large to solve the logarithm problem in a reasonable amount of time. As pointed out in the preface to the book, we require 160-bit numbers for an 80-bit level of security. With 8 bits to a byte, that’s 20 bytes. Since a long, long type in C is 64 bits or 8 bytes it is too short for what we want. And at the 512-bit level size of number, we require 64 bytes for each number.

Handling this level of problem requires a lot of work. Fortunately, we can use a multibyte numerical library that already has the low-level crunching done for us. While there are many such libraries available, I chose the GNU Multiple Precision Arithmetic Library (GMP library) because (a) it is free and (b) it is updated on a regular basis.

A.2 PARI/gp

A.3 Building KangarooTwelve library