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

sha2: RISC-V scalar crypto extension support #614

Merged
merged 6 commits into from
Aug 23, 2024
Merged

Conversation

newpavlov
Copy link
Member

@newpavlov newpavlov commented Aug 21, 2024

The support is Nightly-only and requires to enable the sha2_backend configuration flag with a value equal to riscv-zknh or riscv-zknh-compact.

The resulting assembly and binary size of the compress function (not counting the statics with round constants):

@newpavlov newpavlov marked this pull request as ready for review August 21, 2024 07:17
@newpavlov newpavlov requested a review from tarcieri August 21, 2024 07:31
- run: cargo build --target riscv32gc-unknown-linux-gnu -Z build-std
env:
RUSTFLAGS: '-Dwarnings --cfg sha2_backend="riscv-zknh" -C target-feature=+zknh'
- run: cargo build --target riscv32gc-unknown-linux-gnu -Z build-std
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that we do not run tests on RV32 because cross currently does not support the riscv32gc-unknown-linux-gnu target.

@newpavlov newpavlov merged commit 03e1d29 into master Aug 23, 2024
24 checks passed
@newpavlov newpavlov deleted the sha2/riscv-zknh branch August 23, 2024 13:02
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.

1 participant