Cleanup comments
parent
51d3cc945f
commit
e794d53806
|
|
@ -412,7 +412,7 @@ S DivideThreeWordsByTwo(S *A, S B0, S B1, D *dummy=NULL)
|
||||||
{
|
{
|
||||||
CRYPTOPP_UNUSED(dummy);
|
CRYPTOPP_UNUSED(dummy);
|
||||||
|
|
||||||
// CRYPTOPP_ASSERT {A[2],A[1]} < {B1,B0}, so quotient can fit in a S
|
// Assert {A[2],A[1]} < {B1,B0}, so quotient can fit in a S
|
||||||
CRYPTOPP_ASSERT(A[2] < B1 || (A[2]==B1 && A[1] < B0));
|
CRYPTOPP_ASSERT(A[2] < B1 || (A[2]==B1 && A[1] < B0));
|
||||||
|
|
||||||
// estimate the quotient: do a 2 S by 1 S divide.
|
// estimate the quotient: do a 2 S by 1 S divide.
|
||||||
|
|
@ -2589,7 +2589,7 @@ void HalfMontgomeryReduce(word *R, word *T, const word *X, const word *M, const
|
||||||
// do a 3 word by 2 word divide, returns quotient and leaves remainder in A
|
// do a 3 word by 2 word divide, returns quotient and leaves remainder in A
|
||||||
static word SubatomicDivide(word *A, word B0, word B1)
|
static word SubatomicDivide(word *A, word B0, word B1)
|
||||||
{
|
{
|
||||||
// CRYPTOPP_ASSERT {A[2],A[1]} < {B1,B0}, so quotient can fit in a word
|
// Assert {A[2],A[1]} < {B1,B0}, so quotient can fit in a word
|
||||||
CRYPTOPP_ASSERT(A[2] < B1 || (A[2]==B1 && A[1] < B0));
|
CRYPTOPP_ASSERT(A[2] < B1 || (A[2]==B1 && A[1] < B0));
|
||||||
|
|
||||||
// estimate the quotient: do a 2 word by 1 word divide
|
// estimate the quotient: do a 2 word by 1 word divide
|
||||||
|
|
|
||||||
|
|
@ -500,7 +500,6 @@ template <class B>
|
||||||
void PanamaCipherPolicy<B>::OperateKeystream(KeystreamOperation operation, byte *output, const byte *input, size_t iterationCount)
|
void PanamaCipherPolicy<B>::OperateKeystream(KeystreamOperation operation, byte *output, const byte *input, size_t iterationCount)
|
||||||
{
|
{
|
||||||
#if (CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE)) && !defined(CRYPTOPP_DISABLE_PANAMA_ASM)
|
#if (CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE)) && !defined(CRYPTOPP_DISABLE_PANAMA_ASM)
|
||||||
// No need for alignment CRYPTOPP_ASSERT. Panama_SSE2_Pull is ASM, and its not bound by C alignment requirements.
|
|
||||||
if (B::ToEnum() == LITTLE_ENDIAN_ORDER && HasSSE2())
|
if (B::ToEnum() == LITTLE_ENDIAN_ORDER && HasSSE2())
|
||||||
Panama_SSE2_Pull(iterationCount, this->m_state, (word32 *)(void *)output, (const word32 *)(void *)input);
|
Panama_SSE2_Pull(iterationCount, this->m_state, (word32 *)(void *)output, (const word32 *)(void *)input);
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,7 @@ bool TestSettings()
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS
|
#ifdef CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS
|
||||||
// Don't CRYPTOPP_ASSERT the alignment of testvals. That's what this test is for.
|
// Don't assert the alignment of testvals. That's what this test is for.
|
||||||
byte testvals[10] = {1,2,2,3,3,3,3,2,2,1};
|
byte testvals[10] = {1,2,2,3,3,3,3,2,2,1};
|
||||||
if (*(word32 *)(void *)(testvals+3) == 0x03030303 && *(word64 *)(void *)(testvals+1) == W64LIT(0x0202030303030202))
|
if (*(word32 *)(void *)(testvals+3) == 0x03030303 && *(word64 *)(void *)(testvals+1) == W64LIT(0x0202030303030202))
|
||||||
cout << "passed: Your machine allows unaligned data access.\n";
|
cout << "passed: Your machine allows unaligned data access.\n";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue