ZEN-1.0b
A new toolbox for fast computation in finite extension over finite rings
Florent Chabaud (GRECC)
and
Reynald Lercier (LIX).
These pages are still under construction.
Contents
Many computational problems need arithmetic operations in polynomial
finite rings of Z/nZ where n is an integer (n>1). Integer
factorizations, primality testing are for instance such
applications. To solve them, programmers use general symbolic
mathematical softwares or write specific programs (most of the time
in C).
On the first hand, symbolic mathematical softwares (Maple,
Mathematica,...) handle with difficulty computations in
finite fields. In the worst cases, such programs perform
computations with rationals before finally reducing the objects
modulo the characteristic n, in the best cases, such reductions
are performs but extensions of a finite ring can't be implemented.
In any cases, applications written with such softwares are ten to
hundred times slower than an ad hoc implementation in C. On the
other hand, optimized C libraries (CESAR, Lidia) deal only with
one side of finite fields, mainly Z/nZ.
We hardly believe we can keep the efficiency of these C libraries
while working in any polynomial extension of Z/nZ. We designed
the ZEN library to perform efficient arithmetic operations in
these sets. That means you can work not only, in any polynomial
extension of Z/nZ, but also in any polynomial extension of
another finite ring even if n is not a prime or even if the
polynomial which defines an extension is not irreducible.
Besides, these functionalities are provided without loss of
simplicity. Of course, a compromise had to be chosen between
simplicity and efficiency. Therefore, this library can be used at
two levels.
- For a current usage, the functions ZENFcts of the library
can be used to perform operations on elements, polynomials,
matrices, series and elliptic curves over every polynomial
extension over Z/nZ. Here, you only have to include zen.h
in your C sources and link your object files with the library
libzen.a.
- For advanced users who need to gain more efficiency, it is
possible to replace procedure calls by macros in their own
functions. Such users have to know the internal data structures
of the library and to write specific functions for each structure
if they still want to handle any finite ring. These users are then
sure that their applications are not penalized by inoportune
procedure calls.
The current version of our library provides the following features:
- Basic operations on elements over any finite ring, including Karatsuba multiplication for large integers.
- Operations on polynomials over any finite ring, including Karatsuba multiplication for all polynomials.
- Operations on matrices over any finite ring, including inversion, and kernel computation.
- Operations on truncated series over any finite ring.
- Operations on elliptic curves over any finite ring, mainly the
group law.
A separate little package gives example of what is possible with the library.
Zenfact contains an irreducibility test for polynomials using Berlekamp's algorithm, as well as pseudo-primality test. These two functionnalities are used in a boolean function that tests whether a finite ring is a pseudo-finite field.
The ZEN library uses intensively the BigNum package. We reproduce hereafter the BigNum license
BigNum license
This document and the source code of the BigNum package bear the
marking "Copyright Digital Equipment Corporation & INRIA 1989"
This documentation, and the source code of the BigNum package may
be reproduced and distributed freely to non commercial usage provided
that the following conditions are respected:
- Digital PRL or INRIA should be notified of the copy.
- The original Copyright notice should not be removed from the
documentation or from the source code under any circumstances.
- Any work using the BigNum package should state explicitly the use
of such package, and its origin by including the following sentence:
This work uses the BigNum package developed jointly by INRIA an
Digital PRL.
- If any modification is applied to the BigNum package,
explicit statements should identify the fact that such modifications
have been made, by whom, and where. These statements should not be
removed in any further distribution.
- Any work using extensively the BigNum package should be freely
distributed under conditions similar to the distribution of the
BigNum package.
INRIA and Digital Equipment Corporation make no representations,
express or implicit, with
respect to this documentation or the software it describes, including
without limitations, any implied warranties of merchandability or
fitness for a particular purpose, all of which are expressly
disclaimed. INRIA and Digital Equipment Corporation or subsequent distributors
shall in no event
be liable for any indirect, incidental or consequential damages.
ZEN license
The ZEN library can be freely redistributed provided the above license is not violated.
It is provided as is with no express warranty of correctness or efficiency.
As mentioned above, we shall in no event
be liable for any indirect, incidental or consequential damages.
You may copy the zen package in whole or in part as long as you don't try to
make money of it, or pretend that you wrote it.
The following description reflects the future of ZEN. For the beta version, the complete library is the only one available, because the modules are not completely independant for the moment.
- ZEN: The complete library. Includes all the modules below but none of the applications.
- Modules
- ZEN engine (sys, Zbn, Zeg, Zed, Zer, Zext, Zep, prgm): The engine of the library. Contains, the big integers routines, the extensions routines, and the modular operations for unlimited size of integers. Contains also, compilation tools and some tests program.
- Zeps: The modular operations for small integers fitting in a computer word.
- Ze2: The characteristic 2 operations. Provides fast operations in finite fields GF(2^m).
- Zetab: Tabulated rings. Allows the tabulation of the operations in small rings (cardinality less than 256).
- Zelog: Tabulated fields. Allows the tabulation of the operations in small fields (cardinality less than 65536), using a generator.
- Zef (experimental): Provides basic operations on fractions. All the other operations can be used over Q but without any warranty of efficiency.
- Applications
- Zenfact: Provides an implementation of the Berlekamp's algorithm for testing irreducibility of a polynomial (see the documentation for more details).
The LaTeX sources of the documentation of the library are contained in the C sources. The command make doc provides a dvi file. You can also download the following files, that are included in the above one.
We have already intensively used the library to implement various applications.
Some of them are listed below.
- Tables of irreducible polynomials were obtained using Berlekamp's algorithm implementation.
- True minimal distance of some BCH codes of length 511 (further explanations in this
paper).
As this is a beta release of ZEN, we are sure that bugs still exist in the library, even if we have done our best to avoid them.
Here is a
list of how to fix some of them that we are aware of.
All bug reports, remarks, suggestions, etc... should be sent to
zen@lix.polytechnique.fr
GRECC-LIENS
Ecole Normale Supérieure
45, rue d'Ulm
75230 Paris cedex 05 France
Fax: (+33) (1) 44 32 20 80
HTML pages maintained by
Florent.Chabaud@ens.fr