embedded-tls
embedded-tls copied to clipboard
Feature request: HW accelerated crypto
We should be able to parametrize embedded-tls to allow replacing software crypto with hardware implementation. This would be a giant perf win on certain MCUs, however, this seems quite a big overhaul.
We could probably base the API around https://github.com/RustCrypto/traits
This would be a good feature to have. I forget the context but I recall difficulties when I tried to use the STM hardware PKA for the RustCrypto traits.
For reference, I previously measured this for p256-cm4 on a STM32WL.
Implementation | Signing Cycles (appx) | Verify Cycles (appx) | Flash Size (appx) |
---|---|---|---|
Hardware PKA | 5,211,859 | 10,516,860 | 1,582 B |
RustCrypto | 7,856,436 | 14,303,277 | 49 kiB |
p256-cm4 |
442,754 | 1,225,746 | 10 kiB |