Fix async expMod output + smcUnwrapAesWrappedTitlekey

This commit is contained in:
Michael Scire 2018-03-08 19:48:35 -08:00
parent 7e780301de
commit 1ffa239b5a
4 changed files with 18 additions and 13 deletions

View file

@ -311,8 +311,8 @@ void se_exp_mod(unsigned int keyslot, void *buf, size_t size, unsigned int (*cal
}
/* Endian swap the input. */
for (size_t i = size; i > 0; i--) {
stack_buf[i] = *((uint8_t *)buf + size - i);
for (size_t i = 0; i < size; i++) {
stack_buf[i] = *((uint8_t *)buf + size - i - 1);
}