Update comments
parent
c1f9b484b7
commit
779e28a9b0
|
|
@ -79,10 +79,11 @@ typedef word32 WordType;
|
||||||
enum {BYTES_PER_ITERATION=64};
|
enum {BYTES_PER_ITERATION=64};
|
||||||
|
|
||||||
// MultiBlockSafe detects a condition that can arise in the SIMD
|
// MultiBlockSafe detects a condition that can arise in the SIMD
|
||||||
// implementations where we overflow one of the 32-bit state words
|
// implementations where we overflow one of the 32-bit state words during
|
||||||
// during addition in an intermediate result. Conditions to trigger
|
// addition in an intermediate result. Preconditions for the issue include
|
||||||
// issue include a user seeks to around 2^32 blocks (256 GB of data).
|
// a user seeks to around 2^32 blocks (256 GB of data) for ChaCha; or a
|
||||||
// https://github.com/weidai11/cryptopp/issues/732
|
// user specifies an arbitrarily large initial counter block for ChaChaTLS.
|
||||||
|
// Also see https://github.com/weidai11/cryptopp/issues/732.
|
||||||
inline bool MultiBlockSafe(unsigned int ctrLow, unsigned int blocks)
|
inline bool MultiBlockSafe(unsigned int ctrLow, unsigned int blocks)
|
||||||
{
|
{
|
||||||
return 0xffffffff - ctrLow > blocks;
|
return 0xffffffff - ctrLow > blocks;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue