소스 검색
Fix FIPS202 API memory leaks in Dilithium
undefined
Thom Wiggers
4 년 전
No known key found for this signature in database
GPG 키 ID: 1BB0A7CE26E363
6개의 변경된 파일과
6개의 추가작업 그리고
0개의 파일을 삭제
-
crypto_sign/dilithium2/avx2/sign.c
-
crypto_sign/dilithium2/clean/sign.c
-
crypto_sign/dilithium3/avx2/sign.c
-
crypto_sign/dilithium3/clean/sign.c
-
crypto_sign/dilithium4/avx2/sign.c
-
crypto_sign/dilithium4/clean/sign.c
|
|
@@ -95,6 +95,7 @@ void PQCLEAN_DILITHIUM2_AVX2_challenge(poly *c, |
|
|
|
c->coeffs[b] ^= -(signs & 1) & (1 ^ (Q - 1)); |
|
|
|
signs >>= 1; |
|
|
|
} |
|
|
|
shake256_ctx_release(&state); |
|
|
|
} |
|
|
|
|
|
|
|
/************************************************* |
|
|
|
|
|
@@ -85,6 +85,7 @@ void PQCLEAN_DILITHIUM2_CLEAN_challenge(poly *c, |
|
|
|
c->coeffs[b] ^= -((int32_t)signs & 1) & (1 ^ (Q - 1)); |
|
|
|
signs >>= 1; |
|
|
|
} |
|
|
|
shake256_ctx_release(&state); |
|
|
|
} |
|
|
|
|
|
|
|
/************************************************* |
|
|
|
|
|
@@ -107,6 +107,7 @@ void PQCLEAN_DILITHIUM3_AVX2_challenge(poly *c, |
|
|
|
c->coeffs[b] ^= -(signs & 1) & (1 ^ (Q - 1)); |
|
|
|
signs >>= 1; |
|
|
|
} |
|
|
|
shake256_ctx_release(&state); |
|
|
|
} |
|
|
|
|
|
|
|
/************************************************* |
|
|
|
|
|
@@ -85,6 +85,7 @@ void PQCLEAN_DILITHIUM3_CLEAN_challenge(poly *c, |
|
|
|
c->coeffs[b] ^= -((int32_t)signs & 1) & (1 ^ (Q - 1)); |
|
|
|
signs >>= 1; |
|
|
|
} |
|
|
|
shake256_ctx_release(&state); |
|
|
|
} |
|
|
|
|
|
|
|
/************************************************* |
|
|
|
|
|
@@ -122,6 +122,7 @@ void PQCLEAN_DILITHIUM4_AVX2_challenge(poly *c, |
|
|
|
c->coeffs[b] ^= -(signs & 1) & (1 ^ (Q - 1)); |
|
|
|
signs >>= 1; |
|
|
|
} |
|
|
|
shake256_ctx_release(&state); |
|
|
|
} |
|
|
|
|
|
|
|
/************************************************* |
|
|
|
|
|
@@ -85,6 +85,7 @@ void PQCLEAN_DILITHIUM4_CLEAN_challenge(poly *c, |
|
|
|
c->coeffs[b] ^= -((int32_t)signs & 1) & (1 ^ (Q - 1)); |
|
|
|
signs >>= 1; |
|
|
|
} |
|
|
|
shake256_ctx_release(&state); |
|
|
|
} |
|
|
|
|
|
|
|
/************************************************* |
|
|
|