Source code version 1.1.1 is in ecdl2K-108.c.
Purpose: Fast arithmetic for computing discrete logs on elliptic curves.
Copyright: Robert J. Harley, 1997-1999.
Legalese: This source code is subject to the GNU General Public Licence v2.
This is Rob's 64-bit ECDL program for Unix, version 1.1.1.
Consult the following URL for more information:
cc -O2 ecdl2K-108.c -o ecdl.exe
echo Machine name is `hostname`
nice ../ecdl.exe mail by firstname.lastname@example.org on `hostname` > ecdl.log &
Then go sign up, using the exact same email address, at this form:
Go to this form to sign up:
Give your email address (or at least something that identifies you uniquely) and a passphrase you just invented. Keep a safe copy of the passphrase!
Note: If you prefer to stay anonymous and not sign up, that's fine.
Compile with something like:
gcc -O2 -freg-struct-return ecdl2K-108.c -o ecdl.exe
cc -O5 ecdl2K-108.c -o ecdl
You can test the binary like this:
./ecdl.exe test by me@here on bla
The test output should match this sample except for the reported times and rates:
> ./ecdl.exe test by me@here on bla
This is Rob's ECDL program for Unix64, version 1.1.1
Mode ...... test
Email ..... me@here
Machine ... bla
Generating 32 new starting points.
Test point found at: Fri Nov 26 17:49:14 1999
Iterations used = 18567.
Total iterations = 594144.
Rate = 204368 per second.
Test point found at: Fri Nov 26 17:49:28 1999
Iterations used = 113354.
Total iterations = 3627328.
Rate = 205715 per second.
Test point found at: Fri Nov 26 17:49:33 1999
Iterations used = 146537.
Total iterations = 4689184.
Rate = 205606 per second.
[...and so on...]
If the program complains that it cannot find sendmail, you can compile with -DSENDMAIL='"/usr/sbin/sendmail"' or something similar.
Note: Beware if you compile on Digital Unix and run on Linux. The program uses popen() to run sendmail; when compiled on Digital Unix popen() looks for /sbin/sh whereas Linux has /bin/sh instead. You will have to create an appropriate link or else use batch mode (see section 4 below).
Good speeds on Alpha are roughly 70 k iterations per second for a 300 MHz EV4, 200 k for 500 MHz EV5 and 290 k for 500 MHz EV6. Best results are obtained with gcc 2.95 or Compaq cc >= 5.7. A 333 MHz UltraSPARC-IIi running Solaris 7 gets 140 k with Sun's cc 5.0.
You can compile with various optimisation flags to maximise speed before starting on the real calculations. Try adding -DPROD=2 (or 3 or 4) to the compilation flags to use a different implementation of speed critical functions. It might be a little faster; then again, maybe not!
You can also try tweaking the value of PARAL. Just add -DPARAL=40, for instance. The default is 32 and useful values are roughly in the range 20 to 50. Note that the test output will no longer exactly match the sample given above.
When you're ready to start up: on each machine you want to run on make a directory for that machine, cd into it and go.
echo Machine name is `hostname`
unlimit cputime || (echo Using ulimit instead; ulimit -t unlimited)
nice +15 ../ecdl.exe [...arguments, see below...] > ecdl.log &
Note: Some shells need nice -15 instead.
Note: You can keep an eye on the output using tail -f ecdl.log.
Note: If you have a machine with several CPUs, make a directory for each CPU and start up an ecdl process in each one.
The arguments have the following syntax:
ecdl <mode> by <email> on <machine>
<mode>: Either test, batch, mail, alt or http.
<email>: Something to identify you uniquely e.g., your email address.
<machine>: The machine name e.g., as given by hostname.
Note: For <email> give the exact same string you used when signing up, since otherwise the Web pages will not be able to show correct statistics for your contribution.
ecdl mail by John.Smith@example.com on avalon
ecdl http by email@example.com on acid
ecdl batch by anonymous on 'Mystery machine'
Test mode quickly produces some (useless) test output to stdout along with info on iterations per second. This allows you to check that your binary is OK, to compare compiler optimisation flags etc.
The other modes produce things called "distinguished points" every few hours. Each distinguished point looks something like this:
Distinguished point found at: Wed Nov 24 03:52:02 1999
These points are valuable! The ECDL project needs to collect roughly 1.3 million of them to solve Certicom's ECC2K-108 problem. The points are always appended to a file called dist.points and also written to stdout along with some verbose info.
When running in mail mode each point is automatically emailed (using sendmail) to ecdl2Kfirstname.lastname@example.org as well. INRIA's excessively aggressive spam filters might refuse the email; in that case switch to alt mode which sends to ecdl2Kemail@example.com instead.
When running in http mode each point is automatically sent (using the HTTP POST protocol) to the Web server on cristal.inria.fr. If your machine is behind a firewall, you'll need to specify a Web proxy to use for sending the points via HTTP. Specify it on the command line as follows:
ecdl http by <email> on <machine> proxy <proxy-host>:<proxy-port>
where <proxy-host> is the host name of the proxy, e.g. myproxy.mydomain.com, and <proxy-port> is the port number of the HTTP proxy on this host, e.g. 3128. Note that this does not work with firewalls using the SOCKS protocol.
For machines unable to send email or make HTTP connections, for instance not permanently connected to the Net, use batch mode. Then every few days do:
mv dist.points dist.points.nov.25
or similar using the correct date, and email the dist.points.nov.25 file manually. When the next distinguished point is found, a new dist.points file will be created for it and further points will be appended to this new file until the next time you mv it.
|Writes info on stdout||x||x||x||x||x|
|Writes points to dist.points||-||x||x||x||x|
|Sends points via sendmail||-||-||x||x||-|
|Sends points via http||-||-||-||-||x|
When the program is running it saves its internal state in a file called saved.state from time to time. If you want to stop the program, send it a SIGINT or SIGTERM signal so it can save its state before exiting. If it is running in the foreground, you can send SIGINT by typing Ctrl-C. If it is running in the background send SIGTERM by killall ecdl.exe. If you don't have killall installed, find the PID (first column of the ps output) and use kill:
ps x | grep ecdl | grep -v grep
kill <the PID>
When you restart in the same directory:
nice +15 ../ecdl.exe [...arguments...] >> ecdl.log &
the program will look for the saved state file. If no saved state is found it will generate a new state and work from there. If one is found, the program reads it and continues where it left off. Note that it would be wasteful to use a given saved state on more than one CPU because work would just be duplicated.
The reason each machine should have its own directory is to avoid the dist.points and saved.state files getting mixed up! Note that test mode does not mess with these files.