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 group must be domain-separated. #50

Open
armfazh opened this issue Apr 13, 2023 · 1 comment
Open

Hash to group must be domain-separated. #50

armfazh opened this issue Apr 13, 2023 · 1 comment

Comments

@armfazh
Copy link

armfazh commented Apr 13, 2023

The current interface for hashing to group elements must consider the use of domain separation strings.

This is aligned with hash to curve IETF specification. All hashes must be domain-separated, so a protocol can specify the separation when the hash is invoked as different random oracles. See more https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-16#name-domain-separation-requireme

Current:

kyber/hash.go

Lines 13 to 15 in 5706fa5

type HashablePoint interface {
Hash([]byte) Point
}

Proposed:

type HashablePoint interface { 
    Hash(msg, dst []byte) Point 
} 
@ineiti
Copy link

ineiti commented Apr 15, 2024

I don't think this is kyber's task to do. Kyber is the "shoot in your foot" crypto library.

If you want to have kyber for actual applications for people who don't know what they're doing, there is a lot to do.

And if you start nudging it here and there in a more fool-proof version, you might anger researchers who won't find their required primitives anymore.

I propose to close this issue and keep kyber as "shoot in your foot" library. Other libraries can build on top of kyber to have a more user-friendly way of handling crypto.

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

No branches or pull requests

2 participants