Coder Social home page Coder Social logo

mmaker / zkalc Goto Github PK

View Code? Open in Web Editor NEW
65.0 2.0 9.0 10.39 MB

A web tool that helps you compare and visualize the performance of cryptographic operations

Home Page: https://zka.lc

License: BSD 3-Clause "New" or "Revised" License

JavaScript 49.39% Rust 25.43% Python 10.80% Makefile 1.86% CSS 2.94% MDX 9.57%
benchmarks cryptography

zkalc's Introduction

zkalc is a cryptographic calculator!

zkalc helps you calculate how much time cryptographic operations take on a real computer. If you use our software, consider citing us!

Why?

Cryptographers tend to be good at cryptography but they can be quite bad at estimating the time it takes a computer to run their schemes.

We hope that zkalc can help shorten the gap between cryptography and practice:

  • Cryptographers can use the simple zkalc UX to learn how fast their paper will run on various machines
  • Protocol designers can more easily tune the parameters of their protocol depending on their requirements

Please see the various pages of the website for more information on how zkalc works.

Prerequisites

To run benchmarks, we assume that make, git, rust (nightly!) and go (> 1.17) are installed in the system.

Installing Go. To install go, you can download the binaries at go.dev/dl and add go/bin to your PATH environment variable.

Installing Rust. To install rust, you can follow rustup.rs and then type rustup default nightly.

Benchmarks

All benchmarks are listed and run inside the benchmarks/ folder. To run them, type:

    $ cd backend
    $ make

The files generated will end up stored in perf/data/new/

Processing Benchmarks

For this step, we require python3. Benchmarks are assumed to be in a parent folder called bench-data resembling our raw data repository.

    $ cd perf
    $ make

Fronted development

To develop the frontend, npm is required. Run:

    $ cd frontend
    $ npm i
    $ npm run dev

To start a local development server

zkalc's People

Contributors

asn-d6 avatar dependabot[bot] avatar lognorman20 avatar mmaker avatar nalinbhardwaj avatar patrick91 avatar stefanoschaliasos avatar str4d avatar tumberger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

zkalc's Issues

Social preview via opengraph tags

Kobi pointed out that the social preview of zkalc is very ugly -- that is, the image that appears when you paste zkalc links into twitter/telegram/etc.

Apparently some opengraph tags can fix that. Also, the <title> of zkalc is "Create Next App" right now. We can fix that too.

Naming mismatch for some target group operations

Currently msm_Gt is meant for multipairing of the form $\sum_i e(A_i, B_i)$ where $A_i \in \mathbb{G}_1$ and $B_i \in \mathbb{G}_2$. We should support also $\sum_i a_i B_i$ where $a_i \in \mathbb{F}_r$ and $B_i \in \mathbb{G}_t$

Uniform defaults

Create a new lib/defaults.js file that contains default configurations to be used across zkalc.

Unify perf pipeline between gnark and arkworks

In arkworks, we run all the tests (even ones not currently used by zkalc) and dump them on a file, and then criterion.py splits them into curves.

In gnark, we create one output file per curve, and then golang.py needs to be run individually for each file.

We should think of how we want our pipeline to be.

perf: wrong parsing of pallas/vesta results

pasta_curves dumps both pallas and vesta results on the same file which perf cannot understand. Right now it's overwriting the results of pallas (which come first) with the results of vesta (which come second)

The easiest way to fix this is to adapt the Makefile to run two separate cargo bench on pasta_curves and dump each on a separate file.

Frontend CSS optimization

Open a new tab, disable javascript, then go to zka.lc. Note that css doesn't load. Now enable javascript and reload the page (disabling the cache). It also shows first the unrendered page and then the one with the css. Can we change this line to tell Next.js to load the css without going through the javascript?

Make command crashes

Compilation error for 1.73.0-nightly with proc-macro2 v1.0.50

error[E0635]: unknown feature `proc_macro_span_shrink`
  -->/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.51/src/lib.rs:92:30
   |
92 |     feature(proc_macro_span, proc_macro_span_shrink)

Should bump proc-macro2 to newest version.

Halo2 Curves MSM benchmark ID

In halo2_curves benchmarks have e.g. the ID "bn256/G1/2048".
This should be fixed to be consistent with the standard format as in other benchmarks, i.e. "bn256/msm/G1/2048".

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.