-
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
requirements and guidelines for alternative hash_to_base functions #175
Conversation
We could add an appendix with a hash_to_base from cSHAKE-128 and/or cSHAKE-256, |
Agreed :) |
f762e57
to
9c956f8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latest changes LGTM!
06ccf38
to
07887d4
Compare
07887d4
to
ba792c4
Compare
iiuc, ( something might be inaccurate in my description) at a higher level, one can think that hash_to_base requires two functions: a hash function H1 and a pseudo-random function H2. it would be better to give a description of hash_to_base in terms of H1, H2; and give criteria to choose H1 and H2. This is in some sense already included, but it might be clear for a reader having a notion that 2 functions are required. Also, the ciphersuite can contain another field indicating this choice.
Some examples: As side comment: the ciphersuite string is starting to look as a C-struct or a configuration file rather than a unique identifier. |
This would be a nice thought, but I don't think it's possible to generalize in the way you've stated without putting unnecessary restrictions on alternative hash-to-base functions. The reason is that in general it's not even true that hash_to_base requires H1 and H2! As a few examples:
Backing up: the point of this section is not to try and teach someone how to make up their own hash_to_base function. The one we've got took a good bit of work to get to this point, and there are a lot of subtleties in designing a replacement. The point is to state the high-level requirements, and to show how to use it in a way that won't mess up security or interoperability for people using the hash_to_base function given in this document. EDIT to add:
Right, so this is an example of my second bullet above: KMAC doesn't work with SHA-256; it's not parameterized in terms of anything, it's built directly out of the Keccak sponge... ( |
KMAC doesn't really take a hash function as a parameter, so it doesn't make sense to say 'SHA3/256:h2b/kmac128'. But it is generically part of the SHA-3 family, so it seems sensible to say 'SHA3:h2b/kmac128'.
This patch gives guidance on how to define a new hash_to_base function and use it
in a way that won't interfere with existing suites.
closes #165