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

[NFC] Refactor code in advance of adding support for alternate hashes #367

Merged
merged 11 commits into from
Feb 6, 2023

Conversation

jbruestle
Copy link
Contributor

@jbruestle jbruestle commented Feb 5, 2023

Modify the abstractions for Hal and VerifyHal so that they depend on 1) The field 2) The 'Hash Suite'. The hash suite in turn determines which hash function is used as well as how RNG in Fiat-Shamir is computed. This is done via two new traits 'ConfigHash' and 'ConfigRng' which provide the smallest possible API surface. These API's are implemented using the existing Sha256 based protocol when the HashSuiteSha256 is selected (and given a device appropriate Sha256 trait). In general, since there are currently no other HashSuite implementation, this entire PR is just a NFC code reorg.

@jbruestle jbruestle marked this pull request as ready for review February 6, 2023 04:41
@jbruestle jbruestle requested review from flaub, shkoo and nategraf and removed request for flaub and shkoo February 6, 2023 04:41
@jbruestle jbruestle merged commit ab40dd0 into main Feb 6, 2023
@jbruestle jbruestle deleted the jeremy-refactor-3 branch February 6, 2023 21:25
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.

None yet

2 participants