public void GMul128_IsCommutative(byte[] left, byte[] right)
        {
            // Act
            byte[] r1 = GaloisMultiplication.GMul128(left, right);
            byte[] r2 = GaloisMultiplication.GMul128(right, left);


            // Assert
            Assert.IsTrue(r1.Select((s, i) => new { value = s, index = i }).All(a => a.value == r2[a.index]));
        }
        public void GMul_IsCommutative(byte left, byte right)
        {
            // Act
            byte r1 = GaloisMultiplication.GMul(left, right);
            byte r2 = GaloisMultiplication.GMul(right, left);


            // Assert
            Assert.AreEqual(r1, r2);
        }
        public void GMul128_IsDistributive(byte[] x, byte[] y, byte[] z)
        {
            // Act
            byte[] a1 = Add(x, y);
            byte[] r1 = GaloisMultiplication.GMul128(a1, z);

            byte[] m1 = GaloisMultiplication.GMul128(x, z);
            byte[] m2 = GaloisMultiplication.GMul128(y, z);
            byte[] r2 = Add(m1, m2);

            // Assert
            Assert.IsTrue(r1.Select((s, i) => new { value = s, index = i }).All(a => a.value == r2[a.index]));
        }
        public void GMul_IsDistributive(byte x, byte y, byte z)
        {
            // Act
            byte a1 = (byte)(x ^ y);
            byte r1 = GaloisMultiplication.GMul(a1, z);

            byte m1 = GaloisMultiplication.GMul(x, z);
            byte m2 = GaloisMultiplication.GMul(y, z);
            byte r2 = (byte)(m1 ^ m2);

            // Assert
            Assert.AreEqual(r1, r2);
        }
        public void GMul128_SquaringFinitFieldSize_ShouldHaveStartResult(byte[] value)
        {
            // Arrange
            byte[] r = value;

            // Act
            for (int i = 0; i < 128; i++)
            {
                r = GaloisMultiplication.GMul128(r, r);
            }

            // Assert
            Assert.IsTrue(value.Select((s, i) => new { value = s, index = i }).All(a => a.value == r[a.index]));
        }
        public void GMul_SquaringFinitFieldSize_ShouldHaveStartResult(byte value)
        {
            // Arrange
            byte r = value;

            // Act
            for (int i = 0; i < 8; i++)
            {
                r = GaloisMultiplication.GMul(r, r);
            }

            // Assert
            Assert.AreEqual(value, r);
        }