-
Notifications
You must be signed in to change notification settings - Fork 253
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
Kupyna: implemented hashing function #621
base: master
Are you sure you want to change the base?
Kupyna: implemented hashing function #621
Conversation
@newpavlov could you give me some idea on why the tests are failing right now? I don't think I've touched the Cargo.toml let alone the version of digest; checked and it's the same version as that present in some other toml's. Any idea why this could be happening? |
kupyna/src/sub_units/t_xor_plus/tests/test_individual_layers.rs
Outdated
Show resolved
Hide resolved
Might be a bit unrelated but when I try
now this worked fine before updating the toml. Post toml update the CI is fine, but the main function is failing. Is this expected behaviour? |
Try to rebase your branch to master. |
I don't have a lot (read any) experience with rebasing, sadly. Could you explain a bit more? |
You should be able to rebase to this repos master using something like this (it accounts for the fact that you've forked from a fork):
Note that I do not guarantee correctness of these commands since I wrote them from memory. |
kupyna/src/sub_units/t_xor_plus/tests/test_individual_layers.rs
Outdated
Show resolved
Hide resolved
… the row and col constants
- added authors to LICENSE-MIT
f93d7da
to
3405811
Compare
rebased and made the hex formatting changes. I was wondering if I should also format the mds and s-box matrices the same way, but i think it'd make me put hex-literal as a proper dependency instead of a dev dependency. |
In the previous PR I was told to remove all heap allocations from the code. This is the code snippet that was flagged:
This was when ROWS and COLS were constants, and the hash code length was fixed on 512. This has been made dynamic since, and looks something like this now:
where the matrix type doesn't have a predefined size. Is there a way to go around the heap allocations in this? |
It's probably worth to make the output size a type parameter (i.e. |
Could you explain the first approach a bit? |
I took a look at the spec and I think that the best option will be to follow the |
function spec
Scrapped previous PR since it ran into a lot of problems. I'm aware that #601 exists, creating this one to check against the repo's test suite as I iterate on my implementation, and potentially make it the main pr for kupyna if the other one becomes inactive.
Currently the implementation does everything the paper describes (testing leaves a bit to be desired) so step one is to clean up any linter complaints, and then proceed to making it
no-std
compatible.