Closed aritroCoder closed 1 year ago
The entries in the tails file aren't actually primes, they are G2 curve points. The process for generating them looks correct here. Essentially, it is the case that tail[index] = g_dash * (gamma ** index)
, where gamma
is a scalar field element. I'm not sure I would describe g_dash
as 'the' generator of the G2 group as it seems to be picked randomly for each registry. Every curve point is technically a generator but there is also a standard one that is used elsewhere.
The entries in the tails file aren't actually primes, they are G2 curve points. The process for generating them looks correct here. Essentially, it is the case that
tail[index] = g_dash * (gamma ** index)
, wheregamma
is a scalar field element. I'm not sure I would describeg_dash
as 'the' generator of the G2 group as it seems to be picked randomly for each registry. Every curve point is technically a generator but there is also a standard one that is used elsewhere.
This text is from another part of the same specification where they call g_dash
as the generator.
And thanks for the clarification, I was also wondering if they are actually a prime number or not
I have updated the first message with the new updated screenshot of edited spec. Also, I have changed the mention of primes
with points in curve G2
in that section (I guess it needs a separate issue to track down and replace all such instances in case this is present elsewhere too)
Looks great — nice work. A few minor cleanups mostly in the text that existed before you started.
Not sure about the “To Do” right below your PR. Is there something you can add about for the format of the file (e.g. how to extract the points from it), or should it be removed?
Looks great — nice work. A few minor cleanups mostly in the text that existed before you started.
Not sure about the “To Do” right below your PR. Is there something you can add about for the format of the file (e.g. how to extract the points from it), or should it be removed?
for the TO DO
where we have to define the format of the tails file, I am guessing we have to write what all data is written in the file, and in which order, something like this:
But I am not sure how to write the format for the tails file as they are not in human readable format but as octet-stream
, so giving an example won't be useful.
The values are elliptic curve points and not primes encoded. I need to look deeper as to how those points are encoded
The values are elliptic curve points and not primes encoded. I need to look deeper as to how those points are encoded
Yeah, that's the reason why they are encoded to the octet stream, which makes it difficult to create a human understandable format
The points are encoded as uncompressed big-endian coordinates: {x.0, x.1, y.0, y.1}
for 32*4 = 128 bytes, for the two Fp2 components.
The points are encoded as uncompressed big-endian coordinates:
{x.0, x.1, y.0, y.1}
for 32*4 = 128 bytes, for the two Fp2 components.
I think for a schematic format I can add this. In the code comments however, the byte order was mentioned as 'little' so it should be little endian
I have updated the first message with the new updated screenshot of edited spec after adding the tails file format
Before:
After: