From 93208e83937a351babdfd9cfa07d7908ba15f68b Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Mon, 20 Nov 2023 02:41:32 -0500 Subject: [PATCH] Update comments --- gf2n.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gf2n.cpp b/gf2n.cpp index 87d9961b2..56c10de97 100644 --- a/gf2n.cpp +++ b/gf2n.cpp @@ -139,9 +139,9 @@ PolynomialMod2 PolynomialMod2::Trinomial(size_t t0, size_t t1, size_t t2) CRYPTOPP_ASSERT(t0 > t1); CRYPTOPP_ASSERT(t1 > t2); - // The test is odd because of ECIES. The basis is t0, but the other coefficients are not in descending order. + // The test is relaxed because of ECIES. The high order exponent is t0, but the other exponents are not in descending order. if (t1 > t0 || t2 > t0) - throw InvalidArgument("PolynomialMod2: coefficients must be in descending order"); + throw InvalidArgument("PolynomialMod2: exponents must be in descending order"); PolynomialMod2 r((word)0, t0+1); r.SetBit(t0); @@ -158,9 +158,9 @@ PolynomialMod2 PolynomialMod2::Pentanomial(size_t t0, size_t t1, size_t t2, size CRYPTOPP_ASSERT(t2 > t3); CRYPTOPP_ASSERT(t3 > t4); - // The test is odd because of ECIES. The basis is t0, but the other coefficients are not in descending order. + // The test is relaxed because of ECIES. The high order exponent is t0, but the other exponents are not in descending order. if (t1 > t0 || t2 > t0 || t3 > t0 || t4 > t0) - throw InvalidArgument("PolynomialMod2: coefficients must be in descending order"); + throw InvalidArgument("PolynomialMod2: exponents must be in descending order"); PolynomialMod2 r((word)0, t0+1); r.SetBit(t0); @@ -676,9 +676,9 @@ GF2NT::GF2NT(unsigned int c0, unsigned int c1, unsigned int c2) // Asserts and checks due to Bing Shi CRYPTOPP_ASSERT(c0 > c1 && c1 > c2 && c2==0); - // The test is odd because of ECIES. The basis is c0, but the other coefficients are not in descending order. + // The test is relaxed because of ECIES. The high order exponent is t0, but the other exponents are not in descending order. if (c1 > c0 || c2 > c0) - throw InvalidArgument("GF2NT: coefficients must be in descending order"); + throw InvalidArgument("GF2NT: exponents must be in descending order"); } const GF2NT::Element& GF2NT::MultiplicativeInverse(const Element &a) const @@ -990,9 +990,9 @@ GF2NT233::GF2NT233(unsigned int c0, unsigned int c1, unsigned int c2) // Asserts and checks due to Bing Shi CRYPTOPP_ASSERT(c0 > c1 && c1 > c2 && c2==0); - // The test is odd because of ECIES. The basis is c0, but the other coefficients are not in descending order. + // The test is relaxed because of ECIES. The high order exponent is t0, but the other exponents are not in descending order. if (c1 > c0 || c2 > c0) - throw InvalidArgument("GF2NT: coefficients must be in descending order"); + throw InvalidArgument("GF2NT233: exponents must be in descending order"); } const GF2NT::Element& GF2NT233::Multiply(const Element &a, const Element &b) const