diff --git a/phpseclib/Math/BigInteger/Engines/Engine.php b/phpseclib/Math/BigInteger/Engines/Engine.php index 5d2dcaa8..3abdbc65 100644 --- a/phpseclib/Math/BigInteger/Engines/Engine.php +++ b/phpseclib/Math/BigInteger/Engines/Engine.php @@ -404,7 +404,7 @@ abstract class Engine implements \Serializable // (will always result in a smaller number. ie. ~1 isn't 1111 1110 - it's 0) $temp = $this->toBytes(); if ($temp == '') { - return ''; + return $this->normalize(static::$zero); } $pre_msb = decbin(ord($temp[0])); $temp = ~$temp;