miracl / MIRACL

MIRACL Cryptographic SDK: Multiprecision Integer and Rational Arithmetic Cryptographic Library is a C software library that is widely regarded by developers as the gold standard open source SDK for elliptic curve cryptography (ECC).
https://miracl.com
644 stars 241 forks source link

Issue with BLS pairing on DAA #61

Closed iesiyok closed 6 years ago

iesiyok commented 6 years ago

Hi there,

I am using BLS pairing for Direct Anonymous Attestation. Running the Join protocol where the Issuer needs to verify c and ci are equal. Like the line 118 at https://github.com/miracl/MIRACL/blob/47943b40b25e5764b1d8dcb44294994c23e05509/source/curve/pairing/daa.cpp It works fine with BN pairing, but it fails with BLS pairing. Any idea why would that be.

Thanks for your helps in advance

mcarrickscott commented 6 years ago

Hello,

Yes, that's a bug.

In the file BLS_PAIR.CPP, find the function

void PFC::random(G1& w)

and add this last line to it

w.g=cof;

Mike

On Mon, Mar 19, 2018 at 9:49 AM, Ilkan Esiyok notifications@github.com wrote:

Hi there,

I am using BLS pairing for Direct Anonymous Attestation. Running the Join protocol where the Issuer needs to verify c and ci are equal. Like the line 118 at https://github.com/miracl/MIRACL/blob/ 47943b40b25e5764b1d8dcb44294994c23e05509/source/curve/pairing/daa.cpp It works fine with BN pairing, but it fails with BLS pairing. Any idea why would that be.

Thanks for your helps in advance

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/miracl/MIRACL/issues/61, or mute the thread https://github.com/notifications/unsubscribe-auth/ACm8jvp8rowiMPISWpG-GAJDyUEdFEQdks5tf384gaJpZM4Sv244 .

iesiyok commented 6 years ago

Thank you very much for your quick response. The line has solved the problem.