twizzler-operating-system / twizzler

The Twizzler Operating System
BSD 3-Clause "New" or "Revised" License
62 stars 13 forks source link

Added cryptographic operations to the kernel, complete with tests #187

Closed zphrs closed 1 week ago

zphrs commented 2 weeks ago

A few notes:

  1. I haven't yet checked whether SSE/SIMD registers are used, although I am pretty sure I disabled them (with the force-soft flag on sha2, a flag which was required to get around a weird LLVM error). That said @dbittman might want to verify those registers don't change (I'm not exactly sure how to check, but I could probably figure it out if Daniel would rather have me do it. If so, any guidance on how to check the value of a register would be appreciated).
  2. I didn't do documentation for these functions since they're pretty self explanatory. That said, I'm happy to go back and add docs if you'd like me to.
  3. dev-dependencies are not included when running tests, meaning that hex-literal, a crate only used in the crypto tests, had to be included into the kernel in order to use it within the tests.
  4. I haven't profiled or tried to enable additional potentially performance enhancing features of the crypto crates (see point 2 for one reason why performance enhancing features could be difficult to enable) and so if crypto ends up being a big performance bottleneck then we can look into enabling the crypto crates' asm features to see if that improves performance.
dbittman commented 2 weeks ago

Hmm, looks like the nvme submodule got updated / changed as part of this? That's causing the CI to fail.