herumi / mcl

a portable and fast pairing-based cryptography library
BSD 3-Clause "New" or "Revised" License
450 stars 152 forks source link

bn256 .NET Standard with serialize / deserialize #77

Closed tkstanczak closed 3 years ago

herumi commented 4 years ago

Why do you create a new folder bn256std?

tkstanczak commented 4 years ago

because your bindings would work on slighlty older versions of .net the new ones will only work for .net versions that support .net standard 2.1+

herumi commented 4 years ago

Does ".net standard 2.1+" mean ".NET Core 2.1"?

tkstanczak commented 4 years ago

image

herumi commented 4 years ago

I see. I'll rewrite mcl.cs to support both BN254 and BLS12-381 like bls.cs. Please wait for a moment.

herumi commented 3 years ago

I'm sorry for a long time. I'm developing a new project mcl.sln for C# at https://github.com/herumi/mcl/tree/netstandard/ffi/cs . How about it?

tkstanczak commented 3 years ago

Hi Shigeo, I have spent many hours trying to get it work and had some good perf results for some operations. We have encountered some problems with building and binding the library and dependencies and we had to call ToString and Parse on most of the data passed to lib. We have gone for another lib - from Shamatar and while it is slightly slower, it was designed with Ethereum in mind. We are using your BLS lib in Ethereum 2 and it works great, thank you so much for writing it!

herumi commented 3 years ago

I see. If you had told me what you wanted to do, I might have been able to handle it. If you use mcl again, then please ask me.

tkstanczak commented 3 years ago

I see. If you had told me what you wanted to do, I might have been able to handle it. If you use mcl again, then please ask me.

I understand and appreciate the help - just when realized the MapToG1 did not work I already had most of the things handled with MCL and I reported straightaway to you. You were busy at that time (and working on an open source project myself I totally understand it), and then Shamatar sent his lib the very next day. That one got integrated in few hours and worked out of the box which made us decide to switch and maybe wait for the MapToG1.