aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2019-02-04 13:36:54 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2019-02-04 13:36:54 +0800
commit23ce452c6656aca17844cea4b674d592e77a4f32 (patch)
treeb773bf92cd54203b0cefa034fa558a9d018f6989
parent2666a886306766e826f036fd0a23dddb468ec148 (diff)
downloadtangerine-mcl-23ce452c6656aca17844cea4b674d592e77a4f32.tar.gz
tangerine-mcl-23ce452c6656aca17844cea4b674d592e77a4f32.tar.zst
tangerine-mcl-23ce452c6656aca17844cea4b674d592e77a4f32.zip
how to set generators of G1 and G2
-rw-r--r--readme.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/readme.md b/readme.md
index 7c11fc9..61e5e6e 100644
--- a/readme.md
+++ b/readme.md
@@ -352,6 +352,18 @@ getStr() method gets
* `2 <x>` ; compressed format for even y
* `3 <x>` ; compressed format for odd y
+## Generator of G1 and G2
+
+If you want to use the same generators of BLS12-381 with [zkcrypto](https://github.com/zkcrypto/pairing/tree/master/src/bls12_381#g2) then,
+
+```
+// G1 P
+P.setStr('1 3685416753713387016781088315183077757961620795782546409894578378688607592378376318836054947676345821548104185464507 1339506544944476473020471379941921221584933875938349620426543736416511423956333506472724655353366534992391756441569')
+
+// G2 Q
+Q.setStr('1 352701069587466618187139116011060144890029952792775240219908644239793785735715026873347600343865175952761926303160 3059144344244213709971259814753781636986470325476647558659373206291635324768958432433509563104347017837885763365758 1985150602287291935568054521177171638300868978215655730859378665066344726373823718423869104263333984641494340347905 927553665492332455747201965776037880757740193453592970025027978793976877002675564980949289727957565575433344219582')
+```
+
## Serialization format of G1 and G2
pseudo-code to serialize of p