Skip to content
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

Hash to Point on G2 in BN256 pairing #416

Closed
rsinha opened this issue Mar 15, 2020 · 5 comments
Closed

Hash to Point on G2 in BN256 pairing #416

rsinha opened this issue Mar 15, 2020 · 5 comments

Comments

@rsinha
Copy link

rsinha commented Mar 15, 2020

Hi,

First of all, thank you for your work on this crypto library.

Is there a reason Hash (to group element) is only defined for group G1, but not for G2?
I have a use case where key derivation requires hashing on both elements.

@ineiti
Copy link
Member

ineiti commented Mar 16, 2020

Can you please explain further? You might have misunderstood the difference between the suite and the Group:

  • suite: defines a hash-function, XOF, random-source plus a group (or three in the case of bn256)
  • group: more precisely a field and a group that define a cryptographic one-way function to be used in asymmetric crypto

So the hash to group element is Embed, and this is defined on G1, G2, and GT.

@rsinha
Copy link
Author

rsinha commented Mar 16, 2020

Thanks for the clarification. I am referring to the definition of func (p *pointG1) Hash(m []byte) kyber.Point in pairing/bn256/point.go. I didn't find a similar definition for pointG2.

It also looks like Embed is currently unsupported for the groups in bn256.

@ineiti
Copy link
Member

ineiti commented Mar 17, 2020

Oups - I didn't read two lines down "not implemented" - sorry. You're right, Hash is not implemented on G2.

@nikkolasg did the implementation of this code. Or perhaps @Daeinar can help here?

Can we just copy/paste the code from G1.Hash to G2.Hash?

@AkshayaMani
Copy link

We have created a pull request for hash to G2. The status can be found here: #428.

@K1li4nL K1li4nL linked a pull request Apr 1, 2024 that will close this issue
@K1li4nL
Copy link
Contributor

K1li4nL commented Sep 4, 2024

Hello, thank you for your interest in kyber, with the existing attacks on BN curves, BN256 security dropped to around a 100bits and for this reason we won't be investing more effort into this curve.

@K1li4nL K1li4nL closed this as completed Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants