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

Draft: Add MarsupilamiFourteen (m14) #475

Closed
wants to merge 4 commits into from
Closed

Conversation

aewag
Copy link
Contributor

@aewag aewag commented May 8, 2023

This is a draft to add the MarsupilamiFourteen hash function (related issue #1).
As m14 is a variant of KangarooTwelve, the implementation can reuse parts of the k12 crate.
(Ignore the first commit as it is part of the open PR #353)

Therefore, the k12 crate is modified to export a macro to generate the hasher. Further is the sha3 crate changed to expose a more low-level, but "hazmat", API.
Shall this gated behind a "hazmat" feature?

I didnot find yet any test vectors, therefore tests are currently missing, but will be added.

Remove the use of vectors and implement `XofReader`.
@aewag aewag changed the title Draft: Add m14 Draft: Add MarsupilamiFourteen (m14) May 8, 2023
@aewag aewag force-pushed the add-m14 branch 3 times, most recently from 8e561f7 to de1bbb1 Compare May 8, 2023 17:52
@gvanas
Copy link

gvanas commented May 9, 2023

Of course, nothing prevents you from adding M14 to RustCrypto. But as written here, I would have a 256-bit secure function, similar to K12, that calls TurboSHAKE256 instead of TurboSHAKE128. Given the status on cryptanalysis, I don't see the need for the 14 rounds anymore; having 12 rounds everywhere just seems simpler and cleaner.

@aewag
Copy link
Contributor Author

aewag commented May 9, 2023

Of course, nothing prevents you from adding M14 to RustCrypto. But as written here, I would have a 256-bit secure function, similar to K12, that calls TurboSHAKE256 instead of TurboSHAKE128. Given the status on cryptanalysis, I don't see the need for the 14 rounds anymore; having 12 rounds everywhere just seems simpler and cleaner.

That definitely simplifies the implementation. I will therefore close this PR and better integrate a k12-256 or similar to the k12 crate.

@aewag aewag closed this May 9, 2023
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 this pull request may close these issues.

2 participants