dannywillems / ocaml-bls12-381 Goto Github PK
View Code? Open in Web Editor NEWFast BLS12-381 implementation in OCaml
Home Page: https://dannywillems.gitlab.io/ocaml-bls12-381/
License: MIT License
Fast BLS12-381 implementation in OCaml
Home Page: https://dannywillems.gitlab.io/ocaml-bls12-381/
License: MIT License
opam install bls-12-381-unix.1.0.0
failed with the following errors:
$ cat ~/.opam/log/bls12-381-unix-53797-6d07ae.out
build src/blst/dllblst.so,src/blst/libblst.a (exit 1)
(cd _build/default/src/blst/libblst && ./build.sh -shared)
+ cc -O -fno-builtin-memcpy -fPIC -Wall -Wextra -Werror -mno-avx -c ./src/server.c
In file included from ./src/server.c:19:
./src/bulk_addition.c:167:1: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
ADDITION_BTREE(blst_p2, POINTonE2, 384x, fp2, BLS12_381_Rx.p2)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/bulk_addition.c:113:57: note: expanded from macro 'ADDITION_BTREE'
#define ADDITION_BTREE(prefix, ptype, bits, field, one) \
^
./src/bulk_addition.c:57:37: note: expanded from macro '\
HEAD'
static const vec##bits zero = { 0 }; \
^
In file included from ./src/server.c:20:
./src/multi_scalar.c:245:1: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
POINTS_MULT_WBITS_IMPL(blst_p1, POINTonE1, 384, fp, BLS12_381_Rx.p)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/multi_scalar.c:162:46: note: expanded from macro 'POINTS_MULT_WBITS_IMPL'
static const ptype##_affine infinity = { 0 }; \
^
./src/multi_scalar.c:248:1: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
POINTS_MULT_WBITS_IMPL(blst_p2, POINTonE2, 384x, fp2, BLS12_381_Rx.p2)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/multi_scalar.c:162:46: note: expanded from macro 'POINTS_MULT_WBITS_IMPL'
static const ptype##_affine infinity = { 0 }; \
^
./src/multi_scalar.c:248:1: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
POINTS_MULT_WBITS_IMPL(blst_p2, POINTonE2, 384x, fp2, BLS12_381_Rx.p2)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/multi_scalar.c:162:46: note: expanded from macro 'POINTS_MULT_WBITS_IMPL'
static const ptype##_affine infinity = { 0 }; \
^
4 errors generated.
Hey hey,
So I have some custom records, and I want to serialize them. It seems like in OCaml the common way to do this is to use [@@deriving sexp]
, but this won't work with the types that are in Bls12-381. Would it make sense to add this (or add the specific functions it derives manually) within the library itself here?
Hello, I am getting the following error when I try running the test on a simple program:
module Privkey = struct
let keygen _ =
let ikm = Bytes.create 32 in
Randoml.rand_fill ikm;
Bls12_381.Signature.generate_sk ikm
end
let%test "keygen" =
let key = Privkey.keygen () in
printf "%s\n" key
Error: No implementation found for virtual library "bls12-381" in
/Users/xxx/.opam/4.13.1/lib/bls12-381.
-> required by library "narwhall" in _build/default
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.