diff --git a/src/lib/pubkey/ec_group/ec_group.cpp b/src/lib/pubkey/ec_group/ec_group.cpp index 36f8233e4af..0393cb2a8fb 100644 --- a/src/lib/pubkey/ec_group/ec_group.cpp +++ b/src/lib/pubkey/ec_group/ec_group.cpp @@ -782,7 +782,7 @@ bool EC_Group::verify_group(RandomNumberGenerator& rng, bool strong) const { } // check the Hasse bound (roughly) - if((p - order).abs().bits() > (p.bits() / 2) + 1) { + if((p - get_cofactor() * order).abs().bits() > (p.bits() / 2) + 1) { return false; }