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

Add SHA accelerator implementation #257

Merged
merged 34 commits into from
Nov 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
03042de
Add untested basic SHA for esp-sX/cX chips
Nov 9, 2022
659b7cd
Fix ptr type inconsistency for S2
Nov 9, 2022
02c7afb
Add ESP32 impl & fix process_buffer latch issue
Nov 9, 2022
af7c06f
Add debug example for SHA accelerator
Nov 10, 2022
5f38634
Clean up no-op buffer prints
Nov 10, 2022
c194485
Test vector parity (on esp32s3)
Nov 11, 2022
7278e3f
Checkpoint for converting to alignment helper
Nov 12, 2022
9d17031
Finish refactoring & additional parity tests on esp32s3
Nov 12, 2022
a6e8fd2
Remove core_intrinsics requirement for now
Nov 12, 2022
e03f9a6
Fix case where (src.len() % 4) == 3
Nov 12, 2022
7183b34
Finish sha2 example with performance comparison (12-61x speedup)
Nov 13, 2022
1b15525
Refactor ESP32 to alignment helper & Clean up example
Nov 13, 2022
c4a82a9
Prevent out-of-bounds reads in ESP32 version
Nov 13, 2022
60674e1
Revert Cargo debug changes
Nov 13, 2022
1adb1d9
Remove cargo config.toml
Nov 13, 2022
f05bd9e
Clean up example
Nov 13, 2022
8eabb41
Remove common/rust-toolchain & ignore in future
Nov 14, 2022
f40146f
Might as well use actual size_of const
Nov 14, 2022
ffd3814
Remove SHA512/SHA384 for C2/C3
Nov 14, 2022
24fa14a
Directly import nb::block! to remove unused import warning & fix c2 f…
Nov 14, 2022
613aea4
Remove stray newlines
Nov 14, 2022
2c15cc4
Fix esp32c2 having SHA256
Nov 14, 2022
d15fbd6
ESP32 also has SHA384
Nov 14, 2022
e21fab3
Remove comments that don't have a purpose
Nov 16, 2022
2bec47a
Clean up example & finish() handling
Nov 16, 2022
7c19848
Add examples & add ESP32 free()
Nov 16, 2022
bafb7f4
Update C2/C3 examples to show accurate algorithm used
Nov 17, 2022
f4fb712
Fix busy check for ESP32
i404788 Nov 23, 2022
932abbe
Remove outdated TODO comment
i404788 Nov 23, 2022
4ac7e64
Update PAC for ESP3 and (actually) fix busy check
jessebraham Nov 28, 2022
6532064
Merge pull request #1 from jessebraham/fixes/sha
i404788 Nov 28, 2022
45ff41e
Refactor ESP32 version to reduce search space
Nov 28, 2022
0a3c634
Add debug printlns to sha example & clean up comments
Nov 28, 2022
1a5f2a2
Fix ESP32 version, finally
Nov 28, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions esp-hal-common/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rust-toolchain.toml
4 changes: 2 additions & 2 deletions esp-hal-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ ufmt-write = { version = "0.1.0", optional = true }
# Each supported device MUST have its PAC included below along with a
# corresponding feature. We rename the PAC packages because we cannot
# have dependencies and features with the same names.
esp32 = { version = "0.15.0", features = ["critical-section"], optional = true }
esp32 = { version = "0.16.0", features = ["critical-section"], optional = true }
esp32c2 = { version = "0.5.1", features = ["critical-section"], optional = true }
esp32c3 = { version = "0.8.1", features = ["critical-section"], optional = true }
esp32s2 = { version = "0.6.0", features = ["critical-section"], optional = true }
esp32s3 = { version = "0.8.0", features = ["critical-section"], optional = true }
esp32s3 = { version = "0.9.0", features = ["critical-section"], optional = true }

[features]
esp32 = ["esp32/rt" , "procmacros/xtensa", "xtensa-lx-rt/esp32", "xtensa-lx/esp32", "critical-section/restore-state-u32", "lock_api"]
Expand Down
1 change: 1 addition & 0 deletions esp-hal-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ pub use self::{
timer::Timer,
};

pub mod sha;
pub mod analog;
pub mod clock;
pub mod delay;
Expand Down
Loading