diff options
author | Jeffrey Walton <noloader@gmail.com> | 2018-10-24 15:34:54 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2018-10-24 15:34:54 -0400 |
commit | b4c4c5aa14c7514888b40831570e243b74a64073 (patch) | |
tree | d648b2d42ba4bb735eb7e5ff776cb5c331d5daf5 /chacha.cpp | |
parent | c43c47e59002242628dc5534ab8dce786d0892c1 (diff) | |
download | cryptopp-git-b4c4c5aa14c7514888b40831570e243b74a64073.tar.gz |
Add SSSE3 rotates when available
This change obtains the remaining 0.1 to 0.15 cpb. It should be engaged with -march=native
Diffstat (limited to 'chacha.cpp')
-rw-r--r-- | chacha.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
@@ -34,10 +34,6 @@ std::string ChaCha_Policy::AlgorithmProvider() const if (HasSSE2())
return "SSE2";
#endif
-#if (CRYPTOPP_ARM_NEON_AVAILABLE)
- if (HasNEON())
- return "NEON";
-#endif
return "C++";
}
@@ -96,11 +92,6 @@ unsigned int ChaCha_Policy::GetOptimalBlockSize() const return 4*BYTES_PER_ITERATION;
else
#endif
-#if (CRYPTOPP_ARM_NEON_AVAILABLE)
- if (HasNEON())
- return 4*BYTES_PER_ITERATION;
- else
-#endif
return BYTES_PER_ITERATION;
}
@@ -122,7 +113,7 @@ void ChaCha_Policy::OperateKeystream(KeystreamOperation operation, if (m_state[12] < 4)
m_state[13]++;
- input += 4*BYTES_PER_ITERATION;
+ input += !!xorInput*4*BYTES_PER_ITERATION;
output += 4*BYTES_PER_ITERATION;
iterationCount -= 4;
}
|