Source code for our paper "Solving Discrete Logarithms in Smooth-Order Groups with CUDA" from SHARCS 2012. The cuda-11.5 branch will compile on CUDA 11.5 and now runs with two A100 GPUs, though is perhaps not tuned optimally.

Steven Engler 73b5899855 Improved Makefile. 8 lat temu
.gitignore 3a50b8f3a9 Added a '.gitignore' file. 8 lat temu
COPYING e2973619c9 Commit cudadl-0.8 to git 14 lat temu
Makefile 73b5899855 Improved Makefile. 8 lat temu
README 9fca8d29fd cudadl-0.9 14 lat temu
atomic_iostream.h 3a802c8e75 Improved the logging for dlrho. 8 lat temu
controller.cc 8ed3d76640 Derandomization works with multiple workers. 8 lat temu
controller.h edfd20a685 Add new cmdline options to controller 14 lat temu
controller_main.cc f496ab2bf5 Can make the output from the two versions comparable. 8 lat temu
cudadl.h 1da839f0d8 Can save distinguished points to files. 8 lat temu
desired_resources.cc 8ed3d76640 Derandomization works with multiple workers. 8 lat temu
desired_resources.h 7dc8d4e064 Both versions now use 'desired_resources(...)'. 8 lat temu
dlrho.cc 1da839f0d8 Can save distinguished points to files. 8 lat temu
dpnode.cc 411725a245 Added warning when dpnode buffers don't empty. 8 lat temu
dpnode.h 5b62cbb2c4 Split off the three main()s in preparation for MPI wrapper 14 lat temu
dpnode_main.cc 5b62cbb2c4 Split off the three main()s in preparation for MPI wrapper 14 lat temu
dpstream.cu 1da839f0d8 Can save distinguished points to files. 8 lat temu
evutils.cc 411725a245 Added warning when dpnode buffers don't empty. 8 lat temu
evutils.h 411725a245 Added warning when dpnode buffers don't empty. 8 lat temu
gen_N.cc 9fca8d29fd cudadl-0.9 14 lat temu
gen_all_N.sh 47faf09287 Improved the timing experiment script. 8 lat temu
gencios_reg_20 771b13c42c Use macros to include the inline assembly instead of inline functions 14 lat temu
logparse.pl 9fa203afbe Add a program to parse the logfile for some interesting statistics 14 lat temu
mpi.cc 4199e3c1ff The second argument to 'mpi' specifies number of dpnodes. 8 lat temu
parrhoasm.cu 1da839f0d8 Can save distinguished points to files. 8 lat temu
run_timing_experiment.sh 47faf09287 Improved the timing experiment script. 8 lat temu
subproblem.h e5decaf5df Communicate the dpfreq to the workers correctly 14 lat temu
summarize_data_multiprocess.py ce3141f7e1 Added scripts for collecting timing data. 8 lat temu
worker.cc 411725a245 Added warning when dpnode buffers don't empty. 8 lat temu
worker.h 0e11651c7d The worker's 'cuda_dev_id' argument selects a GPU. 8 lat temu
worker_main.cc 0e11651c7d The worker's 'cuda_dev_id' argument selects a GPU. 8 lat temu

README

cudadl-0.9
21 Mar 2012
Ryan Henry and Ian Goldberg
{rhenry,iang}@cs.uwaterloo.ca
http://crysp.uwaterloo.ca/software/

This package contains the source code to our CUDA implementation of
van Oorschot and Wiener's parallel version of the Pollard rho discrete
log algorithm. It is intended for use on 1536-bit moduli that are
RSA numbers with smooth totient; that is, the modulus N=pq, where p and q
are 768-bit primes, and the prime factors of p-1 and q-1 are all
distinct and less then B, for a parameter B. [The value 1536 is
hardcoded as "WORDS = 24" (24*32*2 = 1536) in the Makefile; it is easy
to change this value and recompile if desired.] Note that this means
the totient of N = \phi(N) = (p-1)(q-1) has all prime factors less than
B; that is, \phi(n) is "B-smooth".

Usage:

1. Build the software. You'll need:

NTL
GMP
NVIDIA CUDA Toolkit 3.1
2 M2050 (or other compute capability level 2.0) CUDA cards
[If you have more or just 1, you'll need to modify dlrho.cc,
unfortunately.]

Hopefully just typing "make" should work. It will build gen_N and
dlrho.

2. Create the modulus N as, for example, a 1536-bit RSA number whose
totient is 2^50-smooth:

./gen_N 1536 50 > N

3. Generate a DL problem mod N and solve it:

./dlrho < N

This software is described in "Solving Discrete Logarithms in
Smooth-Order Groups with CUDA", CACR technical report 2012-02,
http://www.cacr.math.uwaterloo.ca/techreports/2012/cacr2012-02.pdf

This program is covered under version 3 of the GNU General Public
Licence; see the file COPYING for more information.

Changelog:

0.9 (21 Mar 2012)
Extend the code to handle smoothness levels (B) larger than 2^60. Now
we can handle up to 2^92. We have successfully run a test with
B = 2^80.

0.8 (23 Jan 2012)
Initial public release