slowli / dlog-arithmetic

Arithmetic interpreter for discrete log crypto

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Arithmetic interpreter for discrete log crypto

Here lies a Rust interpreter of arithmetic expressions in finite cyclic groups in which the discrete logarithm problem is believed to be hard. Such groups are extensively used in cryptography; for example, they form the basis of ElGamal and [elliptic curve] signature systems, ElGamal encryption system, various zero-knowledge proofs, and higher-level protocols (such as transparent e-voting).

The arithmetic expression language used in the interpreter allows to succinctly describe and tinker with cryptographic protocols.

Why?

  • Resulting protocol expressions are group-independent (if literals are not involved) and require little cognitive overhead.
  • Writing interpreters is fun.

Interpreter features

  • Functions and Rust-style blocks
  • Capturing of vars / functions by functions
  • Hindley-Milner type inference
  • Support of toy groups (prime-order subgroup of the multiplicative group of integers modulo p, where p is a safe prime)
  • Web app (via a WASM module)

About

Arithmetic interpreter for discrete log crypto

License:Apache License 2.0


Languages

Language:Rust 100.0%