-
-
Notifications
You must be signed in to change notification settings - Fork 336
[draft, stdlib] Keccak, SHA-3, and other Keccak-derived functions #2728
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
NotsoanoNimus
wants to merge
31
commits into
c3lang:master
Choose a base branch
from
NotsoanoNimus:sha3-cherrypick
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a suite of SHA-3 and Keccak-based constructs to the C3 standard library. This finishes rounding out the more necessary sets of C3's cryptographic hashing functionalities, and will hopefully at least equalize the power of the language in this space with the others that have these functions in their standard libraries too.
Usage
All extensive unit-tests contain each construction's usage details by example. All function calls will be well documented when this is finished.
TODOs Remaining
ParallelHash(threading vs. "lanes" vs, others?)TupleHash(finish unit tests and fix any outstanding bugs)KangarooTwelve(currently incomplete)At a Glance
I've included a diagram showing the high-level hierarchy used to guide me in implementing this change. The colors change the "further away" each construction is from the
Keccakbase context. Blue is no "inheritance", Green is 1 level of "inheritance", Yellow is 2, and Red is 3.This suite of functions of course uses the traditional concept of a cryptographic hash, but also incorporates the newer extendable output function (or XOF) for creating hashes with arbitrary lengths.