herumi / mcl

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

How to perform simple multiplication and addition ? #109

Closed Henzi96 closed 3 years ago

Henzi96 commented 3 years ago

Hello, i am new in Billinear pairing and working with eliptic curves. I am using MCL library through JNI from https://github.com/herumi/mcl/tree/master/ffi/java . Lets say, that i would like to use MCL library for Weak Boneh Boyen signature.

How to perform a simple multiplication? P(point on curve) = number * Q (point on curve) ??? or: C (point on curve = P (Point on curve) + Q (Point on curve) Can you show me some examples ? My algorithm has 32 bytes long number and 65 Bytes long Point on curve. Thanks

herumi commented 3 years ago

You can use MCL.Add, MCL.Sub and so on. Please see a sample of operations. https://github.com/herumi/mcl/blob/master/ffi/java/MclTest.java#L95-L122