package ff

Build not checked
  1. Overview
  2. Docs
OCaml implementation of Finite Field operations

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ocaml-ff-0.4.0.tar.gz
md5=ac1198ad3075847b7e8a8f1904ba44d8
sha512=b20e5f114adbcd4d4e9dbf7b8a937776b07787052f6e6b965ffeaa3e3319f4ab9051d64e30a1a34d55f9f08509382b9aabc012988a2f704f3d770a65db48304d

Description

OCaml implementation of Finite Field operations

Added to opam-repository:

README

OCaml FF

Play with Finite Field in OCaml

This library provides functors to instantiate finite field of arbitrary orders (in the limit of Zarith, the dependency to handle arbitrary integers).

module F13 = Ff.MakeFp (struct let prime_order = Z.of_string "13" end)
module BLSFr = Ff.MakeFp (
  struct
    let prime_order = Z.of_string "52435875175126190479447740508185965837690552500527637822603658699938581184513"
  end
)

JavaScript compatibility

This library can be transpiled in JavaScript using js_of_ocaml. An example is provided in js/test_js.ml, with the corresponding dune file. It instantiates Fp with p = 53. dune will compile this into a FiniteField.js file, exporting methods like add, toString, random, etc. FiniteField can be used as a Node module. See js/test/test_js.js for an example.

# Generate FiniteField.js
dune build js
cp _build/default/js/FiniteField.js ./
node
var FF = require("./FiniteField.js");
let x = FF.random();
let y = FF.random();
let x_plus_y = FF.add(x, y);

Dependencies (2)

  1. zarith >= "1.9.1" & < "2.0"
  2. dune >= "2.0"

Dev Dependencies (1)

  1. alcotest with-test

Optional Dependencies

None

Used by (1)

  1. bls12-381 < "0.4.1"

Conflicts

None

Build status

Results of building ff with each compiler on check.ci.ocaml.org, run of against opam-repository 8d8d144. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

This version is not in the latest run; the versions below are.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
0.6.2 good good good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure