1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-22 23:48:58 +00:00

Use the right AES CTX

This commit is contained in:
Douglas Stebila 2020-03-26 21:11:07 -04:00 committed by Kris Kwiatkowski
parent b6ecd70ac7
commit 33ac64d922
3 changed files with 3 additions and 3 deletions

View File

@ -70,7 +70,7 @@ void PQCLEAN_KYBER102490S_CLEAN_aes256_prf(uint8_t *output, size_t outlen, const
* - uint8_t y: second additional byte to "absorb" * - uint8_t y: second additional byte to "absorb"
**************************************************/ **************************************************/
void PQCLEAN_KYBER102490S_CLEAN_aes256xof_absorb(aes256xof_ctx *s, const uint8_t *key, uint8_t x, uint8_t y) { void PQCLEAN_KYBER102490S_CLEAN_aes256xof_absorb(aes256xof_ctx *s, const uint8_t *key, uint8_t x, uint8_t y) {
aes256_ctr_keyexp(&s->sk_exp, key); aes256_ecb_keyexp(&s->sk_exp, key);
for (int i = 2; i < 12; i++) { for (int i = 2; i < 12; i++) {
s->iv[i] = 0; s->iv[i] = 0;
} }

View File

@ -70,7 +70,7 @@ void PQCLEAN_KYBER51290S_CLEAN_aes256_prf(uint8_t *output, size_t outlen, const
* - uint8_t y: second additional byte to "absorb" * - uint8_t y: second additional byte to "absorb"
**************************************************/ **************************************************/
void PQCLEAN_KYBER51290S_CLEAN_aes256xof_absorb(aes256xof_ctx *s, const uint8_t *key, uint8_t x, uint8_t y) { void PQCLEAN_KYBER51290S_CLEAN_aes256xof_absorb(aes256xof_ctx *s, const uint8_t *key, uint8_t x, uint8_t y) {
aes256_ctr_keyexp(&s->sk_exp, key); aes256_ecb_keyexp(&s->sk_exp, key);
for (int i = 2; i < 12; i++) { for (int i = 2; i < 12; i++) {
s->iv[i] = 0; s->iv[i] = 0;
} }

View File

@ -70,7 +70,7 @@ void PQCLEAN_KYBER76890S_CLEAN_aes256_prf(uint8_t *output, size_t outlen, const
* - uint8_t y: second additional byte to "absorb" * - uint8_t y: second additional byte to "absorb"
**************************************************/ **************************************************/
void PQCLEAN_KYBER76890S_CLEAN_aes256xof_absorb(aes256xof_ctx *s, const uint8_t *key, uint8_t x, uint8_t y) { void PQCLEAN_KYBER76890S_CLEAN_aes256xof_absorb(aes256xof_ctx *s, const uint8_t *key, uint8_t x, uint8_t y) {
aes256_ctr_keyexp(&s->sk_exp, key); aes256_ecb_keyexp(&s->sk_exp, key);
for (int i = 2; i < 12; i++) { for (int i = 2; i < 12; i++) {
s->iv[i] = 0; s->iv[i] = 0;
} }