Package: highctidh
Warning and noticeThis is an unofficial fork of high-ctidh. This is highly experimental software
and it has not yet been reviewed for security considerations. We encourage
users of this software to assume that there are vulnerabilities until a review
confirms otherwise.Quick startThehighctidhproject offers three compatible interfaces that all use the
same underlying C or assembler implementations:C LibraryPython moduleGolang moduleC libraryBuild and install the C library for each field size with required headers:make
sudo make install
sudo ldconfigAfter installing the libraries it is possible to use them in normal C programs.
To build and run the example C programs that use the libraries:make examples
make examples-runPython bindingsPython bindings include the required shared libraries and do not requirelibhighctidh_*.soto be installed on the system.Quickly install the latest release frompypiin a virtual environment:python3 -m venv venv
source venv/bin/activate
pip install highctidhBuild the highctidh Python bindings as a Python wheel and then install it:make wheel
pip install --force-reinstall dist/highctidh-*.whlBuild and install a Debian GNU/Linux package containing the Python module:make deb
sudo dpkg -i python3-highctidh_*.debGolang bindingsAdd the golang bindings to a golang project:go get -u https://codeberg.org/vula/highctidh/ctidh511
go get -u https://codeberg.org/vula/highctidh/ctidh512
go get -u https://codeberg.org/vula/highctidh/ctidh1024
go get -u https://codeberg.org/vula/highctidh/ctidh2048highctidh improvementsThis fork enhances high-ctidh with additional Makefile targets including
building high-ctidh as four shared libraries, one for each key size of 511,
512, 1024, and 2048. Python bindings are additionally added, as well as
optional Debian packaging of both the shared library object files and the
Python module. The Python bindings were made in concert with the author of the
Golang bindings which are now included. Both bindings were built around the
same shared objects for cross verification purposes. Currently this library is
fast on theamd64/x86_64CPU architecture and functional but much slower
with other CPU architectures. The portable backend was generated using thefiat-cryptoproject which uses a "Correct-by-Construction" approach; seedoc/PRIMES.mdfor more information.  Tested architectures for the C library
include:amd64/x86_64(with and without avx2),arm32v5,arm32v6,arm32v7,arm64v8/aarch64/arm64,i386,loongarch64/Loongson,mips,mipsel,mips64,mips64el,POWER8/ppc64,POWER9/ppc64le,riscv64,s390x, andsparc64.Golang bindingsThe Golang bindings compile and should be functional onamd64/x86_64,arm32v5,arm32v6,arm32v7,arm64v8/aarch64/arm64,i386,ppc64,ppc64le,riscv64,s390x,mips,mipsle,mips64,mips64le.  Themisc/test-golang-cross.shscript runs tests on the host build architecture
and then attempts to cross-compile for each listed architecture.  The.woodpecker/golang.ymlattempts to perform a cross-compile for all listed
golang versions and enumerated architectures.  Native builds for the Golang
bindings should be functional onloong64andsparc64but this is currently
untested. Go version 1.21 is used to build and test in.woodpecker/golang.yml.Python bindingsThe Python bindings build and should be functional onamd64,arm32/armv7l,arm32v5,arm32v6,arm32v7,arm64,i386,ppc64le,riscv64,s390x, andmips64el. Python 3.9, 3.10, 3.11, and 3.12 are used to build and
test in.woodpecker/qemu-python-clang.yml.Debian packages and Python wheels that contain everything needed to usehighctidhbuild with themake -f Makefile.packages packagesMakefile target
foramd64,arm32/armv7l,arm32/armv5,arm64,i386,mips64el,ppc64el,riscv64, ands390x.PerformanceRough performance numbers are available indocs/BENCHMARKS.md. We recommend
usinggcc10 or later as the compiler except on 32-bit platforms where we
recommendclang14 or later.TestingWe attempt to comprehensively test changes to this software in a continuous
integration environment. Testing includesclang,gcc, native builds onlinux/amd64andlinux/arm64, as well asqemubuilds for almost all other
supported architectures. Please consult the relevant configuration files in.woodpecker/for more information.To test without installing run thetesttarget:make testThe C library and bindings have been tested on the following operating systems:Alpine v3.18 (musl libc)Alpine v3.19 (musl libc)CheriBSDDebian Sid (GNU libc)Debian Bookworm (GNU libc)FreeBSDHardenedBSD (FreeBSD libc)MacOSOpenBSDUbuntu Mantic (GNU libc)Ubuntu Noble (GNU libc)Notes on buildingBuilding on CheriBSD, FreeBSD, and OpenBSD building is supported using thegmakecommand. GNU/Linux and MacOS are supported with themakecommand.Additional notes on building the C libraryTo build and install we recommend:sudo apt install gcc clang make
   make
   sudo make installTo build and install the shared library files using the
"Correct-by-Construction" fiat-crypto portable C backend:make libhighctidh.so HIGHCTIDH_PORTABLE=1
    sudo make installThe fiat-crypto portable C backend works on all platforms.To build and install the shared library files using the original artisanalx86_64assembler backend:make libhighctidh.so HIGHCTIDH_PORTABLE=0
    sudo make installThe original artisanal assembler backend works only on thex86_64platform.
It has been modified slightly for compatibility with LLVM-as/clang.
Hand written assembler contributions for other platforms are welcome.By defaultHIGHCTIDH_PORTABLE=1is enabled for all platforms unless
the library is installed via the Python package, in which case optimized
implementations will be used where possible.Example C library usageAn example C program that can use any of the
libhighctidh_{511,512,1024,2048}.so libraries is available insrc/example-ctidh.c. Use themake examplestarget to buildexample-ctidh511,/example-ctidh512,example-ctidh1024, andexample-ctidh2048programs.Example Python module usageA basic Python benchmarking programmisc/highctidh-simple-benchmark.pyshows
general performance numbers. Python tests may be run withpytestand should be
functional withoutpytestassuming the library is installed. If the library
path includes the build directory as is done intest.sh,pytestor python
should be able to run the tests without installation.Additional informationMore information about the Python bindings including installation instructions
are available in thedocs/README.python.mdfile.The Golang bindings behave as any normal Golang module/package.Thefiat-cryptocode synthesis is described inmisc/fiat-docker/README.mdand the documentation provides instructions for reproducible C code generation.The original released README isdocs/README.original.md.
The original website washttps://ctidh.isogeny.org/software.htmlAcknowledgementsThe original authors of this software released high-ctidh in the public domain.
All contributions made in this fork are also in the public domain.Please consultdocs/AUTHORS.mdfor the original authorship informaton.This forked project is funded through theNGI Assure
Fund, a fund established byNLnetwith financial support from the European Commission'sNext Generation
Internetprogram. Learn more on theNLnet project
page.