Git Product home page Git Product logo

dingsen2 / hardcaml_zprize Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fyquah/hardcaml_zprize

0.0 0.0 0.0 3.52 MB

Hardcaml_zprize implements high performance, open source cryptographic solutions for large scale number theoretic transforms (NTT) and multi-scalar multiplications (MSM) in Hardcaml. Originally developed as submissions to the 2022 ZPrize competition.

License: Other

Shell 1.79% C++ 15.68% Python 0.44% C 0.06% OCaml 54.08% Tcl 2.36% Verilog 7.99% Rust 2.14% Standard ML 0.11% SystemVerilog 13.98% Makefile 0.78% CMake 0.59%

hardcaml_zprize's Introduction

Hardcaml ZPrize

The current dev version of this repo is using some more update Hardcaml packages which as of early 2023 need to be pinned. See `.github/workflow/main.yml for details.

The branch zprize-2022-submission is a version of the repo which should work with the Hardcaml packages released on opam.

In 2022, we, the team who develops Hardcaml (Andy Ray, Ben Devlin, Fu Yong Quah, and Rahul Yesantharao) participated in the ZPrize competition. We competed in the Multi-Scalar Multiplication (MSM) and Number Theoretic Transform (NTT) tracks.

See https://zprize.hardcaml.com for a detailed write up on our design, results and build instructions!

This repo has submissions to two of the ZPrize tracks, in the zprize folder.

Compiling OCaml and Hardcaml code

The RTL (Verilog) used by various flows in this repo is written using the Hardcaml library, which needs OCaml installed to generate.

  1. Follow the instructions in https://opam.ocaml.org/doc/Install.html to install opam, the OCaml package manager
  2. Install the OCaml 4.13.1 compiler. You might need to run
opam switch create 4.13.1
eval $(opam env) # to pick up relevant environment variables
  1. Install the relevant OCaml dependencies
opam install . --deps-only

You might need to install extra packages (m4 gmp-devep libffi-devel libgmp3-dev), especially on the AWS boxes. In ubuntu you can run the following command. For Centos on the AWS boxes, use sudo yum install.

sudo apt-get install m4 gmp-devel libffi-devel libgmp3-dev z3 cargo

To check everything installed correctly

opam exec -- dune build
opam exec -- dune runtest

Now please continue to the relevant to build the top level designs from source.

Contributing

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as below, without any additional terms or conditions.

License

Copyright 2022 Andy Ray, Ben Devlin, Fu Yong Quah, Rahul Yesantharao.

This project is licensed under either of

at your option.

The SPDX license identifier for this project is MIT OR Apache-2.0.

hardcaml_zprize's People

Contributors

fyquah avatar bsdevlin avatar rahulyesantharao avatar andrewray avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.