From 4f2d6f713f005e55fc435118c74ccc42acc5c3b4 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 24 Nov 2017 17:54:12 -0500 Subject: Switch to rotlConstant and rotrConstant Update comments --- speck.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'speck.cpp') 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 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 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 -- cgit v1.2.1