SodiumException

Invalid signature

/var/www/html/limesurvey-4.1.8/application/third_party/sodium_compat/src/Core/Ed25519.php(197)

185      */
186     public static function sign_open($message, $pk)
187     {
188         /** @var string $signature */
189         $signature = self::substr($message, 0, 64);
190 
191         /** @var string $message */
192         $message = self::substr($message, 64);
193 
194         if (self::verify_detached($signature, $message, $pk)) {
195             return $message;
196         }
197         throw new SodiumException('Invalid signature');
198     }
199 
200     /**
201      * @internal You should not use this directly from another application
202      *
203      * @param string $message
204      * @param string $sk
205      * @return string
206      * @throws SodiumException
207      * @throws TypeError
208      */
209     public static function sign_detached($message, $sk)

Stack Trace

#0
+
 /var/www/html/limesurvey-4.1.8/application/third_party/sodium_compat/src/Crypto.php(1233): ParagonIE_Sodium_Core_Ed25519::sign_open()
1228      * @throws SodiumException
1229      * @throws TypeError
1230      */
1231     public static function sign_open($signedMessage, $pk)
1232     {
1233         return ParagonIE_Sodium_Core_Ed25519::sign_open($signedMessage, $pk);
1234     }
1235 
1236     /**
1237      * Verify a detached signature of a given message and public key.
1238      *
#1
+
 /var/www/html/limesurvey-4.1.8/application/third_party/sodium_compat/src/Compat.php(2088): ParagonIE_Sodium_Crypto::sign_open()
2083             return call_user_func('\\Sodium\\crypto_sign_open', $signedMessage, $publicKey);
2084         }
2085         if (PHP_INT_SIZE === 4) {
2086             return ParagonIE_Sodium_Crypto32::sign_open($signedMessage, $publicKey);
2087         }
2088         return ParagonIE_Sodium_Crypto::sign_open($signedMessage, $publicKey);
2089     }
2090 
2091     /**
2092      * Generate a new random Ed25519 keypair.
2093      *
#2
+
 /var/www/html/limesurvey-4.1.8/application/core/LSSodium.php(110): ParagonIE_Sodium_Compat::crypto_sign_open()
105      * @return string Return decrypted value (string or unsezialized object) if suceeded. Return FALSE if an error occurs (bad password/salt given) or inpyt encryptedString
106      */
107     public function decrypt($sEncryptedString, $bReturnFalseIfError=false){     
108         if ($this->bLibraryExists === true){
109             if (!empty($sEncryptedString) && $sEncryptedString != 'null'){
110                 $plaintext = ParagonIE_Sodium_Compat::crypto_sign_open(base64_decode($sEncryptedString), $this->sEncryptionPublicKey);
111                 if ($plaintext === false){
112                     throw new SodiumException(sprintf(gT("Wrong decryption key! Decryption key has changed since this data were last saved, so data can't be decrypted. Please consult our manual at %s.", 'unescaped'), 'https://manual.limesurvey.org/Data_encryption#Errors'));
113                 } else {
114                     return $plaintext;
115                 }
2020-03-09 13:01:57 Apache/2.4.6 (CentOS) PHP/7.3.14 Yii Framework/1.1.22-dev