-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feedback about sgn0 #225
Comments
Here's my take. First, to address the complexity of the current spec, we could give simplified versions of Point-by-point for each of the above suggestions:
|
@armfazh @chris-wood thoughts? |
The choice of sgn0 is particular to hash to curve, isn't it?. BLS signatures still can use big-endian sign for other purposes. As noted, verifying parity is easier to implement. Moving from (1,-1) to (0,1) is equivalent to move from The proposed sgn function is too specific to the tower used. However, how it is actually computed the sgn function in the current setting? For example, if we have an element in Fp6, |
You're totally right, they could keep using the existing method for compression and only change sgn0 for hashing. This gives up on the hope that everyone could use the same sign method for both compression and hashing, but maybe that's OK.
True.
In the current version, I think we'd expect people to write down the element of Fp6 as a 6-vector over, say, the basis given by the Cartesian product {y^2, y, 1} x {x, 1} and then compute the sign using the existing method. Right? |
hence, it is equivalent to what is proposed by going trough the tower, or not? |
Ah, got it! (Sorry for being slow 😄) I think you're right: it's possible, as long as the ground field elements have the "right" ordering, that the two methods would agree. This is a really good point 👍 |
My $0.02:
|
it seems we are all agree on points 1 and 2. |
It's not obvious to me how to make sgn independent of the evaluation order (or that it's even possible), but it's a very cool idea... I'm still not super jazzed about killing sgn0_be, but I'll go along with it if both of you prefer it. (0,1) seems fine. I should have some time in the next couple days to put together edits for points 1 and 2, and then I guess we can re-evaluate whether we definitely want to remove sgn0_be. |
It is an interesting question whether there is a generalisation of the sign to an arbitrary extension field. What do we expect?
Such a The existence of such a sign is actually equivalent to the problem of selecting a square root. Indeed, suppose there is a way we can pick a preferred square root irrespective of representation. Then we can define such a I'm now thinking about the general case for |
This is a good point! and in fact we're using this idea, but backwards, in the draft---we don't specify how to compute sqrt, and instead we always restrict |
As you say, this appears to be problematic for the general case. So we give up on this, only requiring that |
I've thought a bit more about the existence of an automorphism invariant sign. It cannot exist in Note Note that This leaves the question open for odd |
Mike Scott sent me an email with several pieces of feedback on sgn0. Let's discuss if/how to handle these in this issue, and then I'll put together a PR.
The high-level message is that the sgn0 definitions are too complex, and may lead to implementation errors. Specific suggestions:
Get rid of
sgn0_be
and only usesgn0_le
.sgn0_be
for point compression wouldn't be able to reuse that implementation for hashing. Also, it looks like the BLS12-381 community is pretty firmly entrenched at this point, which would make life hard for the BLS signatures draft.If sgn0 returns 0 for positive or zero, and 1 for negative, then it (at least,
sgn0_le
) could be much simpler, especially for them=1
case:This could also be made quite simple for quadratic extensions:
sgn0_le
. Not clear whether it simplifiessgn0_be
, but it might.Rather than specifying field extension sgn0 in terms of vector representations, specify it in terms of towering. That is, express sgn0 for Fp2 in terms of two calls to sgn0 for Fp; sgn0 for Fp4 in terms of two calls to sgn0 for Fp2; etc.
The text was updated successfully, but these errors were encountered: