Faster computation of isogenies of large prime degree

Warning

The implementations of CSIDH-512 etc. shown here are not constant-time implementations.

Sage implementation

The following scripts in the Sage computer-algebra system test various statements in the velusqrt paper, organized by sections of the paper: 1 2 3 4 5

Usage. The following instructions have been tested on a Debian 11 (Bullseye) VM. As root, install Sage and wget:

    apt install sagemath wget -y

As a user velusqrt, download and run the scripts:

    for i in 1 2 3 4 5
    do
      wget https://velusqrt.isogeny.org/velusqrt-$i.sage
    done
    for i in 1 2 3 4 5
    do
      sage velusqrt-$i.sage || break
    done

Magma implementation

The velusqrt-magma-20200608.tar.gz package implements CSIDH-512 and CSURF-512 in the Magma computer-algebra system. This package is an improved version of the CSURF package from 2019 Castryck–Decru.

Usage. These instructions assume that you already have Magma installed. As a user velusqrt, download and unpack velusqrt-magma:

    wget https://velusqrt.isogeny.org/velusqrt-magma-20200608.tar.gz
    tar -xf velusqrt-magma-20200608.tar.gz
    cd velusqrt-magma-20200608

Run the scripts:

    magma < csidh_512.m
    magma < csurf_512.m

Julia+Nemo implementation

The velusqrt-julia-20200320.tar.gz package implements CSIDH-512, CSURF-512, and B-SIDH in the Julia programming language, using Nemo for field arithmetic and polynomial arithmetic.

Usage. The following instructions have been tested on a Debian 11 (Bullseye) VM. As root, install Julia (version 1.1 or higher), zlib1g-dev, and wget:

    apt install julia zlib1g-dev wget -y

As a user velusqrt, download velusqrt-julia and install its dependencies:

    wget https://velusqrt.isogeny.org/velusqrt-julia-20200320.tar.gz
    tar -xf velusqrt-julia-20200320.tar.gz
    cd velusqrt-julia-20200320
    julia -e 'using Pkg; Pkg.activate("."); Pkg.instantiate()'

Run the benchmarks:

    # takes about an hour:
    julia Benchmark.jl

Or you can interactively explore the functionality in the Jupyter notebook: first install Jupyter, and then use notebook VeluSqrt.ipynb inside velusqrt-julia.

C+FLINT implementation

The velusqrt-flint-20200320.tar.gz package implements CSIDH-512 and CSURF-512 using FLINT for field arithmetic and polynomial arithmetic.

Usage. The following instructions have been tested on a Debian 11 (Bullseye) VM. As root, install compilers, libmpfr-dev, git, time, and wget:

    apt install build-essential libmpfr-dev git time wget -y

As a user velusqrt, download a recent development version of FLINT:

    git clone https://github.com/wbhart/flint2.git
    cd flint2
    # optionally, downgrade to version used to test velusqrt-flint:
    git checkout dd1021a6cbaca75d94e6e066c26a3a5622884a7c

Compile FLINT:

    ./configure --prefix=$HOME
    make
    make check
    make install

Download and compile velusqrt-flint:

    cd
    wget https://velusqrt.isogeny.org/velusqrt-flint-20200320.tar.gz
    tar -xf velusqrt-flint-20200320.tar.gz
    cd velusqrt-flint-20200320
    # typically takes under 20 minutes:
    make

This produces various benchmarks in bench.out, bench-velu.out, bench-velu2.out, and bench-velu3.out.

C+assembly implementation

The velusqrt-asm-20200320.tar.gz package implements CSIDH-512 and CSIDH-1024. CPU prerequisites: amd64 architecture including ADX (ADOX and ADCX); i.e., Intel Broadwell or newer, or AMD Zen or newer.

This package is an improved version of the public CSIDH-512 software from 2018 Meyer–Reith, which in turn is an improved version of the public CSIDH-512 software from 2018 Castryck–Lange–Martindale–Panny–Renes:

Usage. The following instructions have been tested on a Debian 11 (Bullseye) VM. As root, install compilers, time, and wget:

    apt install build-essential clang time wget -y

As a user velusqrt, download and compile velusqrt-asm:

    wget https://velusqrt.isogeny.org/velusqrt-asm-20200320.tar.gz
    tar -xf velusqrt-asm-20200320.tar.gz
    cd velusqrt-asm-20200320
    # typically takes under an hour:
    make

This produces benchmarks in benchmults512.out, benchcycles512.out, benchmults1024.out, and benchcycles1024.out.


Version: This is version 2020.06.08 of the "Software" web page.