diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2017-02-13 09:41:46 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2017-02-13 09:42:20 +0800 |
commit | 75064eb706e10995b5e4f6228e40cbecb294708b (patch) | |
tree | d5a6a2f4a5b9fdb5cb8e15be314a424111c50eca | |
parent | 737794a4889057e3c0027b0cbb12335a35734584 (diff) | |
download | tangerine-mcl-75064eb706e10995b5e4f6228e40cbecb294708b.tar.gz tangerine-mcl-75064eb706e10995b5e4f6228e40cbecb294708b.tar.zst tangerine-mcl-75064eb706e10995b5e4f6228e40cbecb294708b.zip |
update java.md to change the order of the arguments of pairing
-rw-r--r-- | java/java.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/java/java.md b/java/java.md index b482c97..3fe8613 100644 --- a/java/java.md +++ b/java/java.md @@ -14,7 +14,7 @@ System.loadLibrary("mcl_bn256"); * `G1` ; The cyclic group instantiated as E(Fp)[r] where where r = p + 1 - t. * `G2` ; The cyclic group instantiated as the inverse image of E'(Fp^2)[r]. * `GT` ; The cyclic group in the image of the optimal ate pairing. - * `e : G2 x G1 -> GT` + * `e : G1 x G2 -> GT` * `Fr` ; The finite field with characteristic r. # Methods and Functions @@ -56,7 +56,7 @@ System.loadLibrary("mcl_bn256"); * `Bn256.pow(GT z, GT x, Fr y)` ; `z = x ^ y` ## pairing -* `Bn256.pairing(GT e, G2 Q, G1 P)` ; e = e(Q, P) +* `Bn256.pairing(GT e, G1 P, G2 Q)` ; e = e(P, Q) # BLS signature sample ``` @@ -80,8 +80,8 @@ Bn256.mul(sign, H, s); // signature of m = s H GT e1 = new GT(); GT e2 = new GT(); -Bn256.pairing(e1, pub, H); // e1 = e(s Q, H) -Bn256.pairing(e2, Q, sign); // e2 = e(Q, s H); +Bn256.pairing(e1, H, pub); // e1 = e(H, s Q) +Bn256.pairing(e2, sign, Q); // e2 = e(s H, Q); assertBool("verify signature", e1.equals(e2)); ``` |