Maple Code

The Maple code in the book can be downloaded from the links below. The Maple procedures are contained in the Maple language files with extension `.mpl' and the book examples are given in the worksheet files with extension `.mw'. Detailed explanations on the code can be found in the book.

The procedure Sieve in Chapter 2 makes use of the external C compiler and will produce an error if this compiler is not installed, but it can be easily modified so that the compiler is not required. Also, some procedures in Chapters 5 and 6 may produce an error in some Maple versions, due to insufficient memory. In these cases we recommend using a computer with at least 4 Gb of RAM and, if necessary, increasing the value of the variable kernelopts(datalimit). Also, the 64-bit versions of Maple are less prone to this type of error.

Alternatively, smaller examples can be run. For example, instead of calling

FindCollision(m1, m2, Hash40, 40)

from Chapter 5, which may give an `object too large' error, one may call

FindCollision(m1, m2, Hash36, 36).

This will quickly produce a collision for the hash function resulting of truncating MD5 to its first 36 bits (instead of the first 40) without running into memory problems.

There are also other procedures (such as, for example, the quadratic sieve implementation QS) that may easily hit memory limits. If this happens with some of the book examples, it is always possible to work and experiment with smaller numbers.