Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly set CASE salt span sizes and CASE cleanups (#8929)
* Properly set CASE salt span sizes and CASE cleanups - Caller and callee code for Sigma2/Sigma3 salt generation need to stay in sync for correct usage. If salt buffer grows, but output doesn't it can cause garbage data to be used since the salt output MutableByteSpan is assumed correct-sized rather than ensured to be of correct size. - This change makes use of the computed final size to make sure it stays in sync. - This change also cleans-up: - Random value buffers on heap now on stack - Opcert buffers reduced on stack - No longer trusting some sizes on wire where a max buffer size on stack is used - De-uint16-ify several variables - Reduce scope of HKDF for SR2K/SR3K - Remove some superfluous size variables Testing done: cert tests and unit tests run successfully Fixes: #8913 Issue: #8924 * Restyled by clang-format * Restyled by clang-format * Add comment per @msandstedt Co-authored-by: Restyled.io <[email protected]>
- Loading branch information