I am looking into implementing some operations for the BLS signature scheme in Solidity, using the new precompiled contracts for pairing operations released with Byzantium.
In BLS verification, to check the validity of a signature s
in F_q
corresponding to public key V
in G_2
and message M
:
- Find
y
inF_q
withsigma = (s, y)
. - Compute
R <- MapToGroup(M)
inG_1
. - Test if either
e(sigma, Q) = e(R, V)
ore(sigma, Q)^-1 = e(R, V)
.
(see page 310 in the BLS paper for more details)
Supposing we have R
and sigma
, is step 3 possible with the precompiled contracts: addition (0x6), scalar multiplication (0x7), and pairing check (0x8)? I am not sure I can find a formulation since there is no implementation for evaluating the pairing function e
itself.
Also, how would steps 1 and 2 be accomplished in Solidity?
Edit: asked a similar question on the crypto StackExchange