Warning
The implementations of CSIDH512 etc. shown here are not constanttime implementations.
Sage implementation
The following scripts in the Sage computeralgebra 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 velusqrtmagma20200608.tar.gz package implements CSIDH512 and CSURF512 in the Magma computeralgebra 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 velusqrtmagma
:
wget https://velusqrt.isogeny.org/velusqrtmagma20200608.tar.gz
tar xf velusqrtmagma20200608.tar.gz
cd velusqrtmagma20200608
Run the scripts:
magma < csidh_512.m
magma < csurf_512.m
Julia+Nemo implementation
The velusqrtjulia20200320.tar.gz package implements CSIDH512, CSURF512, and BSIDH 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),
zlib1gdev
,
and wget
:
apt install julia zlib1gdev wget y
As a user velusqrt
,
download velusqrtjulia
and install its dependencies:
wget https://velusqrt.isogeny.org/velusqrtjulia20200320.tar.gz
tar xf velusqrtjulia20200320.tar.gz
cd velusqrtjulia20200320
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 velusqrtjulia
.
C+FLINT implementation
The velusqrtflint20200320.tar.gz package implements CSIDH512 and CSURF512 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, libmpfrdev
, git
, time
, and wget
:
apt install buildessential libmpfrdev 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 velusqrtflint:
git checkout dd1021a6cbaca75d94e6e066c26a3a5622884a7c
Compile FLINT:
./configure prefix=$HOME
make
make check
make install
Download and compile velusqrtflint
:
cd
wget https://velusqrt.isogeny.org/velusqrtflint20200320.tar.gz
tar xf velusqrtflint20200320.tar.gz
cd velusqrtflint20200320
# typically takes under 20 minutes:
make
This produces various benchmarks in
bench.out
,
benchvelu.out
,
benchvelu2.out
,
and
benchvelu3.out
.
C+assembly implementation
The velusqrtasm20200320.tar.gz package implements CSIDH512 and CSIDH1024. 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 CSIDH512 software from 2018 Meyer–Reith, which in turn is an improved version of the public CSIDH512 software from 2018 Castryck–Lange–Martindale–Panny–Renes:

Field arithmetic: For the CSIDH512 prime, all three packages use essentially the same asm software from 2018 Castryck–Lange–Martindale–Panny–Renes. For the CSIDH1024 prime, 2018 Castryck–Lange–Martindale–Panny–Renes included portable software, and
velusqrtasm
includes asm software. 
Isogeny computation:
velusqrtasm
includes new software for the new isogenyevaluation algorithm and for the relevant polynomial arithmetic, and automatically tunes the parameter choices in the new algorithm.velusqrtasm
plugs this algorithm into the higherlevel CSIDH software from 2018 Meyer–Reith.
Usage.
The following instructions have been tested on a Debian 11 (Bullseye) VM.
As root, install compilers, time
, and wget
:
apt install buildessential clang time wget y
As a user velusqrt
,
download and compile velusqrtasm
:
wget https://velusqrt.isogeny.org/velusqrtasm20200320.tar.gz
tar xf velusqrtasm20200320.tar.gz
cd velusqrtasm20200320
# 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.