herumi / mcl-wasm

59 stars 18 forks source link

Is it possible to make G1=G2? #4

Closed taoxinyi closed 5 years ago

taoxinyi commented 5 years ago

I'd like to implement the following Proxy Re-Encryption algriothm, is it possible to set e : G1 x G1-> GT ? pre

herumi commented 5 years ago

A BN and BLS12 curves are type 3 pairing, which means that G1 is not the same as G2. So you take a P in G1 and a Q in G2 and z := e(P, Q). pka := aP. Compute rk{A to B} = e(bP, (1/a)Q) = z^(b/a) from a and pk_b and so on.

taoxinyi commented 5 years ago

Thank you, you are so nice.