a portable and fast pairing-based cryptography library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
mcl/ffi/cs
MITSUNARI Shigeo 5a24245d0e [cs][skip cs] add G1, G2::Recover/Share 4 years ago
..
Properties split program.cs to bn256.cs and bn256_test.cs 8 years ago
mcl [cs][skip cs] add G1, G2::Recover/Share 4 years ago
test [cs][skip cs] add G1, G2::Recover/Share 4 years ago
App.config ffi for C#/Python(TBD) 8 years ago
bn256.cs Make DllImport for mclBn256 cross-plateform (remove .dll extension) 4 years ago
bn256.csproj Revert "use unsafe fixed for Fr" 8 years ago
bn256.sln split program.cs to bn256.cs and bn256_test.cs 8 years ago
bn256_test.cs setErrFile is removed 7 years ago
mcl.sln add C# bindings 4 years ago
readme.md [C#] how to init for ETH 4 years ago

readme.md

C# binding of mcl library

How to build bin/mclbn384_256.dll.

git clone https://github.com/herumi/mcl
cd mcl
mklib dll

Open mcl/ffi/cs/mcl.sln and Set the directory of mcl/bin to workingDirectory at Debug of test project.

Remark

  • bn256.cs is an old code. It will be removed in the future.
  • mcl/mcl.cs is a new version. It support BN254, BN_SNARK and BLS12_381 curve, which requires mclbn384_256.dll.

ETHmode with BLS12_381

If you need the map-to-G1/G2 function defined in Hashing to Elliptic Curves, then initialize this library as the followings:

MCL.Init(BLS12_381);
MCL.ETHmode();