From fa47a48dae7e0ba1eb6a043e00fa34bf7c9159db Mon Sep 17 00:00:00 2001 From: Leonetienne Date: Tue, 24 May 2022 01:05:45 +0200 Subject: [PATCH] Add comment --- GCryptLib/src/Block.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/GCryptLib/src/Block.cpp b/GCryptLib/src/Block.cpp index e30d738..6315c40 100644 --- a/GCryptLib/src/Block.cpp +++ b/GCryptLib/src/Block.cpp @@ -44,6 +44,8 @@ namespace Leonetienne::GCrypt { Block m; + // Maybe pre-calculate the 1d-index...? + m.Get(0, 0) = (this->Get(0, 0) * o.Get(0, 0)) + (this->Get(0, 1) * o.Get(1, 0)) + (this->Get(0, 2) * o.Get(2, 0)) + (this->Get(0, 3) * o.Get(3, 0)); m.Get(0, 1) = (this->Get(0, 0) * o.Get(0, 1)) + (this->Get(0, 1) * o.Get(1, 1)) + (this->Get(0, 2) * o.Get(2, 1)) + (this->Get(0, 3) * o.Get(3, 1)); m.Get(0, 2) = (this->Get(0, 0) * o.Get(0, 2)) + (this->Get(0, 1) * o.Get(1, 2)) + (this->Get(0, 2) * o.Get(2, 2)) + (this->Get(0, 3) * o.Get(3, 2)); @@ -75,6 +77,8 @@ namespace Leonetienne::GCrypt { Block m = *this; + // Maybe pre-calculate the 1d-index...? + this->Get(0, 0) = (m.Get(0, 0) * o.Get(0, 0)) + (m.Get(0, 1) * o.Get(1, 0)) + (m.Get(0, 2) * o.Get(2, 0)) + (m.Get(0, 3) * o.Get(3, 0)); this->Get(0, 1) = (m.Get(0, 0) * o.Get(0, 1)) + (m.Get(0, 1) * o.Get(1, 1)) + (m.Get(0, 2) * o.Get(2, 1)) + (m.Get(0, 3) * o.Get(3, 1)); this->Get(0, 2) = (m.Get(0, 0) * o.Get(0, 2)) + (m.Get(0, 1) * o.Get(1, 2)) + (m.Get(0, 2) * o.Get(2, 2)) + (m.Get(0, 3) * o.Get(3, 2));