summaryrefslogtreecommitdiff
path: root/speck.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-11-24 17:54:12 -0500
committerJeffrey Walton <noloader@gmail.com>2017-11-24 17:54:12 -0500
commit4f2d6f713f005e55fc435118c74ccc42acc5c3b4 (patch)
tree2027745eb2754ce64a55ecfcdf5712e0b681828c /speck.cpp
parent2abf7d7bc4c3d6c019ba5aedb65f39ba53db1b8b (diff)
downloadcryptopp-git-4f2d6f713f005e55fc435118c74ccc42acc5c3b4.tar.gz
Switch to rotlConstant and rotrConstant
Update comments
Diffstat (limited to 'speck.cpp')
-rw-r--r--speck.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/speck.cpp b/speck.cpp
index f30a5b4c..884a4bbc 100644
--- a/speck.cpp
+++ b/speck.cpp
@@ -22,8 +22,8 @@ ANONYMOUS_NAMESPACE_BEGIN
using CryptoPP::word32;
using CryptoPP::word64;
-using CryptoPP::rotlFixed;
-using CryptoPP::rotrFixed;
+using CryptoPP::rotlConstant;
+using CryptoPP::rotrConstant;
//! \brief Forward round transformation
//! \tparam W word type
@@ -35,9 +35,9 @@ using CryptoPP::rotrFixed;
template <class W>
inline void TF83(W& x, W& y, const W k)
{
- x = rotrFixed(x, 8);
+ x = rotrConstant<8>(x);
x += y; x ^= k;
- y = rotlFixed(y, 3);
+ y = rotlConstant<3>(y);
y ^= x;
}
@@ -52,9 +52,9 @@ template <class W>
inline void TR83(W& x, W& y, const W k)
{
y ^= x;
- y = rotrFixed(y,3);
+ y = rotrConstant<3>(y);
x ^= k; x -= y;
- x = rotlFixed(x,8);
+ x = rotlConstant<8>(x);
}
//! \brief Forward transformation