Fix FIPS202 API memory leaks in Dilithium
This commit is contained in:
父節點
a804c623de
當前提交
160030400d
@ -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);
|
||||
}
|
||||
|
||||
/*************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user